Configurable Items

Autogenerated by MFractor v3.5.13

Android Custom Renderer Code Snippets

Full Documentation

Configurable Properties

Name Type Defaults To Description
PageRendererSnippet Code Snippet

Arguments:
  • control_type: The fully qualified type of the page that this custom renderer is for.
  • control_name: The name of the page that this custom renderer is for.
  • namespace: The namespace that the custom renderer will be placed into.
  • renderer_name: The name of the new custom renderer.
  • renderer_control: The name of the base control type. For example, if your control is MyCustomLabel that extends a Label, renderer_control will be Label.
  • base_type: The fully qualified type of the renderers base type.
View Code Snippet The code snippet to use for customised pages.
LayoutRendererSnippet Code Snippet

Arguments:
  • control_type: The fully qualified type of the layout that this custom renderer is for.
  • control_name: The name of the layout that this custom renderer is for.
  • namespace: The namespace that the custom renderer will be placed into.
  • renderer_name: The name of the new custom renderer.
  • renderer_control: The name of the base control type. For example, if your control is MyCustomLabel that extends a Label, renderer_control will be Label.
  • base_type: The fully qualified type of the renderers base type.
View Code Snippet The code snippet to use for customised layouts.
ViewRendererSnippet Code Snippet

Arguments:
  • control_type: The fully qualified type of the control that this custom renderer is for.
  • control_name: The name of the control that this custom renderer is for.
  • namespace: The namespace that the custom renderer will be placed into.
  • renderer_name: The name of the new custom renderer.
  • renderer_control: The name of the base control type. For example, if your control is MyCustomLabel that extends a Label, renderer_control will be Label.
  • base_type: The fully qualified type of the renderers base type.
View Code Snippet The code snippet to use for customised controls.
CellRendererSnippet Code Snippet

Arguments:
  • control_type: The fully qualified type of the control that this custom renderer is for.
  • control_name: The name of the control that this custom renderer is for.
  • namespace: The namespace that the custom renderer will be placed into.
  • renderer_name: The name of the new custom renderer.
  • renderer_control: The name of the base control type. For example, if your control is MyCustomLabel that extends a Label, renderer_control will be Label.
  • base_type: The fully qualified type of the renderers base type.
View Code Snippet The code snippet to use for customised cells in ListViews.
RenderersFolder System.String Renderers What is the folder path that new renderers should be placed into?
RenderersNamespace System.String .Renderers What is the fully qualifed namespace that new renderers should be placed into? Prepend the namespace name with a dot to make it relative to the projects default namespace.

Annotate With Attribute Usage

Full Documentation

Configurable Properties

Name Type Defaults To Description
DefaultAttributeUsage System.AttributeTargets Class When creating the attribute usage annotation, what is the default target this attribute should be used on?

Uses:

Behaviors Configuration

Full Documentation

Configurable Properties

Name Type Defaults To Description
BehaviorsFolder System.String Behaviors The default folder to place new behaviors into.
BehaviorsNamespace System.String .Behaviors The default names that new behaviors will be placed into. Prepending the namespace with a . will cause the namespace to be appended to the projects default namespace.

Create Class Declaration

Full Documentation

Configurable Properties

Name Type Defaults To Description
ImplementBaseConstructors Boolean False Should the base class constructors be automatically created?

Uses:

Create Constructor

Full Documentation

Configurable Properties

Name Type Defaults To Description
ArgumentFirstLetterToLowerCase Boolean True Should all constructor arguments have their first letter forced to lower case?

Create Missing Property For Class

Full Documentation

Configurable Properties

Name Type Defaults To Description
TryInferUnknownTypes Boolean True Should MFractor attempt to guess the type for the new property based on it's value? EG: A value of true would cause the output type to be bool instead of System.Object.
DefaultColorType System.String Xamarin.Forms.Color When attempting to infer the property type based on its value and MFractor decides it's a color, what is the color type MFractor should use?
DefaultPropertyType System.String System.Object What is the default type for the new property if MFractor can't figure it out based on the attribute value?
DefaultImageType System.String Xamarin.Forms.ImageSource When attempting to infer the property type based on its value and MFractor decides it's an image, what is the CLR type MFractor should use?

