AdaptiveTriggerLibrary icon indicating copy to clipboard operation
AdaptiveTriggerLibrary copied to clipboard

MultiTriggers not performing as expected when used in several visual states

Open mrovcanin opened this issue 6 years ago • 0 comments

Hello,

I have noticed that visual states cannot be resolved in the following situation:

2019-12-03 14_06_18-PEAKnx Visu - Microsoft Visual Studio  (Administrator)

Namely, If two states have exactly the same trigger, as a part of a multitrigger, the state cannot be correctly resolved. I've noticed this because a specific part of my XAML is being loaded only if a specific condition, set using multiple triggers, is met. This part of XAML contains an element that is customized from code behind, but the element remains null even though the conditions are met (scale = 200, orientation = portrait, Portrait_Scale200 state). If I remove the "scale" condition from the Landscape_Scale200 visual state, the app is able to resolve the state and present an appropriate XAML.

Why is this happening and what would be the proper way to setup multtriggers in this particular situation?

mrovcanin avatar Dec 03 '19 13:12 mrovcanin