Input.xaml
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" SizeToContent="WidthAndHeight" FontFamily="Consolas" FontSize="14" FocusManager.FocusedElement="{Binding ElementName=Value}" Topmost="True"> <Window.Resources> <Style TargetType="Control" x:Key="Margin"> <Setter Property="Margin" Value="5" /> </Style> <Style TargetType="Button" BasedOn="{StaticResource Margin}"> <Setter Property="Background" Value="LightBlue" /> <Setter Property="Height" Value="30" /> <Setter Property="Width" Value="100" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="Button"> <Border CornerRadius="5" BorderThickness="1" Background="{TemplateBinding Background}"> <ContentPresenter Content="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center" /> </Border> </ControlTemplate> </Setter.Value> </Setter> <Style.Triggers> <Trigger Property="IsMouseOver" Value="True"> <Setter Property="Background" Value="Cyan" /> </Trigger> </Style.Triggers> </Style> </Window.Resources> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" /> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="1*" /> <RowDefinition Height="2*" /> </Grid.RowDefinitions> <TextBlock Name="Prompt" Grid.ColumnSpan="3" Margin="5" /> <TextBox Grid.Row="1" Name="Value" Style="{StaticResource Margin}" MaxLines="4" AcceptsReturn="True" SpellCheck.IsEnabled="True" Language="en-US" Width="600" /> <Button Name="OK" Grid.Row="1" Grid.Column="1"> <AccessText> _OK </AccessText> </Button> <Button Name="Cancel" Grid.Row="1" Grid.Column="2"> <AccessText> _Cancel </AccessText> </Button> </Grid> </Window> |