Skip to content

Commit ec3ccea

Browse files
authored
fix: Remove unnecessary GestureInterceptorMargin and TrueToVisible converter in the DrawerControl style to fix UWP Sample (#448)
* fix: Remove unused GestureInterceptorMargin TemplateBinding in the DrawerControl style to fix UWP Sample * fix: Correctly use the already available MaterialTrueToVisible converter from Uno.Themes and removing the unecessary TrueToVisible converter
1 parent 0f5f684 commit ec3ccea

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed
Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,25 @@
1-
<ResourceDictionary
2-
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3-
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4-
xmlns:converters="using:Uno.Toolkit.Samples.Converters">
1+
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3+
xmlns:converters="using:Uno.Toolkit.Samples.Converters">
4+
55
<converters:FromStringToValueConverter x:Key="IsNullOrEmptyToCollapsed"
66
Check="IsNullOrEmpty"
77
TrueValue="Collapsed"
88
FalseValue="Visible" />
9+
910
<converters:FromStringToValueConverter x:Key="SelectedItemToVisible"
1011
Check="IsEqualToParameterValue"
1112
TrueValue="Visible"
1213
FalseValue="Collapsed" />
1314

1415
<converters:EnumDescriptionConverter x:Name="EnumToDescription" />
1516

16-
<converters:FromBoolToValueConverter x:Key="TrueToVisible"
17-
TrueValue="Visible"
18-
NullOrFalseValue="Collapsed" />
19-
2017
<converters:FromBoolToValueConverter x:Key="NotTrue"
2118
TrueValue="False"
2219
NullOrFalseValue="True" />
23-
20+
2421
<converters:FromBoolToValueConverter x:Key="IsFalse"
2522
FalseValue="True"
2623
NullOrTrueValue="False" />
24+
2725
</ResourceDictionary>

src/Uno.Toolkit.UI/Controls/DrawerControl/DrawerControl.xaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@
5454
<!-- see: https://github.com/unoplatform/nventive-private/issues/271 -->
5555
<Border x:Name="GestureInterceptor"
5656
Background="Transparent"
57-
Visibility="{Binding IsGestureEnabled, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource TrueToVisible}}"
58-
Margin="{TemplateBinding GestureInterceptorMargin}" />
57+
Visibility="{Binding IsGestureEnabled, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource MaterialTrueToVisible}}" />
5958
</Grid>
6059
</ControlTemplate>
6160
</Setter.Value>

0 commit comments

Comments
 (0)