Repository navigation
Closed
Labels
difficulty/starter 🚀Categorizes an issue for which the difficulty level is reachable by newcomerskind/bugSomething isn't workingtriage/potentially-fixedCategorizes an issue as potentially fixed by some unlinked PR, fix needs to be verified
Description
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.
Expected behavior
The VS designer must show the rendered XAML.
How to reproduce it (as minimally and precisely as possible)
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) |
Metadata
Metadata
Assignees
Labels
difficulty/starter 🚀Categorizes an issue for which the difficulty level is reachable by newcomerskind/bugSomething isn't workingtriage/potentially-fixedCategorizes an issue as potentially fixed by some unlinked PR, fix needs to be verified

Activity
Youssef1313 commentedon Sep 16, 2021
Instead of introducing a breaking change, why this is not considered a bug in VS designer?
Youssef1313 commentedon May 3, 2023
The designer isn't working at all for me in a plain new UWP project:
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:
In the issue, it used to have a squiggly warning, so something might have already been fixed in Visual Studio.
[-]UIElementExtensions.Elevation breaks VS designer[/-][+]`UIElementExtensions.Elevation` breaks VS designer[/+]MartinZikmund commentedon Jul 10, 2023
So maybe this can be closed now? The designer is not even planned for WinUI so far...
jeromelaban commentedon Jul 11, 2023
Yes, let's close for now.