-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OrientationStateTrigger does not work if in the setters of the state TargetName is used #22001
Comments
Verified this issue with Visual Studio 17.10.0 Preview 4(8.0.20&8.0.14). Can repro on iOS and Android platforms with sample project. |
the scoping issue can be solved by moving the VSM one level higher (at the Page level). The original visibility is then correct. Trying to reproduce the orientation change in a unit test to make sure this workaround works, before figuring out if it's possible to fix the original issue, or not |
yes, that's it. as a workaround, move the VSM at the page level and everything works. |
when an element doesn't override the NameScope (DataTemplate, etc...) FindName fails until the element is parented. this PR sets a field (less expensive than a BP) used only during that time, and allow VSM to be applied. - fixes #22001
when an element doesn't override the NameScope (DataTemplate, etc...) FindName fails until the element is parented. this PR sets a field (less expensive than a BP) used only during that time, and allow VSM to be applied. - fixes #22001
when an element doesn't override the NameScope (DataTemplate, etc...) FindName fails until the element is parented. this PR sets a field (less expensive than a BP) used only during that time, and allow VSM to be applied. - fixes #22001
when an element doesn't override the NameScope (DataTemplate, etc...) FindName fails until the element is parented. this PR sets a field (less expensive than a BP) used only during that time, and allow VSM to be applied. - fixes #22001
when an element doesn't override the NameScope (DataTemplate, etc...) FindName fails until the element is parented. this PR sets a field (less expensive than a BP) used only during that time, and allow VSM to be applied. - fixes #22001
when an element doesn't override the NameScope (DataTemplate, etc...) FindName fails until the element is parented. this PR sets a field (less expensive than a BP) used only during that time, and allow VSM to be applied. - fixes #22001
when an element doesn't override the NameScope (DataTemplate, etc...) FindName fails until the element is parented. this PR sets a field (less expensive than a BP) used only during that time, and allow VSM to be applied. - fixes #22001
when an element doesn't override the NameScope (DataTemplate, etc...) FindName fails until the element is parented. this PR sets a field (less expensive than a BP) used only during that time, and allow VSM to be applied. - fixes #22001
when an element doesn't override the NameScope (DataTemplate, etc...) FindName fails until the element is parented. this PR sets a field (less expensive than a BP) used only during that time, and allow VSM to be applied. - fixes #22001
when an element doesn't override the NameScope (DataTemplate, etc...) FindName fails until the element is parented. this PR sets a field (less expensive than a BP) used only during that time, and allow VSM to be applied. - fixes #22001
…#25075) * [X] allow namescope resolution before parenting when an element doesn't override the NameScope (DataTemplate, etc...) FindName fails until the element is parented. this PR sets a field (less expensive than a BP) used only during that time, and allow VSM to be applied. - fixes #22001 * fix * fixes #16208 --------- Co-authored-by: Stephane Delcroix <stephane@delcroix.org>
* [X] allow namescope resolution before parenting when an element doesn't override the NameScope (DataTemplate, etc...) FindName fails until the element is parented. this PR sets a field (less expensive than a BP) used only during that time, and allow VSM to be applied. - fixes #22001 * fix * fixes #16208
* [X] allow namescope resolution before parenting when an element doesn't override the NameScope (DataTemplate, etc...) FindName fails until the element is parented. this PR sets a field (less expensive than a BP) used only during that time, and allow VSM to be applied. - fixes #22001 * fix * fixes #16208
Description
Using OrientationStateTrigger with some setters using TargetName does not work properly/ crashes the app. This depends if the debug is attached or not.
Steps to Reproduce
Expected behavior: The layout should change accordingly with the specified setters and app should not crash.
Link to public reproduction project repository
https://github.com/flesarradu/SimpleVisualStateManager
Version with bug
8.0.14 SR3.1
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
iOS, Android
Affected platform versions
No response
Did you find any workaround?
Try not to use TargetName in Setter, however this means for each control you need to define again and again the states instead of having just one place to define all the needed changes.
Relevant log output
No response
The text was updated successfully, but these errors were encountered: