[Feature] Add missing state triggers: DeviceFamilyStateTrigger, OrientationStateTrigger. Required for Uno and for tablets #4643
Replies: 12 comments
-
Hello, 'xperiandri! Thanks for submitting a new feature request. I've automatically added a vote 👍 reaction to help get things started. Other community members can vote to help us prioritize this feature in the future! |
Beta Was this translation helpful? Give feedback.
-
@xperiandri 7.0.1 isn't introducing new features, it's just a quick hotfix for bugs identified after shipping 7.0. We also have the OnDeviceExtension, though that may not work for all scenarios like this. @dotMorten is there a reason you didn't bring these over initially? |
Beta Was this translation helpful? Give feedback.
-
Yes there was a reason. I fail to remember what they were though 🤦♂️ |
Beta Was this translation helpful? Give feedback.
-
I think the orientationstatetrigger didn't make sense any longer without a phone - the width/height ratio was a much better way to do your UI. IE what really matters is the aspect ratio of your window, rather than the host OS' window orientation. Also consider a multi-monitor setup, where you might have one monitor in portrait mode, it doesn't make sense to change your layout just by dragging the window across monitors. |
Beta Was this translation helpful? Give feedback.
-
Looks like I actually doc'ed why I didn't bring them over. See my comment here: #413 (comment) |
Beta Was this translation helpful? Give feedback.
-
I thought that it only works on tablets in Tablet mode. Isn't it? |
Beta Was this translation helpful? Give feedback.
-
@dotMorten, I read that. |
Beta Was this translation helpful? Give feedback.
-
Actually, if you are completely against that we can add them to the Uno version of WCT without impacting the original WCT at all... |
Beta Was this translation helpful? Give feedback.
-
Uno was not a factor at all when I was writing that. |
Beta Was this translation helpful? Give feedback.
-
I understand 🙂 |
Beta Was this translation helpful? Give feedback.
-
I still think orientation state trigger should be a bit different. I'd rather we talk about a window in portrait size vs landscape size, and not so much about the device. I think that translates better to both desktop and mobile. Also my phone can show two apps size by side, so in portrait mode you get two small landscaping views |
Beta Was this translation helpful? Give feedback.
-
For dual screen, there is a special control available. I've currently did |
Beta Was this translation helpful? Give feedback.
-
Add DeviceFamilyStateTrigger and OrientationStateTrigger and issue 7.0.1 version of WCT with them
Describe the problem this feature would solve
If you have a look at my samples https://github.com/xperiandri/Elmish.Uno/blob/uno/src/Samples/Samples.Shared/Components/Counter.xaml you will see the scenario of OrientationStateTrigger
Also DeviceFamilyStateTrigger would be useful in Uno development.
In order to be usable in Uno version of WCT these triggers must exist in the original WCT.
Describe the solution
Add
https://github.com/dotMorten/WindowsStateTriggers/blob/main/src/WindowsStateTriggers/OrientationStateTrigger.cs
and
https://github.com/dotMorten/WindowsStateTriggers/blob/main/src/WindowsStateTriggers/DeviceFamilyStateTrigger.cs
@michael-hawker
Beta Was this translation helpful? Give feedback.
All reactions