Uses:

Default Resource File

Full Documentation

Configurable Properties

Name Type Defaults To Description
ProjectFilePath System.String Resources/Resources.resx What is the default resource file that string resources should be placed into?

Encapsulate Content Page Children With StackLayout

Full Documentation

Configurable Properties

Name Type Defaults To Description
DefaultOrientation System.String What is the default orientation for the StackLayout that is created for this fix? If empty, an Orientation attribute is not inserted.

Encapsulate Content View Children With StackLayout

Full Documentation

Configurable Properties

Name Type Defaults To Description
DefaultOrientation System.String What is the default orientation for the StackLayout that is created for this fix? If empty, an Orientation attribute is not inserted.

Encapsulate Scroll View Children With StackLayout

Full Documentation

Configurable Properties

Name Type Defaults To Description
DefaultOrientation System.String What is the default orientation for the StackLayout that is created for this fix? If empty, an Orientation attribute is not inserted.

Event To Command Behavior Configuration

Full Documentation

Configurable Properties

Name Type Defaults To Description
EventToCommandBehaviorSnippet Code Snippet

Arguments:
  • name: The name of the event to command behaviour
  • namespace: The namespace that encapsulates the event to command behaviour
View Code Snippet The code snippet to use for the event to command behavior.
SelectedItemEventArgsToSelectedItemConverterSnippet Code Snippet

Arguments:
  • name: The name of the converter.
  • namespace: The namespace that encapsulates the converter
View Code Snippet The code snippet to use for the SelectedItemEventArgsToSelectedItemConverter.
EventToCommandBehaviorName System.String EventToCommandBehavior The class name of the event to command behavior.
SelectedItemEventArgsToSelectedItemConverterName System.String SelectedItemEventArgsToSelectedItemConverter The class name of the event to command behavior class.

Extract XAML Into Control

Full Documentation

Configurable Properties

Name Type Defaults To Description
DefaultXamlNamespace System.String controls What is the default name of the XAML namespace for the new control?
DefaultNamespace System.String What is the default name of the C# namespace for the new control? If empty, the projects default namespace will be used.

Uses:

Format Xaml Document

Full Documentation

Configurable Properties

Name Type Defaults To Description
AttributesOnSeparateLines Boolean False Should attributes be placed onto separate lines?

Uses:

Generate Assignment Expression

Full Documentation

Configurable Properties

Name Type Defaults To Description
IncludeThisForMembers Boolean False When assigning to a class member, should a this. be added to the variable being assigned?

Generate Bindable Property

Full Documentation

Configurable Properties

Name Type Defaults To Description
Snippet Code Snippet

Arguments:
  • name: The name of the new bindable property.
  • type: The type of the new bindable property.
  • control_type: The control type that the new bindable property has been created inside.
View Code Snippet When creating the new bindable property, what is the default code snippet MFractor should use?

Generate Event Handler Declaration

Full Documentation

Configurable Properties

Name Type Defaults To Description
Snippet Code Snippet

Arguments:
  • name: The name of the new event handler.
  • event_type: The fully qualified type of the event handler.
  • arguments_type: The fully qualified type of the event arguments.
public event $event_type$<$argument_type$> $name$; What is the code snippet to use when creating a new event handler?

Generate Event Handler Method

Full Documentation

Configurable Properties

Name Type Defaults To Description
Snippet Code Snippet

Arguments:
  • type: The fully qualified type of the event arguments.
  • name: The name of the new method.
public void $name$(object sender, $type$ e)
{
throw new System.NotImplementedException();
}
What is the code snippet to use when creating the new event handler method declaration?

Generate Grid

Full Documentation

Configurable Properties

