|
2 | 2 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
3 | 3 | xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
4 | 4 | xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
5 | | - mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" |
| 5 | + mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="650" |
6 | 6 | x:Class="SampleApp.DemoPages.LabelDemo"> |
7 | 7 |
|
8 | | - <StackPanel Margin="10" Width="350" Spacing="15" HorizontalAlignment="Left"> |
| 8 | + <StackPanel Margin="10" Width="400" Spacing="15" HorizontalAlignment="Left"> |
9 | 9 | <StackPanel> |
10 | 10 | <Label Content="Label" Target="{Binding #Input1}" /> |
11 | 11 | <TextBox Name="Input1" Text="Input" /> |
12 | 12 | </StackPanel> |
13 | 13 |
|
14 | 14 | <StackPanel> |
15 | | - <Label Content="Label disabled" IsEnabled="False" Target="{Binding #Input2}" /> |
| 15 | + <Label Content="Label explicitly disabled" IsEnabled="False" Target="{Binding #Input2}" /> |
16 | 16 | <TextBox Name="Input2" Text="Linked input control not affected" /> |
17 | 17 | </StackPanel> |
18 | 18 |
|
|
31 | 31 | <TextBox Name="Input5" Text="No mnemonics, no accesibility, no label-click-to-focus" /> |
32 | 32 | </StackPanel> |
33 | 33 |
|
| 34 | + |
| 35 | + <TextBlock Margin="0 20 0 0"> |
| 36 | + To automatically show a colon after labels add a style:<LineBreak /> |
| 37 | + <TextBlock Classes="code" Text="<Style Selector="Label /template/ TextBlock#Colon">" /><LineBreak /> |
| 38 | + <TextBlock Classes="code" Text="<Setter Property="IsVisible" Value="True" />" /> |
| 39 | + </TextBlock> |
| 40 | + |
34 | 41 | <StackPanel> |
35 | | - <Label Content="Label.form" Classes="form" Target="{Binding #Input6}" /> |
| 42 | + <Label Content="Label" Classes="form" Target="{Binding #Input6}" /> |
36 | 43 | <TextBox Name="Input6" Text="Colon automatically added" /> |
37 | 44 | </StackPanel> |
38 | 45 |
|
39 | 46 |
|
40 | | - <TextBlock Classes="section-title" Text="Grid.form or Grid.compact-form" Margin="0 20 0 0" /> |
41 | | - <TextBlock Text="Colons added to all labels" /> |
42 | | - <Grid Classes="form" ColumnDefinitions="Auto, *" RowDefinitions="Auto,Auto" Margin="10 0"> |
| 47 | + <Grid Classes="form" ColumnDefinitions="Auto, *" RowDefinitions="Auto,Auto" Margin="10 0" ColumnSpacing="4" RowSpacing="4"> |
43 | 48 | <Label Content="_First" Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" Target="{Binding #FirstNameBox}" /> |
44 | 49 | <TextBox Name="FirstNameBox" Grid.Row="0" Grid.Column="1" Text="Otto" /> |
45 | 50 |
|
|
0 commit comments