|
12 | 12 | xmlns:utilities="clr-namespace:NETworkManager.Utilities;assembly=NETworkManager.Utilities" |
13 | 13 | xmlns:localization="clr-namespace:NETworkManager.Localization.Resources;assembly=NETworkManager.Localization" |
14 | 14 | xmlns:controls="clr-namespace:NETworkManager.Controls;assembly=NETworkManager.Controls" |
| 15 | + xmlns:wpfHelper="clr-namespace:NETworkManager.Utilities.WPF;assembly=NETworkManager.Utilities.WPF" |
15 | 16 | dialogs:DialogParticipation.Register="{Binding}" |
16 | 17 | mc:Ignorable="d" d:DataContext="{d:DesignInstance viewModels:ConnectionsViewModel}"> |
17 | 18 | <UserControl.InputBindings> |
|
30 | 31 | <RowDefinition Height="10" /> |
31 | 32 | <RowDefinition Height="*" /> |
32 | 33 | <RowDefinition Height="Auto" /> |
33 | | - <RowDefinition Height="Auto" /> |
34 | | - <RowDefinition Height="10" /> |
35 | | - <RowDefinition Height="Auto" /> |
36 | 34 | </Grid.RowDefinitions> |
37 | | - <TextBox Grid.Column="0" Grid.Row="0" |
38 | | - VerticalAlignment="Center" |
39 | | - HorizontalAlignment="Right" |
40 | | - Width="250" |
41 | | - Text="{Binding Search, UpdateSourceTrigger=PropertyChanged}" |
42 | | - Style="{StaticResource SearchTextBox}" /> |
| 35 | + <StackPanel Grid.Column="0" Grid.Row="0" |
| 36 | + Orientation="Horizontal" |
| 37 | + VerticalAlignment="Center" |
| 38 | + HorizontalAlignment="Right"> |
| 39 | + <CheckBox IsChecked="{Binding AutoRefreshEnabled}" |
| 40 | + Content="{x:Static localization:Strings.AutomaticallyUpdateEvery}" |
| 41 | + Margin="0,0,10,0" /> |
| 42 | + <ComboBox ItemsSource="{Binding AutoRefreshTimes}" |
| 43 | + SelectedItem="{Binding SelectedAutoRefreshTime}" |
| 44 | + MinWidth="150" |
| 45 | + Margin="0,0,10,0"> |
| 46 | + <ComboBox.ItemTemplate> |
| 47 | + <DataTemplate DataType="utilities:AutoRefreshTimeInfo"> |
| 48 | + <TextBlock> |
| 49 | + <TextBlock.Text> |
| 50 | + <MultiBinding StringFormat="{}{0} {1}"> |
| 51 | + <Binding Path="Value" /> |
| 52 | + <Binding Path="TimeUnit" |
| 53 | + Converter="{StaticResource TimeUnitToStringConverter}" /> |
| 54 | + </MultiBinding> |
| 55 | + </TextBlock.Text> |
| 56 | + </TextBlock> |
| 57 | + </DataTemplate> |
| 58 | + </ComboBox.ItemTemplate> |
| 59 | + </ComboBox> |
| 60 | + <Button Command="{Binding Path=RefreshCommand}" |
| 61 | + Style="{StaticResource CleanButton}" |
| 62 | + Margin="0,0,10,0"> |
| 63 | + <Rectangle Width="24" Height="24" |
| 64 | + wpfHelper:ReloadAnimationHelper.IsReloading="{Binding IsRefreshing}"> |
| 65 | + <Rectangle.OpacityMask> |
| 66 | + <VisualBrush Stretch="Uniform" |
| 67 | + Visual="{iconPacks:Material Kind=Refresh}" /> |
| 68 | + </Rectangle.OpacityMask> |
| 69 | + <Rectangle.Style> |
| 70 | + <Style TargetType="{x:Type TypeName=Rectangle}"> |
| 71 | + <Setter Property="Fill" |
| 72 | + Value="{DynamicResource ResourceKey=MahApps.Brushes.Gray3}" /> |
| 73 | + <Style.Triggers> |
| 74 | + <DataTrigger |
| 75 | + Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Button}}, Path=IsMouseOver}" |
| 76 | + Value="True"> |
| 77 | + <Setter Property="Fill" |
| 78 | + Value="{DynamicResource ResourceKey=MahApps.Brushes.Gray5}" /> |
| 79 | + </DataTrigger> |
| 80 | + </Style.Triggers> |
| 81 | + </Style> |
| 82 | + </Rectangle.Style> |
| 83 | + </Rectangle> |
| 84 | + </Button> |
| 85 | + <TextBox Width="250" |
| 86 | + Text="{Binding Path=Search, UpdateSourceTrigger=PropertyChanged}" |
| 87 | + Style="{StaticResource ResourceKey=SearchTextBox}" /> |
| 88 | + </StackPanel> |
43 | 89 | <controls:MultiSelectDataGrid Grid.Column="0" Grid.Row="2" |
44 | 90 | ItemsSource="{Binding ResultsView}" |
45 | 91 | SelectedItem="{Binding SelectedResult}" |
|
163 | 209 | Text="{Binding StatusMessage}" |
164 | 210 | Visibility="{Binding IsStatusMessageDisplayed, Converter={StaticResource BooleanToVisibilityCollapsedConverter}}" |
165 | 211 | Style="{DynamicResource StatusMessageTextBlock}" Margin="0,10,0,0" /> |
166 | | - <mahAppsControls:MetroProgressBar Grid.Row="4" Margin="0,10,0,0" |
167 | | - Foreground="{DynamicResource MahApps.Brushes.Accent}" |
168 | | - IsIndeterminate="True"> |
169 | | - <mahAppsControls:MetroProgressBar.Style> |
170 | | - <Style TargetType="{x:Type mahAppsControls:MetroProgressBar}"> |
171 | | - <Style.Triggers> |
172 | | - <DataTrigger Binding="{Binding IsRefreshing}" Value="False"> |
173 | | - <Setter Property="Visibility" Value="Collapsed" /> |
174 | | - </DataTrigger> |
175 | | - </Style.Triggers> |
176 | | - </Style> |
177 | | - </mahAppsControls:MetroProgressBar.Style> |
178 | | - </mahAppsControls:MetroProgressBar> |
179 | | - <Grid Grid.Column="0" Grid.Row="6"> |
180 | | - <Grid.ColumnDefinitions> |
181 | | - <ColumnDefinition Width="Auto" /> |
182 | | - <ColumnDefinition Width="10" /> |
183 | | - <ColumnDefinition Width="*" /> |
184 | | - <ColumnDefinition Width="10" /> |
185 | | - <ColumnDefinition Width="Auto" /> |
186 | | - </Grid.ColumnDefinitions> |
187 | | - <WrapPanel Grid.Column="2" Grid.Row="0" Orientation="Horizontal" VerticalAlignment="Center" |
188 | | - HorizontalAlignment="Right"> |
189 | | - <CheckBox IsChecked="{Binding AutoRefreshEnabled}" |
190 | | - Content="{x:Static localization:Strings.AutomaticallyUpdateEvery}" Margin="0,0,10,0" /> |
191 | | - <ComboBox ItemsSource="{Binding AutoRefreshTimes}" |
192 | | - SelectedItem="{Binding SelectedAutoRefreshTime}" MinWidth="150"> |
193 | | - <ComboBox.ItemTemplate> |
194 | | - <DataTemplate DataType="utilities:AutoRefreshTimeInfo"> |
195 | | - <TextBlock> |
196 | | - <TextBlock.Text> |
197 | | - <MultiBinding StringFormat="{}{0} {1}"> |
198 | | - <Binding Path="Value" /> |
199 | | - <Binding Path="TimeUnit" |
200 | | - Converter="{StaticResource TimeUnitToStringConverter}" /> |
201 | | - </MultiBinding> |
202 | | - </TextBlock.Text> |
203 | | - </TextBlock> |
204 | | - </DataTemplate> |
205 | | - </ComboBox.ItemTemplate> |
206 | | - </ComboBox> |
207 | | - </WrapPanel> |
208 | | - <Button Grid.Column="4" Grid.Row="0" Command="{Binding RefreshCommand}"> |
209 | | - <Button.Style> |
210 | | - <Style TargetType="{x:Type Button}" BasedOn="{StaticResource ImageWithTextButton}"> |
211 | | - <Style.Triggers> |
212 | | - <DataTrigger Binding="{Binding IsRefreshing}" Value="True"> |
213 | | - <Setter Property="IsEnabled" Value="False" /> |
214 | | - </DataTrigger> |
215 | | - <DataTrigger Binding="{Binding AutoRefreshEnabled}" Value="True"> |
216 | | - <Setter Property="IsEnabled" Value="False" /> |
217 | | - </DataTrigger> |
218 | | - </Style.Triggers> |
219 | | - </Style> |
220 | | - </Button.Style> |
221 | | - <Button.Content> |
222 | | - <Grid> |
223 | | - <Grid.ColumnDefinitions> |
224 | | - <ColumnDefinition Width="Auto" /> |
225 | | - <ColumnDefinition Width="*" /> |
226 | | - </Grid.ColumnDefinitions> |
227 | | - <Rectangle Style="{StaticResource ButtonWithImageRectangle}"> |
228 | | - <Rectangle.OpacityMask> |
229 | | - <VisualBrush Stretch="Uniform" Visual="{iconPacks:Material Kind=Refresh}" /> |
230 | | - </Rectangle.OpacityMask> |
231 | | - </Rectangle> |
232 | | - <TextBlock Grid.Column="1" Text="{x:Static localization:Strings.Refresh}" |
233 | | - Style="{StaticResource ButtonWithImageTextBlock}" /> |
234 | | - </Grid> |
235 | | - </Button.Content> |
236 | | - </Button> |
237 | | - </Grid> |
238 | 212 | </Grid> |
239 | 213 | </TabItem> |
240 | 214 | </TabControl> |
|
0 commit comments