|
8 | 8 | xmlns:local="using:ContosoNotes.Views"
|
9 | 9 | xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
10 | 10 | xmlns:models="using:ContosoNotes.Models"
|
11 |
| - xmlns:ui="using:ContosoNotes.UI" |
| 11 | + xmlns:ui="using:ContosoNotes.UI" xmlns:controls="using:Microsoft.Toolkit.Uwp.UI.Controls" |
12 | 12 | d:DataContext="{d:DesignInstance Type=local:MainViewModel}"
|
13 | 13 | Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
|
14 | 14 | mc:Ignorable="d">
|
|
64 | 64 | </Button>
|
65 | 65 |
|
66 | 66 | <StackPanel Grid.Column="1" Orientation="Horizontal">
|
67 |
| - <Button Style="{StaticResource CustomButtonStyle}"> |
| 67 | + <!--<Button Style="{StaticResource CustomButtonStyle}"> |
68 | 68 | <Image Source="ms-appx:///Assets/Translate.png" />
|
69 | 69 | </Button>
|
70 | 70 | <Button Style="{StaticResource CustomButtonStyle}">
|
|
76 | 76 | <Button Style="{StaticResource CustomButtonStyle}">
|
77 | 77 | <Image Source="ms-appx:///Assets/Attach.png" />
|
78 | 78 | </Button>
|
79 |
| - <Button Command="{x:Bind ViewModel.SaveCommand}" Style="{StaticResource CustomButtonStyle}"> |
| 79 | + <Button Style="{StaticResource CustomButtonStyle}"> |
80 | 80 | <Image Source="ms-appx:///Assets/More.png" />
|
81 |
| - </Button> |
| 81 | + </Button>--> |
82 | 82 | </StackPanel>
|
83 | 83 |
|
84 | 84 | <StackPanel Grid.Column="3" Orientation="Horizontal">
|
85 |
| - <Button Style="{StaticResource CustomButtonStyle}"> |
| 85 | + <!--<Button Style="{StaticResource CustomButtonStyle}"> |
86 | 86 | <Image Source="ms-appx:///Assets/Outlook.png" />
|
87 |
| - </Button> |
88 |
| - <Button Style="{StaticResource CustomButtonStyle}"> |
| 87 | + </Button>--> |
| 88 | + <Button |
| 89 | + Command="{x:Bind ViewModel.LaunchMicrosoftTodoCommand}" |
| 90 | + Style="{StaticResource CustomButtonStyle}"> |
89 | 91 | <Image Source="ms-appx:///Assets/Todo.png" />
|
90 | 92 | </Button>
|
91 |
| - <Button Style="{StaticResource CustomButtonStyle}"> |
| 93 | + <!--<Button Style="{StaticResource CustomButtonStyle}"> |
92 | 94 | <Image Source="ms-appx:///Assets/Excel.png" />
|
93 |
| - </Button> |
| 95 | + </Button>--> |
94 | 96 | </StackPanel>
|
95 | 97 |
|
96 | 98 | <graphcontrols:LoginButton Grid.Column="4" />
|
|
102 | 104 | Padding="12,0,0,12"
|
103 | 105 | BorderBrush="#717171"
|
104 | 106 | BorderThickness="0,0,1,0"
|
105 |
| - Visibility="{x:Bind ViewModel.IsPaneOpen, Mode=OneWay}"> |
| 107 | + Visibility="{x:Bind ViewModel.IsPaneOpen, Mode=OneWay}" |
| 108 | + Width="300"> |
106 | 109 | <Grid.RowDefinitions>
|
107 | 110 | <RowDefinition />
|
108 | 111 | <RowDefinition Height="48" />
|
|
113 | 116 | <ListView.ItemTemplate>
|
114 | 117 | <DataTemplate x:DataType="models:NotesListItemModel">
|
115 | 118 | <Grid>
|
116 |
| - <TextBlock Text="{x:Bind NotePageTitle, Mode=OneWay}" /> |
| 119 | + <TextBlock |
| 120 | + Text="{x:Bind NotePageTitle, Mode=OneWay}" |
| 121 | + TextTrimming="WordEllipsis" |
| 122 | + TextWrapping="NoWrap" /> |
117 | 123 | </Grid>
|
118 | 124 | </DataTemplate>
|
119 | 125 | </ListView.ItemTemplate>
|
120 | 126 | </ListView>
|
121 | 127 |
|
122 | 128 | <!-- Notes list footer panel -->
|
123 | 129 | <StackPanel Grid.Row="1" Orientation="Horizontal">
|
124 |
| - <Button Style="{StaticResource CustomButtonStyle}"> |
| 130 | + <!--<Button Style="{StaticResource CustomButtonStyle}"> |
125 | 131 | <Image Source="ms-appx:///Assets/NewNote.png" />
|
126 |
| - </Button> |
| 132 | + </Button>--> |
127 | 133 | </StackPanel>
|
128 | 134 | </Grid>
|
129 | 135 |
|
|
150 | 156 | </Grid.ColumnDefinitions>
|
151 | 157 |
|
152 | 158 | <StackPanel Orientation="Horizontal">
|
153 |
| - <Button Style="{StaticResource CustomButtonStyle}" Visibility="{x:Bind ViewModel.IsPaneOpen, Converter={StaticResource InverseBoolToVisibilityConverter}, Mode=OneWay}"> |
| 159 | + <!--<Button Style="{StaticResource CustomButtonStyle}" Visibility="{x:Bind ViewModel.IsPaneOpen, Converter={StaticResource InverseBoolToVisibilityConverter}, Mode=OneWay}"> |
154 | 160 | <Image Source="ms-appx:///Assets/NewNote.png" />
|
155 | 161 | </Button>
|
156 | 162 | <Button Style="{StaticResource CustomButtonStyle}">
|
157 | 163 | <Image Source="ms-appx:///Assets/Undo.png" />
|
158 | 164 | </Button>
|
159 | 165 | <Button Style="{StaticResource CustomButtonStyle}">
|
160 | 166 | <Image Source="ms-appx:///Assets/Redo.png" />
|
161 |
| - </Button> |
| 167 | + </Button>--> |
162 | 168 | </StackPanel>
|
163 | 169 |
|
164 | 170 | <!-- Sync indicator -->
|
165 | 171 | <Grid Grid.Column="2">
|
166 |
| - <TextBlock |
167 |
| - VerticalAlignment="Bottom" |
168 |
| - Text="Sign in to sync your notes" |
169 |
| - Visibility="{x:Bind ViewModel.IsSignedIn, Converter={StaticResource InverseBoolToVisibilityConverter}, Mode=OneWay}" /> |
170 |
| - <TextBlock |
171 |
| - VerticalAlignment="Bottom" |
172 |
| - Text="Synced, Date, Time" |
173 |
| - Visibility="{x:Bind ViewModel.IsSignedIn, Mode=OneWay}" /> |
| 172 | + <controls:SwitchPresenter Value="{x:Bind ViewModel.IsSignedIn, Mode=OneWay}"> |
| 173 | + <controls:Case IsDefault="True"> |
| 174 | + <TextBlock |
| 175 | + VerticalAlignment="Bottom" |
| 176 | + Text="Sign in to sync your notes" /> |
| 177 | + </controls:Case> |
| 178 | + <controls:Case> |
| 179 | + <controls:Case.Value> |
| 180 | + <x:Boolean>True</x:Boolean> |
| 181 | + </controls:Case.Value> |
| 182 | + <TextBlock VerticalAlignment="Bottom"> |
| 183 | + <Run Text="Synced, " /> |
| 184 | + <Run Text="{x:Bind ViewModel.LastSync.Value.ToShortTimeString(), Mode=OneWay}" /> |
| 185 | + </TextBlock> |
| 186 | + </controls:Case> |
| 187 | + </controls:SwitchPresenter> |
174 | 188 | </Grid>
|
175 | 189 | </Grid>
|
176 | 190 | </Grid>
|
|
0 commit comments