【发布时间】:2017-03-23 23:02:06
【问题描述】:
我尝试在 Xaml 中的窗口上应用样式。但我的代码没有应用这种风格。谁能帮我解决这个问题?
<Window x:Class="Shweta.Window5"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window5" Height="300" Width="300">
<Window.Resources>
<Style TargetType="{x:Type Window}">
<Setter Property="FontFamily" Value="Verdana"></Setter>
<Setter Property="Foreground" Value="LightBlue"></Setter>
<Setter Property="FontWeight" Value="Normal"></Setter>
<Setter Property="WindowStyle" Value="None"></Setter>
<Setter Property="Background" Value="LightBlue"></Setter>
</Style>
</Window.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="40*" />
<ColumnDefinition Width="238*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="47*" />
<RowDefinition Height="214*" />
</Grid.RowDefinitions>
<Grid Grid.Column="1">
<Button Margin="0,0,114,16" Content="shweta"/>
</Grid>
</Grid>
</Window>
【问题讨论】:
标签: wpf