|
18 | 18 | <Grid> |
19 | 19 | <Grid |
20 | 20 | x:Name="MainGrid" |
21 | | - MinWidth="650" |
22 | | - Visibility="Collapsed"> |
| 21 | + MinWidth="650"> |
23 | 22 | <Grid.RowDefinitions> |
24 | 23 | <RowDefinition Height="Auto" /> |
25 | 24 | <RowDefinition Height="*" /> |
26 | 25 | </Grid.RowDefinitions> |
27 | | - <controls:TitleBar |
28 | | - x:Name="AppTitleBar" |
29 | | - Title="ShadowViewer" |
30 | | - Grid.Row="0" |
31 | | - VerticalAlignment="Top" |
32 | | - AutoConfigureCustomTitleBar="True" |
33 | | - DisplayMode="Tall" |
34 | | - IsBackButtonVisible="False" |
35 | | - IsHistoryButtonVisible="False" |
36 | | - IsPaneButtonVisible="False" |
37 | | - Subtitle="{x:Bind ViewModel.SubTitle, Mode=OneWay}" |
38 | | - SubtitleForeground="Goldenrod" |
39 | | - Window="{x:Bind ThisWindow}"> |
40 | | - <controls:TitleBar.Icon> |
41 | | - <BitmapIcon ShowAsMonochrome="False" UriSource="ms-appx:///Assets/AppTitleBarIcon.png" /> |
42 | | - </controls:TitleBar.Icon> |
43 | | - <controls:TitleBar.Content> |
44 | | - <AutoSuggestBox |
45 | | - x:Name="SuggestBox" |
46 | | - GotFocus="{x:Bind ViewModel.AutoSuggestBox_OnGotFocus}" |
47 | | - ItemsSource="{x:Bind ViewModel.SearchItems, Mode=OneWay}" |
48 | | - LostFocus="{x:Bind ViewModel.AutoSuggestBox_OnLostFocus}" |
49 | | - PlaceholderText="{i18N:Locale Key=Search}" |
50 | | - QuerySubmitted="{x:Bind ViewModel.AutoSuggestBox_OnQuerySubmitted}" |
51 | | - SuggestionChosen="{x:Bind ViewModel.AutoSuggestBox_OnSuggestionChosen}" |
52 | | - TextChanged="{x:Bind ViewModel.AutoSuggestBox_OnTextChanged}" |
53 | | - TextMemberPath="Title" |
54 | | - UpdateTextOnSelect="False" |
55 | | - Visibility="Collapsed"> |
56 | | - <AutoSuggestBox.ItemTemplate> |
57 | | - <DataTemplate x:DataType="interfaces:IShadowSearchItem"> |
58 | | - <Grid ColumnSpacing="5"> |
59 | | - <Grid.ColumnDefinitions> |
60 | | - <ColumnDefinition Width="Auto" /> |
61 | | - <ColumnDefinition Width="*" /> |
62 | | - <ColumnDefinition Width="Auto" /> |
63 | | - <ColumnDefinition Width="Auto" /> |
64 | | - </Grid.ColumnDefinitions> |
65 | | - <IconSourceElement Grid.Column="0" IconSource="{x:Bind Icon}" /> |
66 | | - <TextBlock Grid.Column="1" Text="{x:Bind Title}" /> |
67 | | - <TextBlock |
68 | | - Grid.Column="2" |
69 | | - FontSize="13" |
70 | | - Text="{x:Bind SubTitle}" /> |
71 | | - <TextBlock |
72 | | - Grid.Column="3" |
73 | | - VerticalAlignment="Center" |
74 | | - FontSize="12" |
75 | | - Foreground="Gray" |
76 | | - Text="{x:Bind Id}" /> |
77 | | - </Grid> |
78 | | - </DataTemplate> |
79 | | - </AutoSuggestBox.ItemTemplate> |
80 | | - </AutoSuggestBox> |
81 | | - </controls:TitleBar.Content> |
82 | | - <controls:TitleBar.HistoryFlyout> |
83 | | - <Flyout Opening="HistoryFlyout_OnOpening" Placement="BottomEdgeAlignedRight"> |
84 | | - <Grid Width="300" RowSpacing="10"> |
85 | | - <Grid.RowDefinitions> |
86 | | - <RowDefinition Height="Auto" /> |
87 | | - <RowDefinition Height="*" /> |
88 | | - </Grid.RowDefinitions> |
89 | | - <Grid Grid.Row="0"> |
90 | | - <Grid.ColumnDefinitions> |
91 | | - <ColumnDefinition Width="*" /> |
92 | | - <ColumnDefinition Width="Auto" /> |
93 | | - </Grid.ColumnDefinitions> |
94 | | - <Button |
95 | | - Grid.Column="0" |
96 | | - HorizontalAlignment="Left" |
97 | | - Content="{i18N:Locale Key=History}" |
98 | | - FontSize="18" |
99 | | - Style="{ThemeResource PointerOverButtonStyle}" /> |
100 | | - |
101 | | - </Grid> |
102 | | - <ListView |
103 | | - x:Name="HistoryListView" |
104 | | - Grid.Row="1" |
105 | | - MaxHeight="400" |
106 | | - IsItemClickEnabled="True" |
107 | | - ItemClick="{x:Bind ViewModel.HistoryView_OnItemClick}" |
108 | | - ItemsSource="{x:Bind ViewModel.HistoryCollection, Mode=OneWay}" |
109 | | - SelectionMode="None"> |
110 | | - <ListView.ItemTemplate> |
111 | | - <DataTemplate x:DataType="interfaces:IHistory"> |
112 | | - <Grid Padding="3" ColumnSpacing="10"> |
113 | | - <Grid.ColumnDefinitions> |
114 | | - <ColumnDefinition Width="60" /> |
115 | | - <ColumnDefinition Width="*" /> |
116 | | - <ColumnDefinition Width="40" /> |
117 | | - </Grid.ColumnDefinitions> |
118 | | - <Image Height="80" Grid.Column="0" Source="{x:Bind Thumb}" /> |
119 | | - <Grid Grid.Column="1"> |
120 | | - <Grid.RowDefinitions> |
121 | | - <RowDefinition Height="*" /> |
122 | | - <RowDefinition Height="Auto" /> |
123 | | - </Grid.RowDefinitions> |
124 | | - <TextBlock |
125 | | - Grid.Row="0" |
126 | | - MaxLines="2" |
127 | | - Text="{x:Bind Title}" |
128 | | - TextTrimming="CharacterEllipsis" |
129 | | - TextWrapping="Wrap" /> |
130 | | - <Grid Grid.Row="1" ColumnSpacing="10"> |
131 | | - <Grid.ColumnDefinitions> |
132 | | - <ColumnDefinition Width="Auto" /> |
133 | | - <ColumnDefinition Width="*" /> |
134 | | - </Grid.ColumnDefinitions> |
135 | | - <TextBlock |
136 | | - Grid.Column="0" |
137 | | - FontSize="12" |
138 | | - Foreground="Gray" |
139 | | - Text="{x:Bind LastReadDateTime}" /> |
140 | | - <TextBlock |
141 | | - Grid.Column="1" |
142 | | - FontSize="12" |
143 | | - Foreground="Gray" |
144 | | - Text="{x:Bind PluginId}" |
145 | | - TextTrimming="CharacterEllipsis" /> |
146 | | - </Grid> |
147 | | - </Grid> |
148 | | - <Button |
149 | | - Grid.Column="2" |
150 | | - Width="30" |
151 | | - Height="28" |
152 | | - Padding="6,4" |
153 | | - HorizontalAlignment="Center" |
154 | | - VerticalAlignment="Center" |
155 | | - Command="{Binding ElementName=ThisWindow, Path=ViewModel.HistoryDeleteCommand}" |
156 | | - CommandParameter="{x:Bind}" |
157 | | - Style="{ThemeResource PointerOverButtonStyle}"> |
158 | | - <FontIcon FontSize="12" Glyph="" /> |
159 | | - </Button> |
160 | | - </Grid> |
161 | | - </DataTemplate> |
162 | | - </ListView.ItemTemplate> |
163 | | - </ListView> |
164 | | - </Grid> |
165 | | - </Flyout> |
166 | | - </controls:TitleBar.HistoryFlyout> |
167 | | - </controls:TitleBar> |
168 | | - <!-- <pages:NavigationPage x:Name="MainPage" Grid.Row="1" /> --> |
| 26 | + |
169 | 27 | </Grid> |
170 | 28 | <Grid |
171 | 29 | x:Name="LoadingGrid" |
|
0 commit comments