Silverlight中style应用

可以在app.xml

    <Style x:Key="ContentBorderStyle" TargetType="Border">

 

也可以修改app.xml

 

<Application
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"  
  x:Class="TwitterSearchMonitor.App"
  mc:Ignorable="d">

  <Application.Resources>
    <ResourceDictionary>
      <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="Assets/Styles.xaml"/>
      </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>
    </Application.Resources>
</Application>

再新建一个xaml

<ResourceDictionary
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
  xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows"
  xmlns:System="clr-namespace:System;assembly=mscorlib">

      <Style x:Key="ContentBorderStyle" TargetType="Border">

</<ResourceDictionary>

posted on 2010-07-30 10:50  SkyZhang  阅读(336)  评论(0)    收藏  举报

导航