Name Type Defaults To Description
IncludeColumnDefinitions Boolean True Should the new grid include a ColumnDefinitions element by default?
IncludeRowDefinitions Boolean True Should the new grid include a RowDefinitions element by default?
DefaultRowsCount Integer 1 What is the default amount of rows that the new grid should have?
DefaultColumnsCount Integer 1 What is the default amount of columns that the new grid should have?

Uses:

Generate Grid Column Definition

Full Documentation

Configurable Properties

Name Type Defaults To Description
DefaultWidthValue System.String * When creating a new ColumnDefinition for a grid, what is the default width value.

Generate Grid Row Definition

Full Documentation

Configurable Properties

Name Type Defaults To Description
DefaultHeightValue System.String * When creating a new RowDefinition for a grid, what is the default height of a newly created row?

Generate ICommand Implementation

Full Documentation

Configurable Properties

Name Type Defaults To Description
Snippet Code Snippet

Arguments:
  • name: The name of the new command.
  • type: The fully qualified type of the new command
View Code Snippet 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 Instance Property

Full Documentation

Configurable Properties

Name Type Defaults To Description
Snippet Code Snippet

Arguments:
  • value: The value to assign to the new property.
  • name: The name of the new propety.
  • type: The fully qualified type of the new property.
public $type$ $name$
{
set;
}
What is the code snippet to use when creating the property declaration?
ReadOnlySnippet Code Snippet

Arguments:
  • value: The value to assign to the new property.
  • type: The fully qualified type of the new property.
  • name: The name of the new propety.
public $type$ $name$
{
get;
}
What is the code snippet to use when creating a readonly property declaration?
WriteOnlySnippet Code Snippet

Arguments:
  • value: The value to assign to the new property.
  • name: The name of the new propety.
  • type: The fully qualified type of the new property.
public $type$ $name$
{
get;
set;
}
What is the code snippet to use when creating a write only property declaration?

Generate IValueConverter Implementation

Full Documentation

Configurable Properties

Name Type Defaults To Description
CreateMissingValueConversionAttribute Boolean True If an implementation of the ValueConversionAttribute class cannot be resolved within the project compilation, should MFractor automatically create the implementation?
Snippet Code Snippet

Arguments:
  • name: The name of the new value converter.
  • namespace: The namespace the new converter will be placed inside.
  • value_conversion_attribute: The fully qualified type of the value conversion attribute (if available).
  • input_type: The fully qualified type that the value converter should accept as it's input type. If unavailable, defaults to System.Object.
  • output_type: The fully qualified type that the value converter should accept as it's output type. If unavailable, defaults to System.Object.
  • parameter_type: The fully qualified type that the value converter should accept as it's parameter type. If unavailable, defaults to System.Object.
View Code Snippet What is the code snippet to use when generating the value converter class file?

Uses:

Generate Member Initialiser

Full Documentation

Configurable Properties

Name Type Defaults To Description
ForceStringLiteral Boolean False Should the code generator always attempt to assign members with a string literal?

Generate New Value Converter For Type Flow

Full Documentation

Configurable Properties

Name Type Defaults To Description
DefaultConverterNamespace System.String converters The namespace name of the xmlns import statement for the newly created value converter

Uses:

Generate New View Model

Full Documentation

Configurable Properties

Name Type Defaults To Description
BaseClass System.String null The fully qualified type to use as the base class for the view model. For example, MvvmFramework.ViewModels.BaseViewModel.
ViewModelsFolder System.String null The folder path relative to the project root to insert the newly created view model class into. For example ViewModels/Cells.
ViewModelSuffix System.String ViewModel The suffix to append to the end of the newly created view model. For example, setting this to PageModel would cause a page named MainPage to create a view model named MainPageModel.
ShouldPlaceViewModelWithView Boolean False When generating the new ViewModel, should it be placed in the same folder and namespace as the XAML view that is creating it? Setting this property to true will cause the ViewModelNamespace and ViewModelsFolderproperties to be ignored.
ViewModelNamespace System.String null What is the default namespace that view models be included into? Use a '.' before the namespace to signify to MFractor that the new namespace is relative to the projects default namespace. If unset, the default project namespace is used.
ShouldRemoveXamlViewSuffix Boolean True Should MFractor remove the 'Page' or 'View' suffix from the view name before creating generating the new view model? Consider the view 'MainPage' with ViewModelSuffix set to 'ViewModel'; if set as true, the new view model would be named 'MainViewModel'. If false, the new view model would be named 'MainPageViewModel'

