2 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4 x:Class="AccessTextSimple.Pane1"
7 <Grid ShowGridLines ="false" Background ="White" >
8 <Grid.ColumnDefinitions>
9 <ColumnDefinition Width="300"/>
10 <ColumnDefinition Width="250"/>
11 </Grid.ColumnDefinitions>
26 </Grid.RowDefinitions>
28 <TextBlock Margin="10,10,3,3" FontSize="24"
29 Grid.Column="0" Grid.Row="0" >
33 <TextBlock Margin="10,10,3,3" FontSize="14"
34 Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2">
35 The following access text examples demonstrate:
38 <DockPanel Margin="30,10,3,3" Grid.Column="0" Grid.Row="2">
39 <Button Click="edit_Click">
40 <AccessText>_Edit</AccessText>
42 <Button Click="cut_Click">_Cut</Button>
45 <TextBlock Margin="10,10,3,3" Grid.Column="1" Grid.Row="2" FontSize="12"
46 VerticalAlignment="Center" TextWrapping="WrapWithOverflow">
47 Using two methods to create an access key. The access key in the l
48 eft button was created with an access text tag; the one on
49 the right with just the underline character.
52 <DockPanel Margin="30,10,3,3" Grid.Column="0" Grid.Row="3">
53 <Button Click="hello_Click">
54 <AccessText>__He_llo__</AccessText>
58 <TextBlock Margin="10,10,3,3" Grid.Column="1" Grid.Row="3" FontSize="12"
59 VerticalAlignment="Center" TextWrapping="WrapWithOverflow">
60 Using the access text escape. Use two underline characters
61 if you want an underline to appear in your text.
64 <DockPanel Margin="30,10,3,3" Grid.Column="0" Grid.Row="4">
65 <TextBox Name="textBox1" Width="50" Height="30"/>
66 <Label Width="200" HorizontalAlignment="Left"
67 Target="{Binding ElementName=textBox1}">
68 <AccessText TextWrapping="WrapWithOverflow">
69 _A long piece of text that requires text wrapping
75 <TextBlock Margin="10,10,3,3" Grid.Column="1" Grid.Row="4" FontSize="12"
76 VerticalAlignment="Center" TextWrapping="WrapWithOverflow">
77 Using the AccessText element to create a label
78 that has an access key and supports text wrapping.
81 <DockPanel Margin="30,10,3,3" Grid.Column="0" Grid.Row="5">
82 <TextBox Name="textBox2" Width="50" Height="30"/>
83 <Label Target="{Binding ElementName=textBox2}">
84 <AccessText Background="Red" Foreground="DarkSlateBlue"
85 FontFamily="Arial Narrow" FontSize="16" FontStyle="Italic"
92 <TextBlock Margin="10,10,3,3" Grid.Column="1" Grid.Row="5" FontSize="12"
93 VerticalAlignment="Center" TextWrapping="WrapWithOverflow">
94 Setting AccessText properties.
97 <TextBlock Margin="10,10,3,3" FontSize="14"
98 Grid.Column="0" Grid.Row="6" Grid.ColumnSpan="2">
99 NOTE: Press the ALT key to see the access keys in the examples.