Method GetScheme
GetScheme()
Gets the scheme for the View. If the scheme has not been explicitly set (see HasScheme), gets the SuperView's scheme or falls back to the base scheme.
public Scheme GetScheme()
Returns
- Scheme
The resolved scheme, never null.
Examples
view.GettingScheme += (sender, args) =>
{
args.Result = SchemeManager.GetScheme("Custom");
args.Handled = true;
};
Scheme scheme = view.GetScheme();
Remarks
This method uses the Cancellable Work Pattern (CWP) via ExecuteWithResult<TResult>(Func<ResultEventArgs<TResult>, bool>, EventHandler<ResultEventArgs<TResult>>?, ResultEventArgs<TResult>, Func<TResult>) to allow customization or cancellation of scheme resolution through the OnGettingScheme(out Scheme?) method and GettingScheme event.