Class DesignerSupport
- Namespace
- SharpVectors.Renderers.Wpf
- Assembly
- SharpVectors.Runtime.Wpf.dll
Provides utilities for WPF designer-time support and detection. This class handles design-time vs runtime detection, URI resolution, assembly context management, and diagnostic information.
public static class DesignerSupport
- Inheritance
-
DesignerSupport
- Inherited Members
Methods
- ClearCache()
Clears the cached design mode detection result. Useful for testing or when design context changes.
- CreatePlaceholder(string)
Creates a placeholder DrawingImage for display when actual SVG cannot be loaded in designer.
- ExecuteWithTimeout(Action, int)
Executes an action with timeout protection, useful for preventing designer hangs.
- ExecuteWithTimeout<T>(Func<T>, T, int)
Executes a function with timeout protection, useful for preventing designer hangs.
- GetDesignTimeResourceAssembly()
Gets the appropriate assembly to use for resource resolution in design mode. Implements intelligent fallback to find the actual application assembly, not the designer process assembly.
- GetDiagnosticInfo()
Provides comprehensive diagnostic information about the current design-time context.
- IsInDesignMode()
Determines if code is running in the WPF designer with multi-level fallback detection. Uses process name, environment variables, and DesignerProperties as fallback.
- OutputDiagnostics()
Outputs diagnostic information to the debug output.
- ResolveSvgUri(Uri, Assembly)
Resolves an SVG URI in design-time context, handling pack URIs, relative paths, and remote sources.