如何应用Silverlight ToolKit自带的主题样式到ChildWindow页面上
Silverlight ToolKit 4有些自带的主题,就是它的例子中Theme Browser看到的,dll文件在
C:\Program Files\Microsoft SDKs\Silverlight\v4.0\Toolkit\Apr10\Themes\System.Windows.Controls.Theming.TwilightBlue.dll
下面,我看了下例子,如果要运用这个样式只需要在 控件前面包裹
xmlns:twilightblue="clrnamespace:System.Windows.Controls.Theming;assembly=System.Windows.Controls.Theming.TwilightBle"
<twilightblue:TwilightBlueTheme>.........</twilightblue:TwilightBlueTheme>
就可以了。但我想我的ChildWindow的页眉也能应用到他自带的样式,(在Theme Browser中可以看到)
问下我应该怎么写呢
<controls:ChildWindow x:Class="AssetsManagementDemo.Views.Base.ErrorWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:systemcolors="clr-namespace:System.Windows.Controls.Theming;assembly=System.Windows.Controls.Theming.SystemColors" xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls" Title="错误"> <Grid x:Name="LayoutRoot" Width="540"> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/> <RowDefinition/> <RowDefinition Height="Auto"/> </Grid.RowDefinitions> <TextBlock x:Name="IntroductoryText" Grid.Row="0" Margin="0" Text="发生了未知错误。有关详细信息,请与您的管理员联系。"/> <StackPanel x:Name="ContentStackPanel" Grid.Row="2" Margin="0,6,0,0"> <TextBlock x:Name="LabelText" TextWrapping="Wrap" Margin="0,0,0,2" Text="错误详细信息"/> <TextBox x:Name="ErrorTextBox" Height="90" TextWrapping="Wrap" IsReadOnly="True" VerticalScrollBarVisibility="Auto"/> </StackPanel> <Button x:Name="OKButton" Grid.Row="3" Click="OKButton_Click" Width="75" Height="23" HorizontalAlignment="Right" Margin="0,10,0,0" TabIndex="0" Content="确定"/> </Grid> </controls:ChildWindow>