Projects STRLCPY NETworkManager Commits 4f76973c
🤬
Revision indexing in progress... (symbol navigation in revisions will be accurate after indexed)
  • ■ ■ ■ ■ ■ ■
    Source/NETworkManager/ProfileDialogManager.cs
    skipped 13 lines
    14 14   {
    15 15   var customDialog = new CustomDialog
    16 16   {
    17  - Title = Localization.Resources.Strings.AddProfile
     17 + Title = Localization.Resources.Strings.AddProfile,
     18 + Style = (Style)Application.Current.FindResource("ProfileMetroDialog")
    18 19   };
    19 20   
    20 21   var profileViewModel = new ProfileViewModel(async instance =>
    skipped 22 lines
    43 44   {
    44 45   var customDialog = new CustomDialog
    45 46   {
    46  - Title = Localization.Resources.Strings.EditProfile
     47 + Title = Localization.Resources.Strings.EditProfile,
     48 + Style = (Style)Application.Current.FindResource("ProfileMetroDialog")
    47 49   };
    48 50   
    49 51   var profileViewModel = new ProfileViewModel(async instance =>
    skipped 23 lines
    73 75   {
    74 76   var customDialog = new CustomDialog
    75 77   {
    76  - Title = Localization.Resources.Strings.CopyProfile
     78 + Title = Localization.Resources.Strings.CopyProfile,
     79 + Style = (Style)Application.Current.FindResource("ProfileMetroDialog")
    77 80   };
    78 81   
    79 82   var profileViewModel = new ProfileViewModel(async instance =>
    skipped 224 lines
  • ■ ■ ■ ■ ■ ■
    Source/NETworkManager/Resources/Styles/MetroDialogStyles.xaml
    1 1  <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    2  - xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
     2 + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
     3 + xmlns:dialog="clr-namespace:MahApps.Metro.Controls.Dialogs;assembly=MahApps.Metro">
    3 4   <ResourceDictionary.MergedDictionaries>
    4 5   <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.Buttons.xaml" />
    5 6   </ResourceDictionary.MergedDictionaries>
     7 + 
     8 + <!-- Profile dialog -->
     9 + <Style x:Key="ProfileMetroDialog" TargetType="{x:Type dialog:BaseMetroDialog}" BasedOn="{StaticResource {x:Type dialog:BaseMetroDialog}}">
     10 + <Setter Property="Template">
     11 + <Setter.Value>
     12 + <ControlTemplate TargetType="{x:Type dialog:BaseMetroDialog}">
     13 + <ControlTemplate.Resources>
     14 + <Storyboard x:Key="DialogShownStoryboard">
     15 + <DoubleAnimation AccelerationRatio=".9" BeginTime="0:0:0" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.2" />
     16 + </Storyboard>
     17 + </ControlTemplate.Resources>
     18 + <Grid Background="{TemplateBinding Background}">
     19 + <Grid.RowDefinitions>
     20 + <RowDefinition Height="Auto" />
     21 + <RowDefinition Height="560" />
     22 + <!-- Adjust MaxHeight if Window.xaml MinHeight has changed -> 80% -->
     23 + <RowDefinition Height="Auto" />
     24 + </Grid.RowDefinitions>
     25 + <ContentPresenter Grid.Row="0" AutomationProperties.Name="Dialog top" Content="{TemplateBinding DialogTop}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
     26 + <Grid Grid.Row="1" >
     27 + <Grid.ColumnDefinitions>
     28 + <ColumnDefinition Width="10*" />
     29 + <ColumnDefinition Width="80*" MaxWidth="840" />
     30 + <!-- Adjust MaxHeight if Window.xaml MinWidth has changed -> 80% -->
     31 + <ColumnDefinition Width="10*" />
     32 + </Grid.ColumnDefinitions>
     33 + <!-- Content area -->
     34 + <Grid Grid.Column="1" Margin="{TemplateBinding Padding}">
     35 + <Grid.RowDefinitions>
     36 + <RowDefinition Height="Auto" />
     37 + <RowDefinition Height="*" />
     38 + </Grid.RowDefinitions>
     39 + <TextBlock x:Name="PART_Title" Grid.Row="0" AutomationProperties.Name="Dialog title" FontSize="{TemplateBinding DialogTitleFontSize}" Foreground="{TemplateBinding Foreground}" Text="{TemplateBinding Title}" TextWrapping="Wrap" />
     40 + <ContentPresenter Grid.Row="1" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" AutomationProperties.Name="Dialog content" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" ContentTemplate="{TemplateBinding ContentTemplate}" ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
     41 + </Grid>
     42 + </Grid>
     43 + <ContentPresenter Grid.Row="2" AutomationProperties.Name="Dialog bottom" Content="{TemplateBinding DialogBottom}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
     44 + </Grid>
     45 + <ControlTemplate.Triggers>
     46 + <Trigger Property="Title" Value="{x:Null}">
     47 + <Setter TargetName="PART_Title" Property="Visibility" Value="Collapsed" />
     48 + </Trigger>
     49 + <EventTrigger RoutedEvent="Loaded">
     50 + <EventTrigger.Actions>
     51 + <BeginStoryboard Storyboard="{StaticResource DialogShownStoryboard}" />
     52 + </EventTrigger.Actions>
     53 + </EventTrigger>
     54 + </ControlTemplate.Triggers>
     55 + </ControlTemplate>
     56 + </Setter.Value>
     57 + </Setter>
     58 + </Style>
    6 59   
    7 60   <!-- Override the buttons in MahApps.Metro Dialogs -->
    8 61   <Style x:Key="MahApps.Styles.Button.Dialogs" BasedOn="{StaticResource DefaultButton}" TargetType="{x:Type Button}">
    skipped 9 lines
  • ■ ■ ■ ■ ■ ■
    Source/NETworkManager/ViewModels/ProfilesViewModel.cs
    skipped 161 lines
    162 162   {
    163 163   var customDialog = new CustomDialog
    164 164   {
    165  - Title = Localization.Resources.Strings.AddProfile
     165 + Title = Localization.Resources.Strings.AddProfile,
     166 + Style = (Style)Application.Current.FindResource("ProfileMetroDialog")
    166 167   };
    167 168   
    168 169   var profileViewModel = new ProfileViewModel(instance =>
    skipped 18 lines
    187 188   {
    188 189   var customDialog = new CustomDialog
    189 190   {
    190  - Title = Localization.Resources.Strings.EditProfile
     191 + Title = Localization.Resources.Strings.EditProfile,
     192 + Style = (Style)Application.Current.FindResource("ProfileMetroDialog")
    191 193   };
    192 194   
    193 195   var profileViewModel = new ProfileViewModel(instance =>
    skipped 20 lines
    214 216   {
    215 217   var customDialog = new CustomDialog
    216 218   {
    217  - Title = Localization.Resources.Strings.CopyProfile
     219 + Title = Localization.Resources.Strings.CopyProfile,
     220 + Style = (Style)Application.Current.FindResource("ProfileMetroDialog")
    218 221   };
    219 222   
    220 223   var profileViewModel = new ProfileViewModel(instance =>
    skipped 137 lines
  • ■ ■ ■ ■ ■
    docs/04_Changelog.md
    skipped 20 lines
    21 21  ## Improvements
    22 22   
    23 23  ## Bugfixes
     24 +- Profile dialog height fixed [#594](https://github.com/BornToBeRoot/NETworkManager/issues/594){:target="_blank"}
    24 25  - Design of some buttons fixed [#591](https://github.com/BornToBeRoot/NETworkManager/issues/591){:target="_blank"}
    25 26   
    26 27  ## Other
    skipped 489 lines
Please wait...
Page is in error, reload to recover