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

UIElementExtensions.Elevation breaks VS designer #5513

Closed
2 of 24 tasks
Tracked by #8339
artemious7 opened this issue Mar 18, 2021 · 4 comments
Closed
2 of 24 tasks
Tracked by #8339

UIElementExtensions.Elevation breaks VS designer #5513

artemious7 opened this issue Mar 18, 2021 · 4 comments
Labels
difficulty/starter 🚀 Categorizes an issue for which the difficulty level is reachable by newcomers kind/bug Something isn't working triage/potentially-fixed Categorizes an issue as potentially fixed by some unlinked PR, fix needs to be verified

Comments

@artemious7
Copy link
Contributor

Current behavior

When setting UIElementExtensions.Elevation attached property for an element, the Visual Studio designer shows an error, but it compiles fine and works fine in a running app.

image

Expected behavior

The VS designer must show the rendered XAML.

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

App4.zip

Set Elevation, build the UWP project, see the error in the VS designer.

Workaround

Set UIElementExtensions.Elevation via code-behind or don't use it at all.

Environment

Nuget Package:

  • Uno.UI
  • Uno.WinUI / Uno.WinUI.WebAssembly / Uno.WinUI.Skia
  • Uno.SourceGenerationTasks
  • Uno.UI.RemoteControl / Uno.WinUI.RemoteControl
  • Other:

Nuget Package Version(s):

Affected platform(s):

  • iOS
  • Android
  • WebAssembly
  • WebAssembly renderers for Xamarin.Forms
  • macOS
  • Skia
    • WPF
    • GTK (Linux)
    • Tizen
  • Windows
  • Build tasks
  • Solution Templates

IDE:

  • Visual Studio 2017 (version: )
  • Visual Studio 2019 (version: 16.9.2), Version 16.10.0 Preview 1.0
  • Visual Studio for Mac (version: )
  • Rider Windows (version: )
  • Rider macOS (version: )
  • Visual Studio Code (version: )

Relevant plugins:

  • Resharper (version: )

Anything else we need to know?

To fix this, just remove this in this UIElement element. VS doesn't like these are extension methods.

public static void SetElevation(this UIElement element, double elevation)

public static double GetElevation(this UIElement element)

@artemious7 artemious7 added difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification labels Mar 18, 2021
@MartinZikmund MartinZikmund added difficulty/starter 🚀 Categorizes an issue for which the difficulty level is reachable by newcomers and removed difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. triage/untriaged Indicates an issue requires triaging or verification labels Jun 10, 2021
@Youssef1313
Copy link
Member

Instead of introducing a breaking change, why this is not considered a bug in VS designer?

@Youssef1313
Copy link
Member

The designer isn't working at all for me in a plain new UWP project:

image

Also it looks like WinUI doesn't even support a designer yet? microsoft/microsoft-ui-xaml#5917

It's worth noting that the code doesn't give IntelliSense warnings:

image

In the issue, it used to have a squiggly warning, so something might have already been fixed in Visual Studio.

@MartinZikmund MartinZikmund changed the title UIElementExtensions.Elevation breaks VS designer UIElementExtensions.Elevation breaks VS designer Jul 10, 2023
@MartinZikmund
Copy link
Member

So maybe this can be closed now? The designer is not even planned for WinUI so far...

@MartinZikmund MartinZikmund added the triage/potentially-fixed Categorizes an issue as potentially fixed by some unlinked PR, fix needs to be verified label Jul 10, 2023
@jeromelaban
Copy link
Member

Yes, let's close for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty/starter 🚀 Categorizes an issue for which the difficulty level is reachable by newcomers kind/bug Something isn't working triage/potentially-fixed Categorizes an issue as potentially fixed by some unlinked PR, fix needs to be verified
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants