Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Remove unnecessary GestureInterceptorMargin and TrueToVisible converter in the DrawerControl style to fix UWP Sample #448

Merged
merged 2 commits into from
Jan 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converters="using:Uno.Toolkit.Samples.Converters">
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converters="using:Uno.Toolkit.Samples.Converters">

<converters:FromStringToValueConverter x:Key="IsNullOrEmptyToCollapsed"
Check="IsNullOrEmpty"
TrueValue="Collapsed"
FalseValue="Visible" />

<converters:FromStringToValueConverter x:Key="SelectedItemToVisible"
Check="IsEqualToParameterValue"
TrueValue="Visible"
FalseValue="Collapsed" />

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

<converters:FromBoolToValueConverter x:Key="TrueToVisible"
TrueValue="Visible"
NullOrFalseValue="Collapsed" />

<converters:FromBoolToValueConverter x:Key="NotTrue"
TrueValue="False"
NullOrFalseValue="True" />

<converters:FromBoolToValueConverter x:Key="IsFalse"
FalseValue="True"
NullOrTrueValue="False" />

</ResourceDictionary>
3 changes: 1 addition & 2 deletions src/Uno.Toolkit.UI/Controls/DrawerControl/DrawerControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@
<!-- see: https://github.com/unoplatform/nventive-private/issues/271 -->
<Border x:Name="GestureInterceptor"
Background="Transparent"
Visibility="{Binding IsGestureEnabled, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource TrueToVisible}}"
Margin="{TemplateBinding GestureInterceptorMargin}" />
Visibility="{Binding IsGestureEnabled, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource MaterialTrueToVisible}}" />
</Grid>
</ControlTemplate>
</Setter.Value>
Expand Down