|
| 1 | +<Window |
| 2 | + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
| 3 | + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 4 | + x:Class="TodoListClient.MainWindow" |
| 5 | + Title="To Do List Client" Height="400" Width="400" WindowStartupLocation="CenterScreen"> |
| 6 | + <Grid Margin="12"> |
| 7 | + <Grid.Resources> |
| 8 | + <VisualBrush x:Key="TodoHint" Stretch="None" AlignmentX="Left" AlignmentY="Top"> |
| 9 | + <VisualBrush.Transform> |
| 10 | + <TranslateTransform X="4" Y="7" /> |
| 11 | + </VisualBrush.Transform> |
| 12 | + <VisualBrush.Visual> |
| 13 | + <Grid> |
| 14 | + <TextBlock Text="Enter to do item" FontWeight="Normal" Foreground="Gray" |
| 15 | + FontSize="12" TextAlignment="Justify"/> |
| 16 | + </Grid> |
| 17 | + </VisualBrush.Visual> |
| 18 | + </VisualBrush> |
| 19 | + </Grid.Resources> |
| 20 | + <StackPanel Grid.Row="0" Margin="5" VerticalAlignment="Top" Height="351"> |
| 21 | + <Button HorizontalAlignment="Right" Content="Sign In" Margin="0" Click="SignIn" x:Name="SignInButton" Width="80" Height="30"> |
| 22 | + <Button.Style> |
| 23 | + <Style TargetType="{x:Type Button}"> |
| 24 | + <!-- "<Setter Property="IsEnabled" Value="False" /> --> |
| 25 | + </Style> |
| 26 | + </Button.Style> |
| 27 | + |
| 28 | + </Button> |
| 29 | + <GroupBox Margin="0,0,0,0" Header="Create a To Do item"> |
| 30 | + |
| 31 | + <Grid Margin="0" HorizontalAlignment="Left" Width="388" > |
| 32 | + <Grid.ColumnDefinitions> |
| 33 | + <ColumnDefinition Width="130*"/> |
| 34 | + <ColumnDefinition Width="85*"/> |
| 35 | + </Grid.ColumnDefinitions> |
| 36 | + <TextBox Grid.Column="0" HorizontalAlignment="Left" Height="34" FontSize="12" TextWrapping="Wrap" VerticalAlignment="Top" Width="199" |
| 37 | + x:Name="TodoText" Margin="10,10,0,0" TabIndex="1" Padding="3"> |
| 38 | + <TextBox.Style> |
| 39 | + <Style TargetType="{x:Type TextBox}"> |
| 40 | + <Setter Property="Background" Value="Transparent" /> |
| 41 | + <Style.Triggers> |
| 42 | + <DataTrigger Binding="{Binding Text, ElementName=TodoText}" Value=""> |
| 43 | + <Setter Property="Background" Value="{StaticResource TodoHint}"/> |
| 44 | + </DataTrigger> |
| 45 | + </Style.Triggers> |
| 46 | + </Style> |
| 47 | + </TextBox.Style> |
| 48 | + </TextBox> |
| 49 | + <Button Grid.Column="1" Content="Add item" HorizontalAlignment="Left" Margin="0,10,0,0" VerticalAlignment="Top" Width="101" RenderTransformOrigin="-0.013,0.15" Click="AddTodoItem" Height="34" IsDefault="True" TabIndex="2"/> |
| 50 | + </Grid> |
| 51 | + |
| 52 | + </GroupBox> |
| 53 | + <DataGrid x:Name="TodoList" Margin="0,0,0,0" AutoGenerateColumns="False" ScrollViewer.CanContentScroll="True" ScrollViewer.HorizontalScrollBarVisibility="Disabled" |
| 54 | + IsReadOnly="True" MinWidth="350" CanUserAddRows="False" CanUserDeleteRows="False" Height="230" GridLinesVisibility="None" Background="#FFFFFFFF"> |
| 55 | + |
| 56 | + <DataGrid.Columns> |
| 57 | + <DataGridTextColumn Header="To Do Items" Binding="{Binding Title}" Width="*"/> |
| 58 | + </DataGrid.Columns> |
| 59 | + |
| 60 | + </DataGrid> |
| 61 | + </StackPanel> |
| 62 | + </Grid> |
| 63 | +</Window> |
0 commit comments