|
8 | 8 | xmlns:Dialog="clr-namespace:MahApps.Metro.Controls.Dialogs;assembly=MahApps.Metro" |
9 | 9 | xmlns:Converter="clr-namespace:NETworkManager.Converters" |
10 | 10 | xmlns:ConfigurtationManager="clr-namespace:NETworkManager.Models.Settings" |
| 11 | + xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro" |
| 12 | + xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls" |
11 | 13 | Dialog:DialogParticipation.Register="{Binding}" |
12 | 14 | mc:Ignorable="d"> |
13 | 15 | <UserControl.Resources> |
|
48 | 50 | <Setter Property="ContentTemplate"> |
49 | 51 | <Setter.Value> |
50 | 52 | <DataTemplate> |
51 | | - <ContentPresenter Content="{Binding Content}" Visibility="{Binding Source={x:Static ConfigurtationManager:ConfigurationManager.Current}, Path=FixAirspace, Converter={StaticResource BooleanReverseToVisibilityConverter}}" /> |
| 53 | + <ContentPresenter Content="{Binding Content}" Visibility="{Binding Source={x:Static ConfigurtationManager:ConfigurationManager.Current}, Path=FixAirspace, Converter={StaticResource BooleanReverseToVisibilityConverter}}" /> |
52 | 54 | </DataTemplate> |
53 | 55 | </Setter.Value> |
54 | 56 | </Setter> |
|
59 | 61 | <Expander Header="{DynamicResource String_Header_Sessions}" Style="{StaticResource RightExpander}" IsExpanded="{Binding ExpandSessionView}"> |
60 | 62 | <Grid Width="250"> |
61 | 63 | <Grid.RowDefinitions> |
| 64 | + <RowDefinition Height="Auto" /> |
| 65 | + <RowDefinition Height="10" /> |
62 | 66 | <RowDefinition Height="*" /> |
63 | 67 | <RowDefinition Height="10" /> |
64 | 68 | <RowDefinition Height="Auto" /> |
65 | 69 | </Grid.RowDefinitions> |
66 | | - <ListBox Grid.Column="0" Grid.Row="0" FontSize="14" ItemsSource="{Binding RemoteDesktopSessions}" DisplayMemberPath="Name" SelectedItem="{Binding SelectedSession}"> |
| 70 | + <TextBox x:Name="txtSearch" Grid.Column="0" BorderBrush="{DynamicResource GrayBrush8}" BorderThickness="1" FontSize="14" VerticalAlignment="Center" Text="{Binding Search, UpdateSourceTrigger=PropertyChanged}" mah:TextBoxHelper.Watermark="{DynamicResource String_Watermark_Search}" mah:TextBoxHelper.ButtonCommand="{Binding TextBoxSearchCommand}" Controls:TextBoxHelper.ClearTextButton="True"> |
| 71 | + <TextBox.Style> |
| 72 | + <Style TargetType="{x:Type TextBox}" BasedOn="{StaticResource SearchMetroTextBox}"> |
| 73 | + <Style.Triggers> |
| 74 | + <Trigger Property="Controls:TextBoxHelper.HasText" Value="True"> |
| 75 | + <Setter Property="Controls:TextBoxHelper.ButtonContentTemplate" Value="{x:Null}" /> |
| 76 | + </Trigger> |
| 77 | + </Style.Triggers> |
| 78 | + </Style> |
| 79 | + </TextBox.Style> |
| 80 | + </TextBox> |
| 81 | + <ListBox Grid.Row="2" FontSize="14" ItemsSource="{Binding RemoteDesktopSessions}" DisplayMemberPath="Name" SelectedItem="{Binding SelectedSession}"> |
67 | 82 | <ListBox.Resources> |
68 | 83 | <Style TargetType="{x:Type ScrollViewer}" BasedOn="{StaticResource DefaulScrollViewer}" /> |
69 | 84 | <ContextMenu x:Key="ListBoxItemContextMenu" Opened="ContextMenu_Opened" MinWidth="150"> |
|
75 | 90 | </Rectangle.OpacityMask> |
76 | 91 | </Rectangle> |
77 | 92 | </MenuItem.Icon> |
78 | | - </MenuItem> |
| 93 | + </MenuItem> |
79 | 94 | <MenuItem Header="{DynamicResource String_Edit}" Command="{Binding EditSessionCommand}"> |
80 | 95 | <MenuItem.Icon> |
81 | 96 | <Rectangle Width="16" Height="16" Fill="{DynamicResource BlackColorBrush}"> |
|
136 | 151 | </Style> |
137 | 152 | </ListBox.ItemContainerStyle> |
138 | 153 | </ListBox> |
139 | | - <TextBlock Grid.Column="0" Grid.Row="0" FontSize="18" Foreground="{DynamicResource GrayBrush3}" Text="{DynamicResource String_NoSessionsFoundCreateOne}" VerticalAlignment="Center" HorizontalAlignment="Center" TextWrapping="Wrap" TextAlignment="Center" Margin="10,0" > |
| 154 | + <TextBlock Grid.Row="2" FontSize="18" Foreground="{DynamicResource GrayBrush3}" Text="{DynamicResource String_NoSessionsFoundCreateOne}" VerticalAlignment="Center" HorizontalAlignment="Center" TextWrapping="Wrap" TextAlignment="Center" Margin="10,0" > |
140 | 155 | <TextBlock.Style> |
141 | 156 | <Style TargetType="{x:Type TextBlock}" BasedOn="{StaticResource HeaderTextBlock}"> |
142 | 157 | <Setter Property="Visibility" Value="Collapsed" /> |
|
148 | 163 | </Style> |
149 | 164 | </TextBlock.Style> |
150 | 165 | </TextBlock> |
151 | | - <Button x:Name="btnAddProfile" Grid.Column="0" Grid.Row="2" Command="{Binding AddSessionCommand}" Style="{StaticResource ImageWithTextButton}"> |
| 166 | + <Button x:Name="btnAddProfile" Grid.Row="4" Command="{Binding AddSessionCommand}" Style="{StaticResource ImageWithTextButton}"> |
152 | 167 | <Button.Content> |
153 | 168 | <Grid> |
154 | 169 | <Grid.ColumnDefinitions> |
|
0 commit comments