DefaultPlatformModeDetector class¶
Defined in
Namespace: Splat Assembly: Splat.Drawing.dll Full name: Splat.DefaultPlatformModeDetector Modifiers: public
Summary¶
View source (opens in a new tab)
Provides a default implementation for detecting whether the application is running in design mode.
Applies to
net11.0, net11.0-maccatalyst27.2, net11.0-windows10.0.19041, net11.0-android37.0, net11.0-macos27.2, net11.0-tvos27.2, net11.0-ios27.2, net10.0, net10.0-windows10.0.19041, net10.0-android36.0, net10.0-tvos26.0, net10.0-macos26.0, net10.0-ios26.0, net10.0-maccatalyst26.0, net10.0-windows10.0.17763, net48, net47, net472, net471, net481
Class hierarchy
classDiagram
class DefaultPlatformModeDetector
class IPlatformModeDetector {
<<interface>>
}
IPlatformModeDetector <|.. DefaultPlatformModeDetector
Implements: IPlatformModeDetector
Remarks¶
This class is typically used to determine if code is executing within a designer environment, such as Visual Studio or Blend, to enable or disable design-time specific logic. The detection result is memoized, so a process that starts outside a designer never re-runs the probes. Thread safety is not guaranteed.
Which probes are compiled depends on the target framework. Splat.Drawing sets UseWPF and UseWindowsForms for the .NET Framework and Windows-specific targets, so those builds call the WPF designer API directly instead of reflecting over it. The target-framework-neutral builds keep a reflective probe, because a Windows desktop application resolves to them when its own platform version predates the Windows-specific targets. The Android and Apple targets cannot host a XAML designer at all and compile no designer probe.
Constructors¶
| Name | Summary |
|---|---|
| .ctor |
Methods¶
| Name | Summary |
|---|---|
| InDesignMode | Gets a value indicating whether the current library or application is running in a GUI design mode tool. |
Inherited members
System.Object.Equals(System.Object)(opens in a new tab)System.Object.Equals(System.Object,System.Object)(opens in a new tab)System.Object.GetHashCode(opens in a new tab)System.Object.GetType(opens in a new tab)System.Object.MemberwiseClone(opens in a new tab)System.Object.ReferenceEquals(System.Object,System.Object)(opens in a new tab)System.Object.ToString(opens in a new tab)