Table of Contents

Interface IDynamicDataContext

Namespace
BSGameLib.UI
Assembly
BSGameLib.UI.dll

A data context whose bound values are looked up by name at runtime rather than reflected off CLR properties. BSGameLib.UI.Internal.BindingManager checks for this before falling back to reflection, so an implementor does not need a real property per binding.

Exists for design-time preview data (see DesignTimeDataContext), where instantiating the real view model is not possible - a view model's constructor routinely touches game singletons that only exist inside a running client.

public interface IDynamicDataContext

Methods

TryGetValue(string, out object)

Looks up a bound value. Returning false falls through to normal reflection, so a partial context can supply only the values it knows about.

bool TryGetValue(string propertyName, out object value)

Parameters

propertyName string
value object

Returns

bool

TrySetValue(string, object)

Stores a value written back by a two-way bound control (a text box being typed into). Returning false falls through to reflection.

bool TrySetValue(string propertyName, object value)

Parameters

propertyName string
value object

Returns

bool