Uses:

Generate Platform Specific Effect

Full Documentation

Configurable Properties

Name Type Defaults To Description
iOSEffectsFolder System.String Effects What is the folder that iOS platform-specific effects should be placed into?
AndroidEffectsFolder System.String Effects What is the folder that Android platform-specific effects should be placed into?
GtkEffectsFolder System.String Effects What is the folder that GTK platform-specific effects should be placed into?
EffectsFolder System.String Effects What is the folder that the effects declaration be placed into?
ResolutionGroupName System.String Effects What is the name of the resolution group?
iOSEffectSnippet Code Snippet

Arguments:
  • name: The name of the new effect.
  • group_name: The resolution group name of the new effect.
  • namespace: The iOS projects default namespace.
  • platform: If you wish to shared the platform-specific effect template, this is the name of the effects platform.
View Code Snippet What is the code snippet for the iOS platform-specific effect?
AndroidEffectSnippet Code Snippet

Arguments:
  • name: The name of the new effect.
  • group_name: The resolution group name of the new effect.
  • namespace: The Android projects default namespace.
  • platform: If you wish to shared the platform-specific effect template, this is the name of the effects platform.
View Code Snippet What is the code snippet for the Android platform-specific effect?
GtkEffectSnippet Code Snippet

Arguments:
  • name: The name of the new effect.
  • group_name: The resolution group name of the new effect.
  • namespace: The GTK projects default namespace.
  • platform: If you wish to shared the platform-specific effect template, this is the name of the effects platform.
View Code Snippet What is the code snippet for the GTK platform-specific effect?
EffectSnippet Code Snippet

Arguments:
  • name: The name of the new effect.
  • group_name: The resolution group name of the new effect.
  • namespace: The common projects default namespace.
View Code Snippet What is the code snippet for the effect?

Generate ResX Entry

Full Documentation

Configurable Properties

Name Type Defaults To Description
IncludeCommentWhenEmpty Boolean False When no comment for the new ResX entry has been provided, should an empty comment tag be included?

Generate ResX File

Full Documentation

Configurable Properties

Name Type Defaults To Description
ResXTemplate Code Snippet

Arguments:
  • values: The values to insert
View Code Snippet The default .resx file template.
ResXDesignerTemplate Code Snippet

Arguments:
  • namespace: The namespace of the
View Code Snippet The default designer file template for a .resx resource.

Uses:

Generate Value Conversion Attribute

Full Documentation

Configurable Properties

Name Type Defaults To Description
Snippet Code Snippet

Arguments:
  • namespace: The namespace that the new value conversion attribute should be placed within.
View Code Snippet What is the default code snippet to use when creating the value conversion attribute implementation?

Uses:

Generate View With XAML and Code-Behind Class

Full Documentation

Configurable Properties

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

Arguments:
  • name: The name of the new class.
  • namespace: The namespace that the new class resides inside.
  • type: The base type of the new class.
View Code Snippet What is the default implementation of the new XAML control's code behind class?

Uses:

Generates Xamarin.Forms Cascading Style Sheet

Full Documentation

Configurable Properties

Name Type Defaults To Description
Snippet Code Snippet

Arguments:
  • control: The name of the control that this style sheet is for. EG: stackLayout, entry, view etc
$control$ {
margin:10;
}
The default cascading style sheet to
StyleFolder System.String Styles What is the folder to place new style sheets into?
DefaultControl System.String view What is the default control to use when generating new style sheets?

