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

[Windows] Issues with DrawerControl (Cannot find a Resource with the Name/Key TrueToVisible | GestureInterceptorMargin was not found) #290

Closed
1 of 10 tasks
FrozDark opened this issue Aug 19, 2022 · 1 comment
Assignees
Labels
kind/bug Something isn't working kind/regression Something was working, now it isn't

Comments

@FrozDark
Copy link

FrozDark commented Aug 19, 2022

Current behavior

Using DrawerControl in windows throws COMException with "Cannot find a Resource with the Name/Key TrueToVisible".
By the name of resource I realized that it's a simple visibility converter. After manually adding it an another COMException with message "The property 'GestureInterceptorMargin' was not found in type 'Uno.Toolkit.UI.DrawerControl'" is thrown
Same issue with GTK but allowing an app work without gesture support there #721

Expected behavior

Working control with no issues and exceptions

How to reproduce it (as minimally and precisely as possible)

I could attach repro if needed

Environment

Nuget Package:

<PackageReference Include="CommunityToolkit.WinUI" Version="7.1.2" />
<PackageReference Include="CommunityToolkit.WinUI.UI.Controls" Version="7.1.2" />
<PackageReference Include="CommunityToolkit.WinUI.UI.Controls.DataGrid" Version="7.1.2" />
<PackageReference Include="Mapsui" Version="4.0.0-build.3855" />
<PackageReference Include="Mapsui.ArcGIS" Version="4.0.0-build.3855" />
<PackageReference Include="Mapsui.Extensions" Version="4.0.0-build.3855" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.2.220727.1-experimental1" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.25179-preview" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0-preview.7.22375.6" />
<PackageReference Include="SkiaSharp.Views.WinUI" Version="2.88.1-preview.108" />
<PackageReference Include="Uno.Core.Extensions.Logging.Singleton" Version="4.0.1" />
<PackageReference Include="Uno.Toolkit.WinUI" Version="2.3.0-dev.6" />
<PackageReference Include="Uno.Toolkit.WinUI.Material" Version="2.3.0-dev.6" />
<PackageReference Include="Uno.WinUI" Version="4.5.0-dev.523" />

Package Version(s):

Affected platform(s):

  • iOS
  • Android
  • WebAssembly
  • WebAssembly renders for Xamarin.Forms
  • Windows
  • Build tasks

Visual Studio:

  • 2017 (version: )
  • 2019 (version: )
  • for Mac (version: )

Relevant plugins:

  • Resharper (version: )

Anything else we need to know?

@FrozDark FrozDark added kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification. labels Aug 19, 2022
@Xiaoy312 Xiaoy312 added kind/regression Something was working, now it isn't and removed triage/untriaged Indicates an issue requires triaging or verification. labels Dec 23, 2022
@Xiaoy312
Copy link
Contributor

Xiaoy312 commented Dec 23, 2022

Sorry for the late update.

The key is actually MaterialTrueToVisible coming from themes (package: Uno.Material). This was previously keyed as just TrueToVisible. In the toolkit sample app, we have the workaround applied to use the ancient key hence why it is not caught here...
We will be doing a review of converter resources and the likes soon, to address this kind of problem.
edit: GestureInterceptorMargin was a project-specific workaround that got slipped in.
edit20230117: the part about GestureInterceptorMargin is wrong, it is meant to be here.

In the mean time, you can redefine the same resources highlighted here: https://github.com/unoplatform/Uno.Themes/blob/release/stable/2.4/src/library/Uno.Material/Styles/Application/Common/Converters.xaml#L5-L45
without the said prefix in your app.

GitHub
This library is designed to help you use the material design system with the Uno Platform - Uno.Themes/Converters.xaml at release/stable/2.4 · unoplatform/Uno.Themes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working kind/regression Something was working, now it isn't
Projects
None yet
Development

No branches or pull requests

3 participants