Table of Contents

Class ChromeContext

Namespace
The.Web.Controls
Assembly
Instagile.Web.Client.dll

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

isEmbedded bool
isLowDensity bool
adminMode bool

Properties

AdminMode

True when admin-only fields should be shown (subject to the current principal's admin role).

public bool AdminMode { get; }

Property Value

bool

IsEmbedded

True when this context is nested inside another field context (renders without top-level chrome).

public bool IsEmbedded { get; }

Property Value

bool

IsLowDensity

True in the comfortable (consumer) density register: taller, touch-friendly rows.

public bool IsLowDensity { get; }

Property Value

bool

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

embedded bool?
lowDensity bool?
adminMode bool?

Returns

ChromeContext

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)

Parameters

embedded bool?
lowDensity bool?
adminMode bool?

Returns

ChromeContext