Fix OpenFile, SaveFile, Directory pickers style#622
Fix OpenFile, SaveFile, Directory pickers style#622
Conversation
| <Style x:Key="{x:Type controls:SaveFilePicker}" | ||
| TargetType="{x:Type controls:SaveFilePicker}"/> | ||
| TargetType="{x:Type controls:SaveFilePicker}"> | ||
| <Setter Property="Margin" Value="{DynamicResource Margin.TextBox}" /> |
There was a problem hiding this comment.
move this setter to DefaultSaveFilePicker (See overall comments)
|
|
||
| <Style x:Key="{x:Type controls:OpenFilePicker}" | ||
| TargetType="{x:Type controls:OpenFilePicker}"> | ||
| <Setter Property="Margin" Value="{DynamicResource Margin.TextBox}" /> |
There was a problem hiding this comment.
move this setter to DefaultOpenFilePickerStyle (See overall comments)
|
|
||
| <Style x:Key="{x:Type controls:DirectoryPicker}" | ||
| TargetType="{x:Type controls:DirectoryPicker}"> | ||
| <Setter Property="Margin" Value="{DynamicResource Margin.TextBox}" /> |
There was a problem hiding this comment.
move this setter to DefaultDirectoryPickerStyle (See overall comments)
| IsReadOnly="True" | ||
| Text="{Binding SelectedFileDisplayName, Mode=OneWay}" | ||
| Height="{Binding ElementName=OpenFileButton, Path=ActualHeight}"/> | ||
| Height="{Binding ElementName=OpenFileButton, Path=ActualHeight}" |
There was a problem hiding this comment.
Please remove it (and also remove it from other pickers, if they have it too) Binding to sizes 95% in cases is wrong solution. I understand that maybe it's not your code, but as long as we noticed it - we should get rid of it: please try to remove it or use VerticalAlignment=Stretch -> whatever will work
|
Another suggestion, but for other task -> as we working on OpenFilePicker/SaveFilePicker/Directory picker ... there is a lot of extra code here because we use MVVM approach here and controls are not extendable (changed control template, styles, attached events etc); so created issue for it https://sesolutions.atlassian.net/browse/ORCOMP-657 |
| } | ||
|
|
||
| #region Properties | ||
| [ObsoleteEx(Message = "This property will be deprecated", TreatAsErrorFromVersion ="4.9.0", RemoveInVersion = "6.0.0")] |
There was a problem hiding this comment.
TreatAsErrorFromVersion ="5.0.0"
| } | ||
|
|
||
| // Using a DependencyProperty as the backing store for LabelWidth. This enables animation, styling, binding, etc... | ||
| [ObsoleteEx(Message = "This property will be deprecated", TreatAsErrorFromVersion ="4.9.0", RemoveInVersion = "6.0.0")] |
There was a problem hiding this comment.
TreatAsErrorFromVersion ="5.0.0"
| typeof(double), typeof(OpenFilePicker), new PropertyMetadata(125d)); | ||
| typeof(double), typeof(OpenFilePicker), new PropertyMetadata(0d)); | ||
|
|
||
| [ObsoleteEx(Message = "This property will be deprecated", TreatAsErrorFromVersion ="4.9.0", RemoveInVersion = "6.0.0")] |
There was a problem hiding this comment.
TreatAsErrorFromVersion ="5.0.0"
| } | ||
|
|
||
| // Using a DependencyProperty as the backing store for LabelText. This enables animation, styling, binding, etc... | ||
| [ObsoleteEx(Message = "This property will be deprecated", TreatAsErrorFromVersion ="4.9.0", RemoveInVersion = "6.0.0")] |
There was a problem hiding this comment.
TreatAsErrorFromVersion ="5.0.0"
| InitializeComponent(); | ||
| } | ||
|
|
||
| [ObsoleteEx(Message = "This property will be deprecated", TreatAsErrorFromVersion ="4.9.0", RemoveInVersion = "6.0.0")] |
There was a problem hiding this comment.
TreatAsErrorFromVersion ="5.0.0"
| set { SetValue(LabelTextProperty, value); } | ||
| } | ||
|
|
||
| [ObsoleteEx(Message = "This property will be deprecated", TreatAsErrorFromVersion ="4.9.0", RemoveInVersion = "6.0.0")] |
There was a problem hiding this comment.
TreatAsErrorFromVersion ="5.0.0"
| <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:Orc.Controls" xmlns:catel="http://schemas.catelproject.com" xmlns:automation="clr-namespace:Orc.Controls.Automation" xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:converters="clr-namespace:Orc.Controls.Converters" xmlns:xamlbehaviors="http://schemas.microsoft.com/xaml/behaviors" xmlns:orctheming="http://schemas.wildgums.com/orc/theming"> | ||
| <ResourceDictionary.MergedDictionaries> | ||
| <ResourceDictionary Source="/Orc.Theming;component/themes/generic.xaml" /> | ||
| <ResourceDictionary Source="/Orc.Controls;component/Controls/DirectoryPicker/Themes/DirectoryPicker.generic.xaml" /> |
There was a problem hiding this comment.
looks as it something wrong with generated xaml
There was a problem hiding this comment.
it should not be merged dictionaries ...because generated.xaml itself solves a problem with merged dictionaries
| </Setter> | ||
| </Style> | ||
| <Style x:Key="{x:Type local:SaveFilePicker}" TargetType="{x:Type local:SaveFilePicker}"> | ||
| <Setter Property="Margin" Value="{DynamicResource Margin.TextBox}" /> |
There was a problem hiding this comment.
this is also strange...Margin should be only on Default***Style
| <Label.Style> | ||
| <Style TargetType="Label"> | ||
| <Style.Triggers> | ||
| <DataTrigger Binding="{Binding LabelText, Converter={catel:EmptyStringToCollapsingVisibilityConverter}}"> |
There was a problem hiding this comment.
how does the trigger works without Value property specified? (Same in other cases)
There was a problem hiding this comment.
I would prefer not to use DataTrigger...why not use Content property and simple Trigger? (but as for me it's not critical as long as it would be deprecated)
There was a problem hiding this comment.
Another one: what if LabelWidth would be 0 -> what kind of margin it would be?
| <Setter Property="Margin" Value="0"/> | ||
| </DataTrigger> | ||
| </Style.Triggers> | ||
| </Style> |
|
The buttons don't seem square? |





Description of Change
Fix styles to make it look more even
Issues Resolved
API Changes
None
Platforms Affected
Behavioral Changes
None
Testing Procedure
PR Checklist