microsoft / microsoft-ui-xaml

Windows UI Library: the latest Windows 10 native controls and Fluent styles for your applications
MIT License
6.32k stars 677 forks source link

Live Property Explorer doesn't show ActualOffset value (computed values) #9926

Open fabianoriccardi opened 1 month ago

fabianoriccardi commented 1 month ago

Describe the bug

The Live Property Explorer doesn't show the ActualOffset value. I was thinking it was because it is a Vector3, but DesideredSize is correctly shown even if it isn't a scalar value.

Steps to reproduce the bug

Just create a Winui3 project from scratch and check the ActualOffset of the button.

Expected behavior

No response

Screenshots

computed_properties

NuGet package version

WinUI 3 - Windows App SDK 1.5.6: 1.5.240802000

Windows version

Windows 10 (21H2): Build 19044

Additional context

Visual Studio 17.11.2

JohnnyWestlake commented 1 month ago

ActualOffset & ActualSize are composition properties and so only exist if you request a Composition visual for the property (or use a composition based value on the FrameworkElement)

fabianoriccardi commented 1 month ago

May you be more clear? I don't know about Composition Properties.

I only know that if I set a Margin of a FrameworkElement, I can observe that ActualOffset change as expected, but in Live Property Explorer is always 0.

codendone commented 1 month ago

ActualOffset and a few other properties on UIElement are what we call "simple properties", which are lighter weight properties not backed by a full DependencyProperty. Live Property Explorer should be made aware of these simple properties.

fabianoriccardi commented 1 month ago

Got it. Do you think it is very hard to implement my request given the actual state of things?

I was developing a UI component (with subcomponents which are going to move around), and to debug it would be very useful having such feature.