Skip to content

Commit

Permalink
更新了UI
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaotianff authored and zhaotianff committed Jan 7, 2020
1 parent c246608 commit 655180c
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 5 deletions.
22 changes: 20 additions & 2 deletions Todo/Todo/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,35 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:local="clr-namespace:Todo"
mc:Ignorable="d"
Title="MainWindow" Height="550" Width="300" Style="{StaticResource newStyle}" Topmost="True">
Title="Todo" Height="550" Width="300" Style="{StaticResource newStyle}" Topmost="True" Icon="logo.png" MaxWidth="320" MaxHeight="600">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="26.4"/>
<RowDefinition Height="65.4"/>
<RowDefinition/>
<RowDefinition Height="100"/>
<RowDefinition Height="25"/>
</Grid.RowDefinitions>

<Grid Grid.Row="0">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>


<TextBlock Text="{Binding Source={x:Static sys:DateTime.Today},StringFormat='{}{0:dddd}',ConverterCulture='zh-CN'}" Foreground="{DynamicResource AccentBaseColor}"
FontWeight="Bold" FontSize="25" FontFamily="微软雅黑" Margin="3,0,0,0"/>


<TextBlock Grid.Row="1" Text="{Binding Source={x:Static sys:DateTime.Today},StringFormat='{}{0: yyyy年MM月dd日}',ConverterCulture='zh-CN'}" Foreground="{DynamicResource AccentBaseColor}"
FontWeight="Bold" FontSize="18" FontFamily="Arial" Margin="0,5,0,0"/>


</Grid>

<StackPanel Grid.Row="1" Name="stack_ContentList">

</StackPanel>
Expand Down
2 changes: 1 addition & 1 deletion Todo/Todo/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public MainWindow()
private void InitializeCommands()
{
CommandBindings.Add(new CommandBinding(SystemCommands.CloseWindowCommand, CloseWindow));
CommandBindings.Add(new CommandBinding(SystemCommands.MaximizeWindowCommand, MaximizeWindow, CanResizeWindow));
//CommandBindings.Add(new CommandBinding(SystemCommands.MaximizeWindowCommand, MaximizeWindow, CanResizeWindow));
CommandBindings.Add(new CommandBinding(SystemCommands.MinimizeWindowCommand, MinimizeWindow, CanMinimizeWindow));
CommandBindings.Add(new CommandBinding(SystemCommands.RestoreWindowCommand, RestoreWindow, CanResizeWindow));
CommandBindings.Add(new CommandBinding(SystemCommands.ShowSystemMenuCommand, ShowSystemMenu));
Expand Down
4 changes: 2 additions & 2 deletions Todo/Todo/Themes/Generic.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
<ControlTemplate TargetType="{x:Type local:TodoItemControl}">
<Border Background="Transparent"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" x:Name="border" Margin="5">
<Grid Height="50">
BorderThickness="{TemplateBinding BorderThickness}" x:Name="border" Margin="3">
<Grid Height="45">
<CheckBox IsChecked="{TemplateBinding TodoFininishFlag}" VerticalAlignment="Center" HorizontalAlignment="Left" Style="{StaticResource CheckBoxStyle}" Margin="3,0,0,0"/>
<Grid HorizontalAlignment="Left" Margin="38,0,60,0">
<Label Height="50" VerticalAlignment="Center" VerticalContentAlignment="Center" FontWeight="SemiBold">
Expand Down

0 comments on commit 655180c

Please sign in to comment.