-
Notifications
You must be signed in to change notification settings - Fork 31
Forge.Forms.FormBuilding
public class Forge.Forms.FormBuilding.BindingOptionsProperties
| Type | Name | Summary |
|---|---|---|
CultureInfo |
ConverterCulture | |
Int32 |
Delay | |
String |
StringFormat | |
UpdateSourceTrigger |
UpdateSourceTrigger | |
Boolean |
ValidatesOnDataErrors | |
Boolean |
ValidatesOnExceptions | |
Boolean |
ValidatesOnNotifyDataErrors |
Methods
| Type | Name | Summary |
|---|---|---|
void |
Apply(Binding binding) |
Default implementation of Forge.Forms.FormBuilding.IBindingProvider.
public abstract class Forge.Forms.FormBuilding.BindingProvider
: Control, IResource, IAnimatable, IInputElement, IFrameworkInputElement, ISupportInitialize, IHaveResources, IQueryAmbient, IBindingProviderProperties
| Type | Name | Summary |
|---|---|---|
IResourceContext |
Context | Gets the context associated with the form control. |
IDictionary<String, IValueProvider> |
FieldResources | Gets the field resources identified by name. |
IDictionary<String, IValueProvider> |
FormResources | Gets the form resources identified by name. |
BindingProxy |
Item | Returns a Forge.Forms.DynamicExpressions.BindingProxy bound to the value returned by Forge.Forms.FormBuilding.BindingProvider.ProvideValue(System.String). |
Boolean |
ThrowOnNotFound | Gets whether this object will throw when a resource is not found. |
Methods
| Type | Name | Summary |
|---|---|---|
void |
BindingCreated(BindingExpressionBase expression, String resource) |
|
Object |
ProvideValue(String name) |
Resolves the value for the specified resource. The result may be a System.Windows.Data.BindingBase or a literal value. |
public abstract class Forge.Forms.FormBuilding.ContentElement
: FormElementProperties
| Type | Name | Summary |
|---|---|---|
IValueProvider |
Content | |
IValueProvider |
Icon | |
IValueProvider |
IconPadding |
Methods
| Type | Name | Summary |
|---|---|---|
void |
Freeze() |
public static class Forge.Forms.FormBuilding.ConversionCultureStatic Fields
| Type | Name | Summary |
|---|---|---|
Dictionary<String, CultureInfo> |
CustomCultures | Stores custom cultures which can be used for date and number conversion. |
Static Methods
| Type | Name | Summary |
|---|---|---|
CultureInfo |
Get(String name) |
|
void |
Set(String name, CultureInfo cultureInfo) |
Base class for all input fields.
public abstract class Forge.Forms.FormBuilding.DataFormField
: FormFieldProperties
| Type | Name | Summary |
|---|---|---|
BindingOptions |
BindingOptions | |
Boolean |
CreateBinding | |
IValueProvider |
DefaultValue | Gets or sets the default value for this field. |
Boolean |
IsDirectBinding | |
IValueProvider |
IsReadOnly | |
Type |
PropertyType | |
IValueProvider |
SelectOnFocus | |
List<IValidatorProvider> |
Validators |
Methods
| Type | Name | Summary |
|---|---|---|
void |
Freeze() | |
Object |
GetDefaultValue(IResourceContext context) |
public static class Forge.Forms.FormBuilding.DeserializersStatic Methods
| Type | Name | Summary |
|---|---|---|
Object |
Boolean(String expression) |
|
Object |
Boolean(String expression, CultureInfo culture) |
|
Object |
Byte(String expression) |
|
Object |
Byte(String expression, CultureInfo culture) |
|
Object |
Char(String expression) |
|
Object |
Char(String expression, CultureInfo culture) |
|
Object |
CultureInvariantBoolean(String expression, CultureInfo culture) |
|
Object |
CultureInvariantByte(String expression, CultureInfo culture) |
|
Object |
CultureInvariantChar(String expression, CultureInfo culture) |
|
Object |
CultureInvariantDateTime(String expression, CultureInfo culture) |
|
Object |
CultureInvariantDecimal(String expression, CultureInfo culture) |
|
Object |
CultureInvariantDouble(String expression, CultureInfo culture) |
|
Object |
CultureInvariantInt16(String expression, CultureInfo culture) |
|
Object |
CultureInvariantInt32(String expression, CultureInfo culture) |
|
Object |
CultureInvariantInt64(String expression, CultureInfo culture) |
|
Object |
CultureInvariantNullableBoolean(String expression, CultureInfo culture) |
|
Object |
CultureInvariantNullableByte(String expression, CultureInfo culture) |
|
Object |
CultureInvariantNullableChar(String expression, CultureInfo culture) |
|
Object |
CultureInvariantNullableDateTime(String expression, CultureInfo culture) |
|
Object |
CultureInvariantNullableDecimal(String expression, CultureInfo culture) |
|
Object |
CultureInvariantNullableDouble(String expression, CultureInfo culture) |
|
Object |
CultureInvariantNullableInt16(String expression, CultureInfo culture) |
|
Object |
CultureInvariantNullableInt32(String expression, CultureInfo culture) |
|
Object |
CultureInvariantNullableInt64(String expression, CultureInfo culture) |
|
Object |
CultureInvariantNullableSByte(String expression, CultureInfo culture) |
|
Object |
CultureInvariantNullableSingle(String expression, CultureInfo culture) |
|
Object |
CultureInvariantNullableUInt16(String expression, CultureInfo culture) |
|
Object |
CultureInvariantNullableUInt32(String expression, CultureInfo culture) |
|
Object |
CultureInvariantNullableUInt64(String expression, CultureInfo culture) |
|
Object |
CultureInvariantSByte(String expression, CultureInfo culture) |
|
Object |
CultureInvariantSingle(String expression, CultureInfo culture) |
|
Object |
CultureInvariantUInt16(String expression, CultureInfo culture) |
|
Object |
CultureInvariantUInt32(String expression, CultureInfo culture) |
|
Object |
CultureInvariantUInt64(String expression, CultureInfo culture) |
|
Object |
DateTime(String expression) |
|
Object |
DateTime(String expression, CultureInfo culture) |
|
Object |
Decimal(String expression) |
|
Object |
Decimal(String expression, CultureInfo culture) |
|
Object |
Double(String expression) |
|
Object |
Double(String expression, CultureInfo culture) |
|
Func<String, Object> |
Enum() | |
Func<String, Object> |
Enum(Type enumType) |
|
Func<String, Object> |
Enum(Type enumType, Boolean ignoreCase) |
|
Object |
Int16(String expression) |
|
Object |
Int16(String expression, CultureInfo culture) |
|
Object |
Int32(String expression) |
|
Object |
Int32(String expression, CultureInfo culture) |
|
Object |
Int64(String expression) |
|
Object |
Int64(String expression, CultureInfo culture) |
|
Object |
NullableBoolean(String expression) |
|
Object |
NullableBoolean(String expression, CultureInfo culture) |
|
Object |
NullableByte(String expression) |
|
Object |
NullableByte(String expression, CultureInfo culture) |
|
Object |
NullableChar(String expression) |
|
Object |
NullableChar(String expression, CultureInfo culture) |
|
Object |
NullableDateTime(String expression) |
|
Object |
NullableDateTime(String expression, CultureInfo culture) |
|
Object |
NullableDecimal(String expression) |
|
Object |
NullableDecimal(String expression, CultureInfo culture) |
|
Object |
NullableDouble(String expression) |
|
Object |
NullableDouble(String expression, CultureInfo culture) |
|
Object |
NullableInt16(String expression) |
|
Object |
NullableInt16(String expression, CultureInfo culture) |
|
Object |
NullableInt32(String expression) |
|
Object |
NullableInt32(String expression, CultureInfo culture) |
|
Object |
NullableInt64(String expression) |
|
Object |
NullableInt64(String expression, CultureInfo culture) |
|
Object |
NullableSByte(String expression) |
|
Object |
NullableSByte(String expression, CultureInfo culture) |
|
Object |
NullableSingle(String expression) |
|
Object |
NullableSingle(String expression, CultureInfo culture) |
|
Object |
NullableUInt16(String expression) |
|
Object |
NullableUInt16(String expression, CultureInfo culture) |
|
Object |
NullableUInt32(String expression) |
|
Object |
NullableUInt32(String expression, CultureInfo culture) |
|
Object |
NullableUInt64(String expression) |
|
Object |
NullableUInt64(String expression, CultureInfo culture) |
|
Object |
SByte(String expression) |
|
Object |
SByte(String expression, CultureInfo culture) |
|
Object |
Single(String expression) |
|
Object |
Single(String expression, CultureInfo culture) |
|
Object |
String(String expression) |
|
Object |
UInt16(String expression) |
|
Object |
UInt16(String expression, CultureInfo culture) |
|
Object |
UInt32(String expression) |
|
Object |
UInt32(String expression, CultureInfo culture) |
|
Object |
UInt64(String expression) |
|
Object |
UInt64(String expression, CultureInfo culture) |
public class Forge.Forms.FormBuilding.DynamicProperty
: IFormPropertyProperties
| Type | Name | Summary |
|---|---|---|
Boolean |
CanWrite | |
Type |
DeclaringType | |
String |
Name | |
Type |
PropertyType |
Methods
| Type | Name | Summary |
|---|---|---|
T |
GetCustomAttribute() | |
IEnumerable<T> |
GetCustomAttributes() |
Markup extension for creating deferred bindings.
public class Forge.Forms.FormBuilding.FormBindingExtension
: MarkupExtensionProperties
| Type | Name | Summary |
|---|---|---|
String |
Converter | |
String |
Name |
Methods
| Type | Name | Summary |
|---|---|---|
Object |
ProvideValue(IServiceProvider serviceProvider) |
Configurable object responsible for creating form definitions from types.
public class Forge.Forms.FormBuilding.FormBuilder
: IFormBuilderProperties
| Type | Name | Summary |
|---|---|---|
List<IFieldInitializer> |
FieldInitializers | |
Dictionary<Type, IFormDefinition> |
Primitives | Contains prebuilt definitions for primitive types. Types stored here will bypass form generation process. Initially, value types and strings are stored here. |
List<IFieldBuilder> |
PropertyBuilders | Gets the list of registered field builders which are queried first. |
Dictionary<Type, List<IFieldBuilder>> |
TypeBuilders | Gets the mapping of types to respective field builders. These are queried if no field builder from Forge.Forms.FormBuilding.FormBuilder.PropertyBuilders succeeds in creating an element. |
Dictionary<Type, Func<String, Object>> |
TypeDeserializers | Stores functions to parse string representations of types. |
Dictionary<String, Type> |
TypeNames |
Methods
| Type | Name | Summary |
|---|---|---|
void |
ClearCache() | Clears cached form definitions. This may be necessary when current configuration has changed. |
Boolean |
ClearCached() | |
IFormDefinition |
GetDefinition(Type type) |
Gets the Forge.Forms.FormBuilding.FormDefinition for the provided type. The cache is looked up first before generating the form. |
IFormDefinition |
GetDefinition(String xml) |
Gets the Forge.Forms.FormBuilding.FormDefinition for the provided type. The cache is looked up first before generating the form. |
Static Fields
| Type | Name | Summary |
|---|---|---|
FormBuilder |
Default | Default instance of Forge.Forms.FormBuilding.FormBuilder. |
Static Methods
| Type | Name | Summary |
|---|---|---|
List<IFieldBuilder> |
<.ctor>g__AsList | 2_0(IFieldBuilder[] builders) |
void |
g__AddRow | 22_0(FormElement formElement, <>c__DisplayClass22_0& = null) |
public class Forge.Forms.FormBuilding.FormDefinition
: IFormDefinitionProperties
| Type | Name | Summary |
|---|---|---|
List<FormRow> |
FormRows | |
Double[] |
Grid | |
Type |
ModelType | |
IDictionary<String, IValueProvider> |
Resources |
Methods
| Type | Name | Summary |
|---|---|---|
Object |
CreateInstance(IResourceContext context) |
|
void |
Freeze() |
Represents a form element, which is not necessarily an input field.
public abstract class Forge.Forms.FormBuilding.FormElementProperties
| Type | Name | Summary |
|---|---|---|
IValueProvider |
InitialFocus | Gets or sets the bool resource that determines whether this element will receive initial focus. |
IValueProvider |
IsVisible | Gets or sets the bool resource that determines whether this element will be visible. |
Position |
LinePosition | |
IDictionary<String, IValueProvider> |
Resources |
Methods
| Type | Name | Summary |
|---|---|---|
IBindingProvider |
CreateBindingProvider(IResourceContext context, IDictionary<String, IValueProvider> formResources) |
|
void |
Freeze() | |
FormElement |
FreezeResources() |
public class Forge.Forms.FormBuilding.FormElementContainerProperties
| Type | Name | Summary |
|---|---|---|
Int32 |
Column | |
Int32 |
ColumnSpan | |
List<FormElement> |
Elements |
public enum Forge.Forms.FormBuilding.FormElementsAlignment
: Enum, IComparable, IFormattable, IConvertibleEnum
| Value | Name | Summary |
|---|---|---|
0 |
Stretch | |
1 |
Left | |
2 |
Right |
Base class for all form field definitions.
public abstract class Forge.Forms.FormBuilding.FormField
: FormElementProperties
| Type | Name | Summary |
|---|---|---|
IValueProvider |
Icon | Gets or sets the field's PackIconKind resource. Not all controls may display an icon. |
String |
Key | Gets or sets the unique name of this field. |
IValueProvider |
Name | Gets or sets the string expression of the field's title. |
IValueProvider |
ToolTip | Gets or sets the string expression of the field's tooltip. |
Methods
| Type | Name | Summary |
|---|---|---|
void |
Freeze() | Finalizes the field state by adding all appropriate values as resources. Changing properties after this method has been called is strongly discouraged. |
public class Forge.Forms.FormBuilding.FormRowProperties
| Type | Name | Summary |
|---|---|---|
List<FormElementContainer> |
Elements | |
Int32 |
RowSpan | |
Boolean |
StartsNewRow |
Provides bindings by resource name.
public interface Forge.Forms.FormBuilding.IBindingProviderProperties
| Type | Name | Summary |
|---|---|---|
BindingProxy |
Item | Returns a Forge.Forms.DynamicExpressions.BindingProxy bound to the value returned by Forge.Forms.FormBuilding.IBindingProvider.ProvideValue(System.String). |
Methods
| Type | Name | Summary |
|---|---|---|
void |
BindingCreated(BindingExpressionBase expression, String resource) |
Gets called when a binding expression is resolved. |
Object |
ProvideValue(String name) |
Resolves the value for the specified resource. The result may be a System.Windows.Data.BindingBase or a literal value. |
public interface Forge.Forms.FormBuilding.IDataBindingProvider
: IBindingProviderMethods
| Type | Name | Summary |
|---|---|---|
void |
ClearBindings() | |
IEnumerable<BindingExpressionBase> |
GetBindings() |
public interface Forge.Forms.FormBuilding.IDynamicFormProperties
| Type | Name | Summary |
|---|---|---|
Object |
Context | |
Object |
Model | |
Object |
Value |
Events
| Type | Name | Summary |
|---|---|---|
EventHandler<ActionEventArgs> |
OnAction |
public interface Forge.Forms.FormBuilding.IEnvironment
: IEnumerable<String>, IEnumerableProperties
| Type | Name | Summary |
|---|---|---|
Boolean |
Item | Returns whether the specified key is contained in this environment. |
Methods
| Type | Name | Summary |
|---|---|---|
Int32 |
Add(IEnumerable<String> values) |
Adds multiple flags to the environment. Offers a performance benefit for bulk insertions. |
Boolean |
Add(String value) |
Adds multiple flags to the environment. Offers a performance benefit for bulk insertions. |
void |
Clear() | Clears all flags from the environment. |
Boolean |
Has(String key) |
Returns true if the flag exists in the environment. |
Int32 |
Remove(IEnumerable<String> values) |
Remove multiple flags from the environment. Offers a performance benefit for bulk deletions. |
Boolean |
Remove(String value) |
Remove multiple flags from the environment. Offers a performance benefit for bulk deletions. |
Intercepts properties and builds form elements if conditions are met.
public interface Forge.Forms.FormBuilding.IFieldBuilderMethods
| Type | Name | Summary |
|---|---|---|
FormElement |
TryBuild(IFormProperty property, Func<String, Object> deserializer) |
Initializes built form fields.
public interface Forge.Forms.FormBuilding.IFieldInitializerMethods
| Type | Name | Summary |
|---|---|---|
void |
Initialize(FormElement element, IFormProperty property, Func<String, Object> deserializer) |
public interface Forge.Forms.FormBuilding.IFormBuilderMethods
| Type | Name | Summary |
|---|---|---|
IFormDefinition |
GetDefinition(Type type) |
public interface Forge.Forms.FormBuilding.IFormDefinitionProperties
| Type | Name | Summary |
|---|---|---|
IReadOnlyList<FormRow> |
FormRows | |
Double[] |
Grid | |
Type |
ModelType | |
IDictionary<String, IValueProvider> |
Resources |
Methods
| Type | Name | Summary |
|---|---|---|
Object |
CreateInstance(IResourceContext context) |
public interface Forge.Forms.FormBuilding.IFormPropertyProperties
| Type | Name | Summary |
|---|---|---|
Boolean |
CanWrite | |
Type |
DeclaringType | |
String |
Name | |
Type |
PropertyType |
Methods
| Type | Name | Summary |
|---|---|---|
T |
GetCustomAttribute() | |
IEnumerable<T> |
GetCustomAttributes() |
public interface Forge.Forms.FormBuilding.IFrameworkResourceContext
: IResourceContextMethods
| Type | Name | Summary |
|---|---|---|
FrameworkElement |
GetOwningElement() |
Bridges form elements with the control that contains them.
public interface Forge.Forms.FormBuilding.IResourceContextProperties
| Type | Name | Summary |
|---|---|---|
IEnvironment |
Environment | Gets the Forge.Forms.FormBuilding.IResourceContext.Environment for current context. |
Methods
| Type | Name | Summary |
|---|---|---|
void |
AddResource(Object key, Object value) |
Adds a resource to the control's resources. |
Binding |
CreateContextBinding(String path) |
Creates a new binding to the form context object. |
Binding |
CreateDirectModelBinding() | Creates a binding to the raw model. |
Binding |
CreateModelBinding(String path) |
Creates a new binding to the form model object. |
Object |
FindResource(Object key) |
Locates a resource from the control's resources. |
BindingExpressionBase[] |
GetBindings() | Gets all bindings for the current model |
Object |
GetContextInstance() | Gets current context instance. |
Object |
GetModelInstance() | Gets current model instance. |
void |
OnAction(IActionContext actionContext) |
Notifies that an action has occurred. |
Object |
TryFindResource(Object key) |
Tries to locate a resource from the control's resources. |
public interface Forge.Forms.FormBuilding.IValueProviderMethods
| Type | Name | Summary |
|---|---|---|
BindingBase |
ProvideBinding(IResourceContext context) |
|
Object |
ProvideValue(IResourceContext context) |
public class Forge.Forms.FormBuilding.RegexReplacementProperties
| Type | Name | Summary |
|---|---|---|
IValueProvider |
Pattern | |
IValueProvider |
RegexOptions | |
IValueProvider |
Replacement |
Methods
| Type | Name | Summary |
|---|---|---|
CompiledRegexReplacement |
Compile(IResourceContext context) |
public class Forge.Forms.FormBuilding.ReplacementPipeMethods
| Type | Name | Summary |
|---|---|---|
Func<String, CultureInfo, Object> |
CreateDeserializer(IResourceContext context) |
public class Forge.Forms.FormBuilding.StringTypeConverter
: IValueConverterMethods
| Type | Name | Summary |
|---|---|---|
Object |
Convert(Object value, Type targetType, Object parameter, CultureInfo culture) |
|
Object |
ConvertBack(Object value, Type targetType, Object parameter, CultureInfo culture) |
Single source data binding provider that captures resources with name "Value".
public class Forge.Forms.FormBuilding.ValueBindingProvider
: BindingProvider, IResource, IAnimatable, IInputElement, IFrameworkInputElement, ISupportInitialize, IHaveResources, IQueryAmbient, IBindingProvider, IDataBindingProviderProperties
| Type | Name | Summary |
|---|---|---|
BindingExpressionBase |
CurrentBindingExpression |
Methods
| Type | Name | Summary |
|---|---|---|
void |
BindingCreated(BindingExpressionBase expression, String resource) |
|
void |
ClearBindings() | |
IEnumerable<BindingExpressionBase> |
GetBindings() |
public static class Forge.Forms.FormBuilding.ValueProviderExtensionsStatic Methods
| Type | Name | Summary |
|---|---|---|
IProxy |
GetBestMatchingProxy(this IValueProvider valueProvider, IResourceContext context) |
|
BoolProxy |
GetBoolValue(this IValueProvider valueProvider, IResourceContext context) |
|
StringProxy |
GetStringValue(this IValueProvider valueProvider, IResourceContext context) |
|
StringProxy |
GetStringValue(this IValueProvider valueProvider, IResourceContext context, Boolean setKey) |
|
BindingProxy |
GetValue(this IValueProvider valueProvider, IResourceContext context) |
|
IValueProvider |
Wrap(this IValueProvider valueProvider, String valueConverter) |