Multi attach a same Style with AdaptiveTrigger
- Dominant language
- C#
- Stars
- 23.3k
- Forks
- 2k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 290
Description
### Description

Only last element successful to attach with Style.
I tried using x:Key with Style={StaticResource }

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
```shell
No
```
Contributor guide
Research direction
Start with the public reproduction project and the App.cs and MainPage.xaml.cs entry points, then run the AdaptiveTrigger case on the Android emulator and Windows. Compare applying one shared Style to multiple elements with the working OrientationStateTrigger and DeviceStateTrigger cases. Done means the same Style applies successfully to every target element across the reported platforms.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop-dev, frontend, mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100