CommunityToolkit / WindowsCommunityToolkit

The Windows Community Toolkit is a collection of helpers, extensions, and custom controls. It simplifies and demonstrates common developer tasks building .NET apps with UWP and the Windows App SDK / WinUI 3 for Windows 10 and Windows 11. The toolkit is part of the .NET Foundation.
https://docs.microsoft.com/windows/communitytoolkit/
Other
5.88k stars 1.38k forks source link

Horizontal/VerticalAlignment bindings don't work in Sample App Release Mode #3343

Open michael-hawker opened 4 years ago

michael-hawker commented 4 years ago

Describe the bug

We noticed (even in the 6.0 version) that the Sample App in Release mode doesn't properly bind the Horizontal/VerticalAlignment enums in our properties panel. It works fine in Debug, so it's quite baffling.

This really seems related to .NET Native somehow. We're thinking we can test our WinUI 3 version for comparison on top of .NET 5 to maybe get some more insights.

For now we've removed these options from the samples that are effected (see https://github.com/windows-toolkit/WindowsCommunityToolkit/pull/3344)

Steps to Reproduce

Steps to reproduce the behavior:

  1. Checkout a commit prior to the linked one
  2. Build sample app in release mode
  3. Open GridSplitter Sample
  4. See that splitter is centered instead of left aligned

Expected behavior

Splitter should be bound to HorizontalAlignment Left

image

Screenshots

image

Environment

NuGet Package(s): 

Package Version(s): 

Windows 10 Build Number:
- [ ] Fall Creators Update (16299)
- [ ] April 2018 Update (17134)
- [ ] October 2018 Update (17763)
- [ ] May 2019 Update (18362)
- [ ] May 2020 Update (19041)
- [ ] Insider Build (build number: )

App min and target version:
- [ ] Fall Creators Update (16299)
- [ ] April 2018 Update (17134)
- [ ] October 2018 Update (17763)
- [ ] May 2019 Update (18362)
- [ ] Insider Build (xxxxx)

Device form factor:
- [ ] Desktop
- [ ] Xbox
- [ ] Surface Hub
- [ ] IoT

Visual Studio 
- [ ] 2017 (version: )
- [ ] 2019 (version: ) 
- [ ] 2019 Preview (version: )

Additional context

Add any other context about the problem here.

ghost commented 4 years ago

Hello michael-hawker, thank you for opening an issue with us!

I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 🙌

michael-hawker commented 3 years ago

Moving to 7.1 as the sample itself is working fine as we removed the binding. We need a deeper investigation of what's going on here when binding is enabled. Seems like a good thing to tackle in 7.1 sample app work.