You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug PlatformModeDetector.InDesignMode() returns incorrect information when used in controls that are used within a control you are working on in the WPF designer.
Steps To Reproduce
Provide the steps to reproduce the behavior:
Create UserControlA with an OnLoaded event handler guarded by PlatformModeDetector.InDesignMode() throwing an exception when left through
Create UserControlB that has UserControlA hosted somewhere within it
Observe the WPF designer with Control display option: Show all controls
Expected behavior
Designer works
Screenshots
Designer shows an error with a stacktrace leading up to the exception created in step 1 in the OnLoaded event handler.
Environment
OS: Windows 10
Version: 21H1
Device: x64
Splat: 13.1.42
Additional context
The built in WPF method DesignerProperties.GetIsInDesignMode(this) just works, when that is used instead in the event handler of UserControlA things that should not be run in design mode are skipped.
The text was updated successfully, but these errors were encountered:
Describe the bug
PlatformModeDetector.InDesignMode()
returns incorrect information when used in controls that are used within a control you are working on in the WPF designer.Steps To Reproduce
Provide the steps to reproduce the behavior:
UserControlA
with anOnLoaded
event handler guarded byPlatformModeDetector.InDesignMode()
throwing an exception when left throughUserControlB
that hasUserControlA
hosted somewhere within itExpected behavior
Designer works
Screenshots
Designer shows an error with a stacktrace leading up to the exception created in step 1 in the
OnLoaded
event handler.Environment
Additional context
The built in WPF method
DesignerProperties.GetIsInDesignMode(this)
just works, when that is used instead in the event handler ofUserControlA
things that should not be run in design mode are skipped.The text was updated successfully, but these errors were encountered: