Class ChromeContext
Layout/presentation context cascaded through a UI subtree. FieldContext
extends it with entity-binding state; use Derive to layer modifications while preserving the
runtime type, or AsChrome to drop down to a plain chrome context.
public class ChromeContext
- Inheritance
-
ChromeContext
- Derived
- Inherited Members
- Extension Methods
Constructors
ChromeContext(bool, bool, bool)
Layout/presentation context cascaded through a UI subtree. FieldContext
extends it with entity-binding state; use Derive to layer modifications while preserving the
runtime type, or AsChrome to drop down to a plain chrome context.
public ChromeContext(bool isEmbedded = false, bool isLowDensity = false, bool adminMode = false)
Parameters
Properties
AdminMode
True when admin-only fields should be shown (subject to the current principal's admin role).
public bool AdminMode { get; }
Property Value
IsEmbedded
True when this context is nested inside another field context (renders without top-level chrome).
public bool IsEmbedded { get; }
Property Value
IsLowDensity
True in the comfortable (consumer) density register: taller, touch-friendly rows.
public bool IsLowDensity { get; }
Property Value
Methods
AsChrome(bool?, bool?, bool?)
Copy the layout flags into a plain chrome context, dropping any entity binding. Use when embedding a list or grid inside an edit form: the rows must build their own field contexts.
public ChromeContext AsChrome(bool? embedded = null, bool? lowDensity = null, bool? adminMode = null)
Parameters
Returns
Derive(bool?, bool?, bool?)
Layer chrome modifications, preserving everything not overridden. The runtime type is preserved: deriving from a FieldContext returns a field context.
public virtual ChromeContext Derive(bool? embedded = null, bool? lowDensity = null, bool? adminMode = null)