microsoft-ui-xaml icon indicating copy to clipboard operation
microsoft-ui-xaml copied to clipboard

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

Open fabianoriccardi opened this issue 1 year ago • 4 comments

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

fabianoriccardi avatar Aug 27 '24 17:08 fabianoriccardi

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)

JohnnyWestlake avatar Aug 28 '24 10:08 JohnnyWestlake

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.

fabianoriccardi avatar Aug 28 '24 13:08 fabianoriccardi

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.

codendone avatar Aug 29 '24 16:08 codendone

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.

fabianoriccardi avatar Aug 29 '24 17:08 fabianoriccardi