Google Cloud Translation

Full Documentation

Configurable Properties

Name Type Defaults To Description
ApiKey System.String null What is the API key for the Google Cloud Translation API?

GTK Custom Renderer Code Snippets

Full Documentation

Configurable Properties

Name Type Defaults To Description
Snippet Code Snippet

Arguments:
  • control_type: The fully qualified type of the page that this custom renderer is for.
  • control_name: The name of the page that this custom renderer is for.
  • namespace: The namespace that the custom renderer will be placed into.
  • renderer_name: The name of the new custom renderer.
  • renderer_control: The name of the base control type. For example, if your control is MyCustomLabel that extends a Label, renderer_control will be Label.
  • base_type: The fully qualified type of the renderers base type.
View Code Snippet The code snippet to use for GTK custom renderers pages.
RenderersFolder System.String Renderers What is the folder path that new renderers should be placed into?
RenderersNamespace System.String .Renderers What is the fully qualifed namespace that new renderers should be placed into? Prepend the namespace name with a dot to make it relative to the projects default namespace.

IOS Custom Renderer Code Snippets

Full Documentation

Configurable Properties

Name Type Defaults To Description
PageRendererSnippet Code Snippet

Arguments:
  • control_type: The fully qualified type of the page that this custom renderer is for.
  • control_name: The name of the page that this custom renderer is for.
  • namespace: The namespace that the custom renderer will be placed into.
  • renderer_name: The name of the new custom renderer.
  • renderer_control: The name of the base control type. For example, if your control is MyCustomLabel that extends a Label, renderer_control will be Label.
  • base_type: The fully qualified type of the renderers base type.
View Code Snippet The code snippet to use for customised pages.
LayoutRendererSnippet Code Snippet

Arguments:
  • control_type: The fully qualified type of the layout that this custom renderer is for.
  • control_name: The name of the layou that this custom renderer is for.
  • namespace: The namespace that the custom renderer will be placed into.
  • renderer_name: The name of the new custom renderer.
  • renderer_control: The name of the base control type. For example, if your control is MyCustomLabel that extends a Label, renderer_control will be Label.
  • base_type: The fully qualified type of the renderers base type.
View Code Snippet The code snippet to use for customised layouts.
ViewRendererSnippet Code Snippet

Arguments:
  • control_type: The fully qualified type of the control that this custom renderer is for.
  • control_name: The name of the control that this custom renderer is for.
  • namespace: The namespace that the custom renderer will be placed into.
  • renderer_name: The name of the new custom renderer.
  • renderer_control: The name of the base control type. For example, if your control is MyCustomLabel that extends a Label, renderer_control will be Label.
  • base_type: The fully qualified type of the renderers base type.
View Code Snippet The code snippet to use for customised controls.
CellRendererSnippet Code Snippet

Arguments:
  • control_type: The fully qualified type of the control that this custom renderer is for.
  • control_name: The name of the control that this custom renderer is for.
  • namespace: The namespace that the custom renderer will be placed into.
  • renderer_name: The name of the new custom renderer.
  • renderer_control: The name of the base control type. For example, if your control is MyCustomLabel that extends a Label, renderer_control will be Label.
  • base_type: The fully qualified type of the renderers base type.
View Code Snippet The code snippet to use for customised cells in ListViews.
RenderersFolder System.String Renderers What is the folder path that new renderers should be placed into?
RenderersNamespace System.String .Renderers What is the fully qualifed namespace that new renderers should be placed into? Prepend the namespace name with a dot to make it relative to the projects default namespace.

Member Field Generator

Full Documentation

Configurable Properties

Name Type Defaults To Description
UnderscoreOnBackingField Boolean False When creating a backing field for a property, should the field have an underscore appended to the start of the field name?

Uses:

MVVM Resolution Settings

Full Documentation

Configurable Properties

