dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.21k stars 1.75k forks source link

Multi attach a same Style with AdaptiveTrigger #11030

Open inpro160 opened 2 years ago

inpro160 commented 2 years ago

Description

image

Only last element successful to attach with Style.

I tried using x:Key with Style={StaticResource } image

I wondered whether is element issues. So I tried to replace BoxView, StackLayout, and etc with Label and get same result.

It will work fine if property write it to element one by one. It will work fine if I control the property into .cs file. It will work fine if multi attach a same Style with other Trigger such as OrientationStateTrigger and DeviceStateTrigger.

Steps to Reproduce

  1. Create a Maui Project (No matter .Net6 / .Net7)
  2. Go to App.cs change the code ( MainPage = new MainPage(); )
  3. Go to MainPage.xaml.cs and Remove whole content in scrollview and Write the code at above
  4. Build it in Android emulator (Galaxy Nexus for testing MinWindowWidth = 360 ) (Tablet M-DPI 7'' for testing MinWindowWidth = 600)

Link to public reproduction project repository

https://github.com/inpro160/NewAppNet7

Version with bug

7.0 Release Candidate 1

Last version that worked well

Unknown/Other

Affected platforms

Android, Windows

Affected platform versions

Android10, Window11, I didn't test on other platforms.

Did you find any workaround?

No

Relevant log output

No
ghost commented 2 years ago

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

homeyf commented 1 year ago

Verified this issue with Visual Studio Enterprise 17.7.0 Preview 1.0. Can repro on android platform with above project. https://github.com/inpro160/NewAppNet7 image