WPF(x:Null 使用)

  1. <Window x:Class="TestOfNull.MainWindow"  
  2.         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"  
  3.         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"  
  4.         Title="x:Null Sample" Height="350" Width="525">  
  5.     <Window.Resources>  
  6.         <Style x:Key="{x:Type Button}" TargetType="{x:Type Button}" >  
  7.             <Setter Property="Width" Value="60" />  
  8.             <Setter Property="Height" Value="36" />  
  9.             <Setter Property="Margin" Value="5" />  
  10.         </Style>  
  11.     </Window.Resources>  
  12.       
  13.     <StackPanel >  
  14.         <Button Content="OK" />  
  15.         <Button Content="OK" />  
  16.         <Button Content="OK" />  
  17.         <Button Content="OK" Style="{x:Null}" />  
  18.     </StackPanel>  
  19. </Window>  
posted @ 2016-08-22 22:22  白色的回忆  阅读(2202)  评论(0)    收藏  举报