Mega Code Archive

 
Categories / VB.Net Tutorial / WPF
 

Style targeting a specific type of element(Button)

<Page         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">     <Page.Resources>         <Style             TargetType="{x:Type Button}">             <Setter Property="Width" Value="200" />             <Setter Property="Height" Value="50" />         </Style>     </Page.Resources>     <StackPanel>         <Button Content="A Button"/>         <Button Content="Another Button"/>     </StackPanel> </Page>