1 <Window x:Class="SDKSample.Window1"
2 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4 Title="TextBox Custom Context Menu"
5 Width="640" Height="480"
9 <RowDefinition Height="40"/>
11 </Grid.RowDefinitions>
15 HorizontalAlignment="Center"
16 VerticalAlignment="Center"
17 Orientation="Horizontal"
48 VerticalScrollBarVisibility="Visible"
74 Name="cxmItemSelectAll"
75 Click="ClickSelectAll"
78 Header="Select Current Line"
79 Name="cxmItemSelectLine"
80 Click="ClickSelectLine"
84 Header="Undo Last Action"
89 Header="Redo Last Action"
95 Header="Clear All Text"
100 </TextBox.ContextMenu>
101 This TextBox uses a simple custom context menu. The context menu can be disabled by checking
102 the CheckBox above, which simply sets the TextBox.ContextMenu property to null.