Table of Contents

Class PlatformModeDetector

Namespace
Splat
Assembly
Splat.Drawing.dll

Provides methods to detect whether the application is running in design mode, such as within a GUI design editor. Allows overriding the platform mode detection logic for customization or testing purposes.

public static class PlatformModeDetector
Inheritance
PlatformModeDetector

Remarks

This class is intended for use in scenarios where it is necessary to distinguish between design-time and run-time environments, such as when developing custom controls or components. The detection logic can be overridden to support different platforms or testing requirements. All members are thread-safe for typical usage patterns.

Methods

InDesignMode()

Gets a value indicating whether we are currently running from within a GUI design editor.

public static bool InDesignMode()

Returns

bool

If we are currently running from design mode.

OverrideModeDetector(IPlatformModeDetector)

Overrides the mode detector with one of your own provided ones.

public static void OverrideModeDetector(IPlatformModeDetector modeDetector)

Parameters

modeDetector IPlatformModeDetector

The mode detector to use.