Name Type Defaults To Description
ViewsProjectName System.String null If the apps XAML views and view models are in separate projects, what is the name of project that contains the XAML views?
ViewModelsProjectName System.String null If the apps XAML views and view models are in separate projects, what is the name of project that contains the ViewModels?

Remove Unused Namespaces

Full Documentation

Configurable Properties

Name Type Defaults To Description
ShouldSort Boolean True If the attributes for this node should be sorted when the unused namespaces are removed

Uses:

String Localisation Generator

Full Documentation

Configurable Properties

Name Type Defaults To Description
TranslateExtensionSymbol System.String .i18n.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?
XamlLocalisationExpression Code Snippet

Arguments:
  • namespace: The xml namespace for the translate extension symbol when used in XAML.
  • translate_extension: The name of the translation extension that's used to lookup a localised value for a given key.
  • key: The key that's used to lookup a localised value in this applications resources.
  • resx_name: The name of the RESX file to look into for the given key, excluding the .resx file extension.
{$namespace$:$translate_extension$ $key$} When importing a XAML namespace reference to the translation extension, what is the default namespace name that should be used?

Uses:

Value Conversion Settings

Full Documentation

Configurable Properties

Name Type Defaults To Description
Namespace System.String .Converters The namespace to place value conversion code inside. When empty, new value conversion code 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 Converters The folder to place value conversion code inside. When empty, new value conversion code will be placed inside the proejcts root folder.
DefaultConverterXmlns System.String converters The namespace name of the xmlns import statement for the newly created value converter

View Model Property Generator

Full Documentation

Configurable Properties

Name Type Defaults To Description
Snippet Code Snippet

Arguments:
  • type: The fully qualified type of the new property.
  • name: The name of the new property.
public $type$ $name$
{
get;
set;
}
What is the code snippet to use when creating the property declaration?
ValueSnippet Code Snippet

Arguments:
  • type: The fully qualified type of the new property.
  • name: The name of the new property.
  • value: The value to assign to the new property.
public $type$ $name$
{
get;
set;
} = $value$;
What is the code snippet to use when creating a property declaration with a default value?
DefaultEnumerableType System.String System.Collections.Generic.List When the new view model property is an IEnumerable, what is the default type that should be used instead of IEnumerable? To use the provided IEnumerable type, set this to an empty string.

XAML Localisation Infrastructure Generation

Full Documentation

Configurable Properties

Name Type Defaults To Description
LocalisationFolder System.String i18n What is the folder that the translation extension and localiser class should be placed into?
LocaliserName System.String ILocalise What is the name of the class that provides the culture information for translation extension?
ILocaliseSnippet Code Snippet

Arguments:
  • namespace: The projects namespace
  • name: The name of the new localiser interface. Defaults to ILocalise
View Code Snippet The code snippet to use for the ILocalise interface that each platform project should implement.
TranslateExtensionSnippet Code Snippet

Arguments:
  • namespace: The projects namespace
  • name: The name of the translation extension class. This will be derived from the string localisation generations TranslateExtensionSymbol property.
  • resource: The fully qualified type of the resource file that the translate extension should use when looking for localisation values. This will be provided by the apps default resource file config.
  • localiser: The name of the localisation interface that provides the current culture.
View Code Snippet The code snippet to use for the translation extension.
AndroidLocaliseSnippet Code Snippet

Arguments:
  • namespace: The projects namespace
  • i18n_namespace: The namespace that the translate extension and ILocalise interface live within
  • localiser: The name of the localisation interface that provides the current culture.
View Code Snippet The code snippet to use for the Android implementation of the localization interface to provide the current culture.
iOSLocaliseSnippet Code Snippet

Arguments:
  • namespace: The projects namespace
  • i18n_namespace: The namespace that the translate extension and ILocalise interface live within
  • localiser: The name of the localisation interface that provides the current culture.
View Code Snippet The code snippet to use for the iOS implementation of the localization interface to provide the current culture.

Uses: