Permalink
Fetching contributors…
Cannot retrieve contributors at this time
55 lines (54 sloc) 1.71 KB
<Page x:Class="MyNamespace.Page1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Page1"
>
<StackPanel>
<StackPanel.Resources>
<!--<SnippetSyntaxPECollection>-->
<Style x:Key="SpecialButton" TargetType="{x:Type Button}">
<Style.Triggers>
<Trigger Property="Button.IsMouseOver" Value="true">
<Setter Property = "Background" Value="Red"/>
</Trigger>
<Trigger Property="Button.IsPressed" Value="true">
<Setter Property = "Foreground" Value="Green"/>
</Trigger>
</Style.Triggers>
</Style>
<!--</SnippetSyntaxPECollection>-->
</StackPanel.Resources>
<!--<SnippetThisIsATextBox>-->
<TextBox>This is a Text Box</TextBox>
<!--</SnippetThisIsATextBox>-->
<!--<SnippetBlueRedButton>-->
<Button Background="Blue" Foreground="Red" Content="This is a button"/>
<!--</SnippetBlueRedButton>-->
<!--<SnippetBlueRedButtonPE>-->
<Button>
<Button.Background>
<SolidColorBrush Color="Blue"/>
</Button.Background>
<Button.Foreground>
<SolidColorBrush Color="Red"/>
</Button.Foreground>
<Button.Content>
This is a button
</Button.Content>
</Button>
<!--</SnippetBlueRedButtonPE>-->
<!--<SnippetContextMenu>-->
<Button>
<Button.ContextMenu>
<ContextMenu>
<MenuItem Header="1">First item</MenuItem>
<MenuItem Header="2">Second item</MenuItem>
</ContextMenu>
</Button.ContextMenu>
Right-click me!</Button>
<!--</SnippetContextMenu>-->
<!--<SnippetSyntaxOE>-->
<Button Name="CheckoutButton"/>
<!--</SnippetSyntaxOE>-->
</StackPanel>
</Page>