Autogenerated by MFractor v3.2.13

Generate Bindable Property

Configuration Id: com.mfractor.code_gen.forms.csharp.bindable_property

Generates a Xamarin.Forms bindable property implementation and a proxy property that calls the BindableProperty implementation.

Configurable Properties

Name Type Defaults To Description
PreferExpressionBodies System.Boolean False When generating bindable properties, should the generator prefer expression bodies (get => MyValue;) instead of a return statement?

Generate ICommand Implementation

Configuration Id: com.mfractor.code_gen.forms.csharp.command_implementation

Generates a boilerplate implementation of ICommand using Xamarin.Forms.Command

Configurable Properties

Name Type Defaults To Description
Snippet Code Snippet

Expected Arguments:
  • name: The name of the new command.
null What is the code snippet to use when creating the command stub? If not set, this code generator will default to generating a stub Xamarin.Forms.Command implementation
CommandType System.String "Xamarin.Forms.Command" The fully qualified type to use as the command implementation. For example, using Xamarin.Forms.Command would cause the new expression to be new Xamarin.Forms.Command

Generate IValueConverter Implementation

Configuration Id: com.mfractor.code_gen.forms.csharp.value_converter

Generates an implementation of a value converter.

Configurable Properties

Name Type Defaults To Description
IncludeValueConversionAttribute System.Boolean True If the generated value converter should automatically have a ValueConversionAttribute added to it to denote it's input and output types.
CreateMissingValueConversionAttribute System.Boolean True If an implementation of the ValueConversionAttribute class cannot be resolved within the project compilation, should MFractor automatically create the implementation?
Namespace System.String null The namespace to place new value converters inside. When empty, new value converters will be placed under the projects default namespace. Place a single '.' before the namespace name to make it relative to the projects default namespace.
Folder System.String null The folder to place new value converters inside. When empty, new value converters will be placed inside the proejcts root folder.
ImplementConversionForConvert System.Boolean False When creating the body of the Convert method, should a var input = (InputType)value;* andreturn default(OutputType)` be inserted instead of a not implemented exception?
ImplementConversionForConvertBack System.Boolean False When creating the body of the ConvertBack method, should a var input = (OutputType)value;* andreturn default(InputType)` be inserted instead of a not implemented exception?

Uses:

Generate Value Conversion Attribute

Configuration Id: com.mfractor.code_gen.forms.csharp.value_conversion_attribute

Generates an implementation of the ValueConversionAttribute; the attribute used to hint type-flow in a value converter for design time tools like MFractor.

Uses:

Generate View With XAML and Code-Behind Class

Configuration Id: com.mfractor.code_gen.forms.xaml_view_with_code_behind

Creates a new view/control using a XAML to define the UI and a code-behind class to encapsulate backing logic.

Configurable Properties

Name Type Defaults To Description
ViewsFolder System.String null What is the folder that new XAML views be placed into?

Uses:

String Localisation Generator

Configuration Id: com.mfractor.code_gen.forms.replace_with_localisation_lookup

The string localisation generator converts literal string value inside a XAML document to a localised value lookup. This replaces the text with a localistaion lookup extension and generates a resx entry for the old value.

Configurable Properties

Name Type Defaults To Description
TranslateExtensionSymbol System.String ".TranslateExtension" What is the full sybol name (namespace + class name) of the translate markup extension? Prepend the symbol name with a dot to make it relative to the projects default namespace. For example, using .Localisation.TranslateExtension when the default namespace is MyApp would cause the full symbol name to become MyApp.Localisation.TranslateExtension.
TranslationXamlNamespace System.String "i18n" When importing a XAML namespace reference to the translation extension, what is the default namespace name that should be used?

Uses:

View Model Property Generator

Configuration Id: com.mfractor.code_gen.forms.csharp.view_model_property

Generates a property declaration for a Xamarin.Forms ViewModel. By default, this code generator routes to the standard PropertyGenerator. However, specifying a code snippet will cause the code generator to use that instead.

Configurable Properties

Name Type Defaults To Description
Snippet Code Snippet

Expected Arguments:
  • type: The fully qualified type of the new property.
  • name: The name of the new propety.
Optional Arguments:
  • value: The value to assign to the new property.
null What is the code snippet to use when creating the property declaration? If not set, this code generator will default to the standard property generator.
UseBackingFields System.Boolean False When creating the implementation for a property with a public getter and setter, should the property generator create a backing field?

Uses: