GalaSoft.MvvmLight.Platform Base class for bindings in Xamarin.iOS and Xamarin.Android. The source at the "top" of the property chain. The target at the "top" of the property chain. The mode of the binding. OneTime means that the target property will be set once (when the binding is created) but that subsequent changes will be ignored. OneWay means that the target property will be set, and if the PropertyChanged event is raised by the source, the target property will be updated. TwoWay means that the source property will also be updated if the target raises the PropertyChanged event. Default means OneWay if only the source implements INPC, and TwoWay if both the source and the target implement INPC. Gets the source object for the binding. Gets the target object for the binding. Instructs the Binding instance to stop listening to value changes and to remove all listeneners. Forces the Binding's value to be reevaluated. The target value will be set to the source value. Forces the Binding's value to be reevaluated. The source value will be set to the target value. Occurs when the value of the databound property changes. Creates a binding between two properties. If the source implements INotifyPropertyChanged, the source property raises the PropertyChanged event and the BindingMode is OneWay or TwoWay, the target property will be synchronized with the source property. If the target implements INotifyPropertyChanged, the target property raises the PropertyChanged event and the BindingMode is TwoWay, the source property will also be synchronized with the target property. The type of the source property that is being databound. The type of the target property that is being databound. If the source type is not the same as the target type, an automatic conversion will be attempted. However only simple types can be converted. For more complex conversions, use the and methods to define custom converters. Gets or sets the value to use when the binding is unable to return a value. This can happen if one of the items on the Path (except the source property itself) is null, or if the Converter throws an exception. Gets of sets the value used when the source property is null (or equals to default(TSource)). Gets the current value of the binding. Initializes a new instance of the Binding class for which the source and target properties are located in different objects. The source of the binding. If this object implements INotifyPropertyChanged and the BindingMode is OneWay or TwoWay, the target will be notified of changes to the target property. The name of the source property for the binding. The target of the binding. If this object implements INotifyPropertyChanged and the BindingMode is TwoWay, the source will be notified of changes to the source property. The name of the target property for the binding. The mode of the binding. OneTime means that the target property will be set once (when the binding is created) but that subsequent changes will be ignored. OneWay means that the target property will be set, and if the PropertyChanged event is raised by the source, the target property will be updated. TwoWay means that the source property will also be updated if the target raises the PropertyChanged event. Default means OneWay if only the source implements INPC, and TwoWay if both the source and the target implement INPC. Tthe value to use when the binding is unable to return a value. This can happen if one of the items on the Path (except the source property itself) is null, or if the Converter throws an exception. The value to use when the binding is unable to return a value. This can happen if one of the items on the Path (except the source property itself) is null, or if the Converter throws an exception. Initializes a new instance of the Binding class for which the source and target properties are located in different objects. The source of the binding. If this object implements INotifyPropertyChanged and the BindingMode is OneWay or TwoWay, the target will be notified of changes to the target property. An expression pointing to the source property. It can be a simple expression "() => [source].MyProperty" or a composed expression "() => [source].SomeObject.SomeOtherObject.SomeProperty". The target of the binding. If this object implements INotifyPropertyChanged and the BindingMode is TwoWay, the source will be notified of changes to the source property. An expression pointing to the target property. It can be a simple expression "() => [target].MyProperty" or a composed expression "() => [target].SomeObject.SomeOtherObject.SomeProperty". The mode of the binding. OneTime means that the target property will be set once (when the binding is created) but that subsequent changes will be ignored. OneWay means that the target property will be set, and if the PropertyChanged event is raised by the source, the target property will be updated. TwoWay means that the source property will also be updated if the target raises the PropertyChanged event. Default means OneWay if only the source implements INPC, and TwoWay if both the source and the target implement INPC. Tthe value to use when the binding is unable to return a value. This can happen if one of the items on the Path (except the source property itself) is null, or if the Converter throws an exception. The value to use when the binding is unable to return a value. This can happen if one of the items on the Path (except the source property itself) is null, or if the Converter throws an exception. Defines a custom conversion method for a binding. To be used when the binding's source property is of a different type than the binding's target property, and the conversion cannot be done automatically (simple values). A func that will be called with the source property's value, and will return the target property's value. IMPORTANT: Note that closures are not supported at the moment due to the use of WeakActions (see http://stackoverflow.com/questions/25730530/). The Binding instance. Defines a custom conversion method for a two-way binding. To be used when the binding's target property is of a different type than the binding's source property, and the conversion cannot be done automatically (simple values). A func that will be called with the source property's value, and will return the target property's value. IMPORTANT: Note that closures are not supported at the moment due to the use of WeakActions (see http://stackoverflow.com/questions/25730530/). The Binding instance. This method is inactive on OneTime or OneWay bindings. Instructs the Binding instance to stop listening to value changes and to remove all listeneners. Forces the Binding's value to be reevaluated. The target value will be set to the source value. Forces the Binding's value to be reevaluated. The source value will be set to the target value. Define when the binding should be evaluated when the bound source object is a control. Because Xamarin controls are not DependencyObjects, the bound property will not automatically update the binding attached to it. Instead, use this method to define which of the control's events should be observed. The name of the event that should be observed to update the binding's value. The Binding instance. When this method is called on a OneTime binding. Such bindings cannot be updated. This exception can also be thrown when the source object is null or has already been garbage collected before this method is called. When the eventName parameter is null or is an empty string. When the requested event does not exist on the source control. Define when the binding should be evaluated when the bound source object is a control. Because Xamarin controls are not DependencyObjects, the bound property will not automatically update the binding attached to it. Instead, use this method to define which of the control's events should be observed. Use this method when the event requires a specific EventArgs type instead of the standard EventHandler. The type of the EventArgs used by this control's event. The name of the event that should be observed to update the binding's value. The Binding instance. When this method is called on a OneTime binding. Such bindings cannot be updated. This exception can also be thrown when the source object is null or has already been garbage collected before this method is called. When the eventName parameter is null or is an empty string. When the requested event does not exist on the source control. Define when the binding should be evaluated when the bound target object is a control. Because Xamarin controls are not DependencyObjects, the bound property will not automatically update the binding attached to it. Instead, use this method to define which of the control's events should be observed. The name of the event that should be observed to update the binding's value. The Binding instance. When this method is called on a OneTime or a OneWay binding. This exception can also be thrown when the source object is null or has already been garbage collected before this method is called. When the eventName parameter is null or is an empty string. When the requested event does not exist on the target control. Define when the binding should be evaluated when the bound target object is a control. Because Xamarin controls are not DependencyObjects, the bound property will not automatically update the binding attached to it. Instead, use this method to define which of the control's events should be observed. Use this method when the event requires a specific EventArgs type instead of the standard EventHandler. The type of the EventArgs used by this control's event. The name of the event that should be observed to update the binding's value. The Binding instance. When this method is called on a OneTime or OneWay binding. This exception can also be thrown when the target object is null or has already been garbage collected before this method is called. When the eventName parameter is null or is an empty string. When the requested event does not exist on the target control. Defines an action that will be executed every time that the binding value changes. The action that will be executed when the binding changes. IMPORTANT: Note that closures are not supported at the moment due to the use of WeakActions (see http://stackoverflow.com/questions/25730530/). The Binding instance. When WhenSourceChanges is called on a binding which already has a target property set. Occurs when the value of the databound property changes. Gets a reference to the instance that this listener listens to. Define when the binding should be evaluated when the bound source object is a control. Because Xamarin controls are not DependencyObjects, the bound property will not automatically update the binding attached to it. Instead, use this method to define which of the control's events should be observed. The name of the event that should be observed to update the binding's value. The Binding instance. When this method is called on a OneTime binding. Such bindings cannot be updated. This exception can also be thrown when the source object is null or has already been garbage collected before this method is called. When the eventName parameter is null or is an empty string. When the requested event does not exist on the source control. Define when the binding should be evaluated when the bound source object is a control. Because Xamarin controls are not DependencyObjects, the bound property will not automatically update the binding attached to it. Instead, use this method to define which of the control's events should be observed. Use this method when the event requires a specific EventArgs type instead of the standard EventHandler. The type of the EventArgs used by this control's event. The name of the event that should be observed to update the binding's value. The Binding instance. When this method is called on a OneTime binding. Such bindings cannot be updated. This exception can also be thrown when the source object is null or has already been garbage collected before this method is called. When the eventName parameter is null or is an empty string. When the requested event does not exist on the source control. Define when the binding should be evaluated when the bound target object is a control. Because Xamarin controls are not DependencyObjects, the bound property will not automatically update the binding attached to it. Instead, use this method to define which of the control's events should be observed. The name of the event that should be observed to update the binding's value. The Binding instance. When this method is called on a OneTime or a OneWay binding. This exception can also be thrown when the source object is null or has already been garbage collected before this method is called. When the eventName parameter is null or is an empty string. When the requested event does not exist on the target control. Define when the binding should be evaluated when the bound target object is a control. Because Xamarin controls are not DependencyObjects, the bound property will not automatically update the binding attached to it. Instead, use this method to define which of the control's events should be observed. Use this method when the event requires a specific EventArgs type instead of the standard EventHandler. The type of the EventArgs used by this control's event. The name of the event that should be observed to update the binding's value. The Binding instance. When this method is called on a OneTime or OneWay binding. This exception can also be thrown when the target object is null or has already been garbage collected before this method is called. When the eventName parameter is null or is an empty string. When the requested event does not exist on the target control. Define that the binding should be evaluated when the bound control's source property changes. Because Xamarin controls are not DependencyObjects, the bound property will not automatically update the binding attached to it. Instead, use this method to specify that the binding must be updated when the property changes. At this point, this method is inactive on iOS. Use instead. The Binding instance. When this method is called on a OneTime binding. Such bindings cannot be updated. This exception can also be thrown when the source object is null or has already been garbage collected before this method is called. Define when the binding should be evaluated when the bound source object is a control. Because Xamarin controls are not DependencyObjects, the bound property will not automatically update the binding attached to it. Instead, use this method to define which of the control's events should be observed. Defines the binding's update mode. Use to update the binding when the source control loses the focus. You can also use to update the binding when the source control's property changes. NOTE: At this time the PropertyChanged mode is inactive on iOS. Use instead. The Binding instance. When this method is called on a OneTime binding. Such bindings cannot be updated. This exception can also be thrown when the source object is null or has already been garbage collected before this method is called. Define that the binding should be evaluated when the bound control's target property changes. Because Xamarin controls are not DependencyObjects, the bound property will not automatically update the binding attached to it. Instead, use this method to specify that the binding must be updated when the property changes. At this point, this method is inactive on iOS. Use instead. The Binding instance. When this method is called on a OneTime or a OneWay binding. This exception can also be thrown when the target object is null or has already been garbage collected before this method is called. Define when the binding should be evaluated when the bound target object is a control. Because Xamarin controls are not DependencyObjects, the bound property will not automatically update the binding attached to it. Instead, use this method to define which of the control's events should be observed. Defines the binding's update mode. Use to update the binding when the source control loses the focus. You can also use to update the binding when the source control's property changes. NOTE: At this time the PropertyChanged mode is inactive on iOS. Use instead. The Binding instance. When this method is called on a OneTime or a OneWay binding. This exception can also be thrown when the source object is null or has already been garbage collected before this method is called. Define that the binding should be evaluated when the bound control's source property changes. Because Xamarin controls are not DependencyObjects, the bound property will not automatically update the binding attached to it. Instead, use this method to specify that the binding must be updated when the property changes. At this point, this method is inactive on iOS. Use instead. The Binding instance. When this method is called on a OneTime binding. Such bindings cannot be updated. This exception can also be thrown when the source object is null or has already been garbage collected before this method is called. Define when the binding should be evaluated when the bound source object is a control. Because Xamarin controls are not DependencyObjects, the bound property will not automatically update the binding attached to it. Instead, use this method to define which of the control's events should be observed. Defines the binding's update mode. Use to update the binding when the source control loses the focus. You can also use to update the binding when the source control's property changes. NOTE: At this time the PropertyChanged mode is inactive on iOS. Use instead. The Binding instance. When this method is called on a OneTime binding. Such bindings cannot be updated. This exception can also be thrown when the source object is null or has already been garbage collected before this method is called. Define that the binding should be evaluated when the bound control's target property changes. Because Xamarin controls are not DependencyObjects, the bound property will not automatically update the binding attached to it. Instead, use this method to specify that the binding must be updated when the property changes. At this point, this method is inactive on iOS. Use instead. The Binding instance. When this method is called on a OneTime or a OneWay binding. This exception can also be thrown when the target object is null or has already been garbage collected before this method is called. Define when the binding should be evaluated when the bound target object is a control. Because Xamarin controls are not DependencyObjects, the bound property will not automatically update the binding attached to it. Instead, use this method to define which of the control's events should be observed. Defines the binding's update mode. Use to update the binding when the source control loses the focus. You can also use to update the binding when the source control's property changes. NOTE: At this time the PropertyChanged mode is inactive on iOS. Use instead. The Binding instance. When this method is called on a OneTime or a OneWay binding. This exception can also be thrown when the source object is null or has already been garbage collected before this method is called. The mode of the . A default binding is a one way binding. A one time binding. The binding's value will be set when the binding is created but subsequent changes will be ignored/ A one way binding, where the changes to the source property will update the target property, but changes to the target property don't affect the source property. A two way binding, where the changes to the source property will update the target property, and vice versa. Defines extension methods used to add data bindings and commands between Xamarin Android and iOS elements. Sets a data binding between two properties. If the source implements INotifyPropertyChanged, the source property raises the PropertyChanged event and the BindingMode is OneWay or TwoWay, the target property will be synchronized with the source property. If the target implements INotifyPropertyChanged, the target property raises the PropertyChanged event and the BindingMode is TwoWay, the source property will also be synchronized with the target property. This class allows for a different TSource and TTarget and is able to perform simple type conversions automatically. This is useful if the source property and the target property are of different type. If the type conversion is complex, please use the and methods to configure the binding. It is very possible that TSource and TTarget are the same type in which case no conversion occurs. The type of the property that is being databound before conversion. The type of the property that is being databound after conversion. The target of the binding. If this object implements INotifyPropertyChanged and the BindingMode is TwoWay, the source will be notified of changes to the source property. An expression pointing to the target property. It can be a simple expression "() => [target].MyProperty" or a composed expression "() => [target].SomeObject.SomeOtherObject.SomeProperty". The source of the binding. If this object implements INotifyPropertyChanged and the BindingMode is OneWay or TwoWay, the target will be notified of changes to the target property. An expression pointing to the source property. It can be a simple expression "() => [source].MyProperty" or a composed expression "() => [source].SomeObject.SomeOtherObject.SomeProperty". The mode of the binding. OneTime means that the target property will be set once (when the binding is created) but that subsequent changes will be ignored. OneWay means that the target property will be set, and if the PropertyChanged event is raised by the source, the target property will be updated. TwoWay means that the source property will also be updated if the target raises the PropertyChanged event. Default means OneWay if only the source implements INPC, and TwoWay if both the source and the target implement INPC. The value to use when the binding is unable to return a value. This can happen if one of the items on the Path (except the source property itself) is null, or if the Converter throws an exception. The value used when the source property is null (or equals to default(TSource)). The new Binding instance. Creates a with a source property but without a target. This type of bindings is useful for the , , and methods, to use as CommandParameter binding. The source of the binding. If this object implements INotifyPropertyChanged and the BindingMode is OneWay or TwoWay, the target will be notified of changes to the target property. An expression pointing to the source property. It can be a simple expression "() => [source].MyProperty" or a composed expression "() => [source].SomeObject.SomeOtherObject.SomeProperty". The mode of the binding. OneTime means that the target property will be set once (when the binding is created) but that subsequent changes will be ignored. OneWay means that the target property will be set, and if the PropertyChanged event is raised by the source, the target property will be updated. TwoWay means that the source property will also be updated if the target raises the PropertyChanged event. Default means OneWay if only the source implements INPC, and TwoWay if both the source and the target implement INPC. The value to use when the binding is unable to return a value. This can happen if one of the items on the Path (except the source property itself) is null, or if the Converter throws an exception. The value used when the source property is null (or equals to default(TSource)). The type of the bound property. The created binding instance. Sets a data binding between two properties of the same object. If the source implements INotifyPropertyChanged, has observable properties and the BindingMode is OneWay or TwoWay, the target property will be notified of changes to the source property. If the target implements INotifyPropertyChanged, has observable properties and the BindingMode is TwoWay, the source will also be notified of changes to the target's properties. The type of the source property that is being databound. The type of the target property that is being databound. If the source type is not the same as the target type, an automatic conversion will be attempted. However only simple types can be converted. For more complex conversions, use the and methods to define custom converters. An expression pointing to the target property. It can be a simple expression "() => [target].MyProperty" or a composed expression "() => [target].SomeObject.SomeOtherObject.SomeProperty". The source of the binding. If this object implements INotifyPropertyChanged and the BindingMode is OneWay or TwoWay, the target will be notified of changes to the target property. An expression pointing to the source property. It can be a simple expression "() => [source].MyProperty" or a composed expression "() => [source].SomeObject.SomeOtherObject.SomeProperty". The mode of the binding. OneTime means that the target property will be set once (when the binding is created) but that subsequent changes will be ignored. OneWay means that the target property will be set, and if the PropertyChanged event is raised by the source, the target property will be updated. TwoWay means that the source property will also be updated if the target raises the PropertyChanged event. Default means OneWay if only the source implements INPC, and TwoWay if both the source and the target implement INPC. The value to use when the binding is unable to return a value. This can happen if one of the items on the Path (except the source property itself) is null, or if the Converter throws an exception. The value used when the source property is null (or equals to default(TSource)). The new Binding instance. Sets a data binding between two properties. If the source implements INotifyPropertyChanged, the source property raises the PropertyChanged event and the BindingMode is OneWay or TwoWay, the target property will be synchronized with the source property. If the target implements INotifyPropertyChanged, the target property raises the PropertyChanged event and the BindingMode is TwoWay, the source property will also be synchronized with the target property. The type of the source property that is being databound. The type of the target property that is being databound. If the source type is not the same as the target type, an automatic conversion will be attempted. However only simple types can be converted. For more complex conversions, use the and methods to define custom converters. The target of the binding. If this object implements INotifyPropertyChanged and the BindingMode is TwoWay, the source will be notified of changes to the source property. The name of the target property. This must be a simple name, without dots. The source of the binding. If this object implements INotifyPropertyChanged and the BindingMode is OneWay or TwoWay, the target will be notified of changes to the target property. The name of the source property. This must be a simple name, without dots. The mode of the binding. OneTime means that the target property will be set once (when the binding is created) but that subsequent changes will be ignored. OneWay means that the target property will be set, and if the PropertyChanged event is raised by the source, the target property will be updated. TwoWay means that the source property will also be updated if the target raises the PropertyChanged event. Default means OneWay if only the source implements INPC, and TwoWay if both the source and the target implement INPC. The value to use when the binding is unable to return a value. This can happen if one of the items on the Path (except the source property itself) is null, or if the Converter throws an exception. The value used when the source property is null (or equals to default(TSource)). The new Binding instance. Sets a data binding between two properties of the same object. If the source implements INotifyPropertyChanged, has observable properties and the BindingMode is OneWay or TwoWay, the target property will be notified of changes to the source property. If the target implements INotifyPropertyChanged, has observable properties and the BindingMode is TwoWay, the source will also be notified of changes to the target's properties. The type of the source property that is being databound. The type of the target property that is being databound. If the source type is not the same as the target type, an automatic conversion will be attempted. However only simple types can be converted. For more complex conversions, use the and methods to define custom converters. The name of the target property. This must be a simple name, without dots. The source of the binding. If this object implements INotifyPropertyChanged and the BindingMode is OneWay or TwoWay, the target will be notified of changes to the target property. The name of the source property. This must be a simple name, without dots. The mode of the binding. OneTime means that the target property will be set once (when the binding is created) but that subsequent changes will be ignored. OneWay means that the target property will be set, and if the PropertyChanged event is raised by the source, the target property will be updated. TwoWay means that the source property will also be updated if the target raises the PropertyChanged event. Default means OneWay if only the source implements INPC, and TwoWay if both the source and the target implement INPC. The value to use when the binding is unable to return a value. This can happen if one of the items on the Path (except the source property itself) is null, or if the Converter throws an exception. The value used when the source property is null (or equals to default(TSource)). The new Binding instance. Sets a generic RelayCommand to an object and actuates the command when a specific event is raised. This method can only be used when the event uses a standard EventHandler. The type of the CommandParameter that will be passed to the RelayCommand. The element to which the command is added. The name of the event that will be subscribed to to actuate the command. The command that must be added to the element. A Binding instance subscribed to the CommandParameter that will passed to the RelayCommand. Depending on the Binding, the CommandParameter will be observed and changes will be passed to the command, for example to update the CanExecute. Sets a generic RelayCommand to an object and actuates the command when a specific event is raised. This method should be used when the event uses an EventHandler<TEventArgs>. The type of the CommandParameter that will be passed to the RelayCommand. The type of the event's arguments. The element to which the command is added. The command that must be added to the element. The name of the event that will be subscribed to to actuate the command. A Binding instance subscribed to the CommandParameter that will passed to the RelayCommand. Depending on the Binding, the CommandParameter will be observed and changes will be passed to the command, for example to update the CanExecute. Sets a non-generic RelayCommand to an object and actuates the command when a specific event is raised. This method can only be used when the event uses a standard EventHandler. The element to which the command is added. The name of the event that will be subscribed to to actuate the command. The command that must be added to the element. Sets a non-generic RelayCommand to an object and actuates the command when a specific event is raised. This method should be used when the event uses an EventHandler<TEventArgs>. The type of the event's arguments. The element to which the command is added. The name of the event that will be subscribed to to actuate the command. The command that must be added to the element. Sets a generic RelayCommand to an object and actuates the command when a specific event is raised. This method can only be used when the event uses a standard EventHandler. The type of the CommandParameter that will be passed to the RelayCommand. The element to which the command is added. The command that must be added to the element. The name of the event that will be subscribed to to actuate the command. The command parameter that will be passed to the RelayCommand when it is executed. This is a fixed value. To pass an observable value, use one of the SetCommand overloads that uses a Binding as CommandParameter. Sets a generic RelayCommand to an object and actuates the command when a specific event is raised. This method should be used when the event uses an EventHandler<TEventArgs>. The type of the CommandParameter that will be passed to the RelayCommand. The type of the event's arguments. The element to which the command is added. The command that must be added to the element. The name of the event that will be subscribed to to actuate the command. The command parameter that will be passed to the RelayCommand when it is executed. This is a fixed value. To pass an observable value, use one of the SetCommand overloads that uses a Binding as CommandParameter. Sets a generic RelayCommand to an object and actuates the command when a specific event is raised. This method can only be used when the event uses a standard EventHandler. This method does not specify the observed event explicitly. The following events are used: - For UIBarButtonItem: Clicked. - For UIButton: TouchUpInside. - At the moment, no other controls are supported. For other controls, use another SetCommand overload and specify the eventName parameter explicitly. The type of the CommandParameter that will be passed to the RelayCommand. The element to which the command is added. The command that must be added to the element. A Binding instance subscribed to the CommandParameter that will passed to the RelayCommand. Depending on the Binding, the CommandParameter will be observed and changes will be passed to the command, for example to update the CanExecute. Sets a generic RelayCommand to an object and actuates the command when a specific event is raised. This method should be used when the event uses an EventHandler<TEventArgs>. This method does not specify the observed event explicitly. The following events are used: - For UIBarButtonItem: Clicked. - For UIButton: TouchUpInside. - At the moment, no other controls are supported. For other controls, use another SetCommand overload and specify the eventName parameter explicitly. The type of the CommandParameter that will be passed to the RelayCommand. The type of the event's arguments. The element to which the command is added. The command that must be added to the element. A Binding instance subscribed to the CommandParameter that will passed to the RelayCommand. Depending on the Binding, the CommandParameter will be observed and changes will be passed to the command, for example to update the CanExecute. Sets an ICommand to an object and actuates the command when a specific event is raised. This method can only be used when the event uses a standard EventHandler. This method does not specify the observed event explicitly. The following events are used: - For UIBarButtonItem: Clicked. - For UIButton: TouchUpInside. - At the moment, no other controls are supported. For other controls, use another SetCommand overload and specify the eventName parameter explicitly. The element to which the command is added. The command that must be added to the element. Sets an ICommand to an object and actuates the command when a specific event is raised. This method should be used when the event uses an EventHandler<TEventArgs>. This method does not specify the observed event explicitly. The following events are used: - For UIBarButtonItem: Clicked. - For UIButton: TouchUpInside. - At the moment, no other controls are supported. For other controls, use another SetCommand overload and specify the eventName parameter explicitly. The type of the event's arguments. The element to which the command is added. The command that must be added to the element. Sets a generic RelayCommand to an object and actuates the command when a specific event is raised. This method can only be used when the event uses a standard EventHandler. This method does not specify the observed event explicitly. The following events are used: - For UIBarButtonItem: Clicked. - For UIButton: TouchUpInside. - At the moment, no other controls are supported. For other controls, use another SetCommand overload and specify the eventName parameter explicitly. The type of the CommandParameter that will be passed to the RelayCommand. The element to which the command is added. The command that must be added to the element. The command parameter that will be passed to the RelayCommand when it is executed. This is a fixed value. To pass an observable value, use one of the SetCommand overloads that uses a Binding as CommandParameter. Sets a generic RelayCommand to an object and actuates the command when a specific event is raised. This method should be used when the event uses an EventHandler<TEventArgs>. This method does not specify the observed event explicitly. The following events are used: - For UIBarButtonItem: Clicked. - For UIButton: TouchUpInside. - At the moment, no other controls are supported. For other controls, use another SetCommand overload and specify the eventName parameter explicitly. The type of the CommandParameter that will be passed to the RelayCommand. The type of the event's arguments. The element to which the command is added. The command that must be added to the element. The command parameter that will be passed to the RelayCommand when it is executed. This is a fixed value. To pass an observable value, use one of the SetCommand overloads that uses a Binding as CommandParameter. Defines how a is updated by a source control. Defines that the binding should be updated when the control loses the focus. Defines that the binding should be updated when the control's bound property changes. Defines extension methods for iOS only. Creates a new for a given . Note that if the IList doesn't implement INotifyCollectionChanged, the associated UICollectionView won't be updated when the IList changes. The type of the items in the IList. The type of cells in the CollectionView associated to this ObservableCollectionViewSource. The IList that should be represented in the associated UICollectionView A delegate to a method taking a and setting its elements' properties according to the item passed as second parameter. A delegate to a method returning a and used to set supplementary views on the UICollectionView. An ID used for optimization and cell reuse. An optional delegate returning an instance of a class deriving from . This can be used if you need to implement specific features in addition to the built-in features of ObservableCollectionViewSource. The new instance of ObservableCollectionViewSource. Creates a new for a given . The associated UICollectionView will be updated when the ObservableCollection changes. The type of the items in the IList. The type of cells in the CollectionView associated to this ObservableCollectionViewSource. The ObservableCollection that should be represented in the associated UICollectionView A delegate to a method taking a and setting its elements' properties according to the item passed as second parameter. A delegate to a method returing a and used to set supplementary views on the UICollectionView. An ID used for optimization and cell reuse. An optional delegate returning an instance of a class deriving from . This can be used if you need to implement specific features in addition to the built-in features of ObservableCollectionViewSource. The new instance of ObservableCollectionViewSource. Creates a new for a given . The type of the items contained in the collection. The collection that the adapter will be created for. A delegate to a method creating or reusing a . The cell will then be passed to the bindCellDelegate delegate to set the elements' properties. If you use a reuseId, you can pass null for the createCellDelegate. A delegate to a method taking a and setting its elements' properties according to the item passed as second parameter. The cell must be created first in the createCellDelegate delegate, unless a reuseId is passed to the method. A reuse identifier for the TableView's cells. A controller adapted to the collection passed in parameter. Creates a new for a given . The type of the items contained in the list. The list that the adapter will be created for. A delegate to a method creating or reusing a . The cell will then be passed to the bindCellDelegate delegate to set the elements' properties. If you use a reuseId, you can pass null for the createCellDelegate. A delegate to a method taking a and setting its elements' properties according to the item passed as second parameter. The cell must be created first in the createCellDelegate delegate, unless a reuseId is passed to the method. A reuse identifier for the TableView's cells. A controller adapted to the collection passed in parameter. Creates a new for a given . Note that if the IList doesn't implement INotifyCollectionChanged, the associated UITableView won't be updated when the IList changes. The type of the items in the IList. The IList that should be represented in the associated UITableView A delegate to a method taking a and setting its elements' properties according to the item passed as second parameter. An ID used for optimization and cell reuse. An optional delegate returning an instance of a class deriving from . This can be used if you need to implement specific features in addition to the built-in features of ObservableTableViewSource. The new instance of ObservableTableViewSource. Creates a new for a given . The associated UITableView will be updated when the ObservableCollection changes. The type of the items in the IList. The ObservableCollection that should be represented in the associated UITableView A delegate to a method taking a and setting its elements' properties according to the item passed as second parameter. An ID used for optimization and cell reuse. An optional delegate returning an instance of a class deriving from . This can be used if you need to implement specific features in addition to the built-in features of ObservableTableViewSource. The new instance of ObservableTableViewSource. Creates a new for a given . Note that if the IList doesn't implement INotifyCollectionChanged, the associated UITableView won't be updated when the IList changes. The type of the items in the IList. The IList that should be represented in the associated UITableView A delegate to a method creating or reusing a . The cell will then be passed to the bindCellDelegate delegate to set the elements' properties. Use this method only if you don't want to register with the UITableView.RegisterClassForCellReuse method for cell reuse. A delegate to a method taking a and setting its elements' properties according to the item passed as second parameter. An ID used for optimization and cell reuse. An optional delegate returning an instance of a class deriving from . This can be used if you need to implement specific features in addition to the built-in features of ObservableTableViewSource. The new instance of ObservableTableViewSource. Creates a new for a given . The associated UITableView will be updated when the ObservableCollection changes. The type of the items in the IList. The ObservableCollection that should be represented in the associated UITableView A delegate to a method taking a and setting its elements' properties according to the item passed as second parameter. A delegate to a method creating or reusing a . The cell will then be passed to the bindCellDelegate delegate to set the elements' properties. Use this method only if you don't want to register with the UITableView.RegisterClassForCellReuse method for cell reuse. An ID used for optimization and cell reuse. An optional delegate returning an instance of a class deriving from . This can be used if you need to implement specific features in addition to the built-in features of ObservableTableViewSource. The new instance of ObservableTableViewSource. A that can be used as an iOS view. After setting the and the and properties, the controller can be loaded. If the DataSource is an , changes to the collection will be observed and the UI will automatically be updated. Credits go to Frank A Krueger for the initial idea and the inspiration for this class. Frank gracefully accepted to let me add his code (with a few changes) to MVVM Light. https://gist.github.com/praeclarum/10024108 The type of the items contained in the . The property's name. When set, specifies which animation should be used when rows change. A delegate to a method taking a and setting its elements' properties according to the item passed as second parameter. The cell must be created first in the delegate. A delegate to a method creating or reusing a . The cell will then be passed to the delegate to set the elements' properties. The data source of this list controller. When set, specifieds which animation should be used when a row is deleted. When set, returns the height of the view that will be used for the TableView's footer. When set, returns the height of the view that will be used for the TableView's header. When set, returns a view that can be used as the TableView's footer. When set, returns a view that can be used as the TableView's header. A reuse identifier for the TableView's cells. Gets the TableView's selected item. Changes to that property's value raise the PropertyChanged event. The source of the TableView. Overrides . Sets or gets the controllers TableView. If you use a TableView placed in the UI manually, use this property's setter to assign your TableView to this controller. Initializes a new instance of this class with a plain style. Initializes a new instance of this class with a specific style. The style that will be used for this controller. Overrides the method. Binds a to an item's properties. If a is available, this delegate will be used. If not, a simple text will be shown. The cell that will be prepared. The item that should be used to set the cell up. The for this cell. Creates a corresponding to the reuseId. If it is set, the delegate will be used. A reuse identifier for the cell. The created cell. Created the ObservableTableSource for this controller. The created ObservableTableSource. Called when a row gets selected. Raises the SelectionChanged event. The selected item. The NSIndexPath for the selected row. Raises the event. The name of the property that changed. Occurs when a property of this instance changes. Occurs when a new item gets selected in the list. A that handles changes to the underlying data source if this data source is an . The type of the items that the data source contains. In the current implementation, only one section is supported. A reuse identifier for the TableView's cells. Initializes an instance of this class. The controller associated to this instance. Attempts to dequeue or create a cell for the list. The TableView that is the cell's parent. The NSIndexPath for the cell. The created or recycled cell. When called, checks if the ObservableTableViewController{T}.GetHeightForFooter delegate has been set. If yes, calls that delegate to get the TableView's footer height. The active TableView. The section index. The footer's height. In the current implementation, only one section is supported. When called, checks if the ObservableTableViewController{T}.GetHeightForHeader delegate has been set. If yes, calls that delegate to get the TableView's header height. The active TableView. The section index. The header's height. In the current implementation, only one section is supported. When called, checks if the ObservableTableViewController{T}.GetViewForFooter delegate has been set. If yes, calls that delegate to get the TableView's footer. The active TableView. The section index. The UIView that should appear as the section's footer. In the current implementation, only one section is supported. When called, checks if the ObservableTableViewController{T}.GetViewForHeader delegate has been set. If yes, calls that delegate to get the TableView's header. The active TableView. The section index. The UIView that should appear as the section's header. In the current implementation, only one section is supported. Overrides the method. The active TableView. The number of sections of the UITableView. In the current implementation, only one section is supported. Overrides the method and notifies the associated that a row has been selected, so that the corresponding events can be raised. The active TableView. The row's NSIndexPath. Overrides the method and returns the number of rows in the associated data source. The active TableView. The active section. The number of rows in the data source. In the current implementation, only one section is supported. A that automatically updates the associated when its data source changes. Note that the changes are only observed if the data source implements . The type of the items in the data source. The type of the used in the CollectionView. This can either be UICollectionViewCell or a derived type. The property's name. A delegate to a method taking a and setting its elements' properties according to the item passed as second parameter. The data source of this list controller. A delegate to a method returning a and used to set supplementary views on the UICollectionView. A reuse identifier for the UICollectionView's cells. Gets the UICollectionView's selected item. You can use one-way databinding on this property. Creates and initializes a new instance of Overrides the method. Creates and returns a cell for the UICollectionView. Where needed, this method will optimize the reuse of cells for a better performance. The UICollectionView associated to this source. The NSIndexPath pointing to the item for which the cell must be returned. The created and initialised . Gets the item selected by the NSIndexPath passed as parameter. The NSIndexPath pointing to the desired item. The item selected by the NSIndexPath passed as parameter. Overrides the method. Gets the number of items in the data source. The UICollectionView associated to this source. The section for which the count is needed. In the current implementation, only one section is supported. The number of items in the data source. Overrides the method. When called, checks if the delegate has been set. If yes, calls that delegate to get a supplementary view for the UICollectionView. The UICollectionView associated to this source. The kind of supplementary element. The NSIndexPath pointing to the element. A supplementary view for the UICollectionView. Overrides the method. Called when an item is deselected in the UICollectionView. If you subclass ObservableCollectionViewSource, you may override this method but you may NOT call base.ItemDeselected(...) in your overriden method, as this causes an exception in iOS. Because of this, you must take care of resetting the property yourself by calling SelectedItem = default(TItem); The UICollectionView associated to this source. The NSIndexPath pointing to the element. Overrides the method. Called when an item is selected in the UICollectionView. If you subclass ObservableCollectionViewSource, you may override this method but you may NOT call base.ItemSelected(...) in your overriden method, as this causes an exception in iOS. Because of this, you must take care of setting the property yourself by calling var item = GetItem(indexPath); SelectedItem = item; The UICollectionView associated to this source. The NSIndexPath pointing to the element. Overrides the method. The number of sections in this UICollectionView. In the current implementation, only one section is supported. The UICollectionView associated to this source. Sets a 's elements according to an item's properties. If a is available, this delegate will be used. If not, a simple text will be shown. The cell that will be prepared. The item that should be used to set the cell up. The for this cell. Raises the event. The name of the property that changed. Occurs when a property of this instance changes. Occurs when a new item gets selected in the UICollectionView. A that automatically updates the associated when its data source changes. Note that the changes are only observed if the data source implements . The type of the items in the data source. The property's name. When set, specifies which animation should be used when rows are added. A delegate to a method taking a and setting its elements' properties according to the item passed as second parameter. A delegate to a method creating or reusing a . The cell will then be passed to the delegate to set the elements' properties. Note that this delegate is only used if you didn't register with a ReuseID using the UITableView.RegisterClassForCell method. The data source of this list controller. When set, specifieds which animation should be used when a row is deleted. When set, returns the height of the view that will be used for the TableView's footer. When set, returns the height of the view that will be used for the TableView's header. When set, returns a view that can be used as the TableView's footer. When set, returns a view that can be used as the TableView's header. A reuse identifier for the TableView's cells. Gets the UITableView's selected item. You can use one-way databinding on this property. Constructs and initializes an instance of Creates and returns a cell for the UITableView. Where needed, this method will optimize the reuse of cells for a better performance. The UITableView associated to this source. The NSIndexPath pointing to the item for which the cell must be returned. The created and initialised . When called, checks if the has been set. If yes, calls that delegate to get the TableView's footer height. The active TableView. The section index. The footer's height. In the current implementation, only one section is supported. When called, checks if the delegate has been set. If yes, calls that delegate to get the TableView's header height. The active TableView. The section index. The header's height. In the current implementation, only one section is supported. Gets the item selected by the NSIndexPath passed as parameter. The NSIndexPath pointing to the desired item. The item selected by the NSIndexPath passed as parameter. When called, checks if the delegate has been set. If yes, calls that delegate to get the TableView's footer. The active TableView. The section index. The UIView that should appear as the section's footer. In the current implementation, only one section is supported. When called, checks if the delegate has been set. If yes, calls that delegate to get the TableView's header. The active TableView. The section index. The UIView that should appear as the section's header. In the current implementation, only one section is supported. Overrides the method. The active TableView. The number of sections of the UITableView. In the current implementation, only one section is supported. Overrides the method. When called, sets the property to null and raises the PropertyChanged and the SelectionChanged events. The active TableView. The row's NSIndexPath. Overrides the method. When called, sets the property and raises the PropertyChanged and the SelectionChanged events. The active TableView. The row's NSIndexPath. Overrides the method and returns the number of rows in the associated data source. The active TableView. The active section. The number of rows in the data source. In the current implementation, only one section is supported. Binds a to an item's properties. If a is available, this delegate will be used. If not, a simple text will be shown. The cell that will be prepared. The item that should be used to set the cell up. The for this cell. Creates a corresponding to the reuseId. If it is set, the delegate will be used. A reuse identifier for the cell. The created cell. Raises the event. The name of the property that changed. Occurs when a property of this instance changes. Occurs when a new item gets selected in the list. Helper class for dispatcher operations on the UI thread in Android. Gets a reference to a NSObject running on the UI thread, after the method has been called on that thread. Executes an action on the UI thread. If this method is called from the UI thread, the action is executed immendiately. If the method is called from another thread, the action will be enqueued on the UI thread's dispatcher and executed asynchronously. For additional operations on the UI thread, you can get a reference to the UI thread's dispatcher thanks to the property . The action that will be executed on the UI thread. This method should be called once on the UI thread to ensure that the property is initialized. Resets the class by deleting the A base class to be used with the when using Storyboards. The parameter passed to this controller by the method. A constructor that initializes the object from the data stored in the unarchiver object. The unarchiver object. Check the remarks on Constructor to call on derived classes to skip initialization and merely allocate the object. Unused sentinel value, pass NSObjectFlag.Empty. Check the remarks on Initializes an instance of this class. The NIB name, or null. This parameter can be null. The bundle where the search for the NIB takes place, if you pass null, this searches for the NIB on the main bundle. This parameter can be null. Check the remarks on Initializes an instance of this class. A constructor used when creating managed representations of unmanaged objects; Called by the runtime. Pointer (handle) to the unmanaged object. Check the remarks on An implementation of allowing to display simple dialogs to the user. Note that this class uses the built in Windows Phone dialogs which may or may not be sufficient for your needs. Using this class is easy but feel free to develop your own IDialogService implementation if needed. Displays information about an error. The message to be shown to the user. The title of the dialog box. This may be null. The text shown in the only button in the dialog box. If left null, the text "OK" will be used. A callback that should be executed after the dialog box is closed by the user. A Task allowing this async method to be awaited. Displaying dialogs in iOS is synchronous. As such, this method will be executed synchronously even though it can be awaited for cross-platform compatibility purposes. Displays information about an error. The exception of which the message must be shown to the user. The title of the dialog box. This may be null. The text shown in the only button in the dialog box. If left null, the text "OK" will be used. A callback that should be executed after the dialog box is closed by the user. A Task allowing this async method to be awaited. Displaying dialogs in iOS is synchronous. As such, this method will be executed synchronously even though it can be awaited for cross-platform compatibility purposes. Displays information to the user. The dialog box will have only one button with the text "OK". The message to be shown to the user. The title of the dialog box. This may be null. A Task allowing this async method to be awaited. Displaying dialogs in Android is synchronous. As such, this method will be executed synchronously even though it can be awaited for cross-platform compatibility purposes. Displays information to the user. The dialog box will have only one button. The message to be shown to the user. The title of the dialog box. This may be null. The text shown in the only button in the dialog box. If left null, the text "OK" will be used. A callback that should be executed after the dialog box is closed by the user. A Task allowing this async method to be awaited. Displaying dialogs in Android is synchronous. As such, this method will be executed synchronously even though it can be awaited for cross-platform compatibility purposes. Displays information to the user. The dialog box will have only one button. The message to be shown to the user. The title of the dialog box. This may be null. The text shown in the "confirm" button in the dialog box. If left null, the text "OK" will be used. The text shown in the "cancel" button in the dialog box. If left null, the text "Cancel" will be used. A callback that should be executed after the dialog box is closed by the user. The callback method will get a boolean parameter indicating if the "confirm" button (true) or the "cancel" button (false) was pressed by the user. A Task allowing this async method to be awaited. The task will return true or false depending on the dialog result. Displaying dialogs in Android is synchronous. As such, this method will be executed synchronously even though it can be awaited for cross-platform compatibility purposes. Displays information to the user in a simple dialog box. The dialog box will have only one button with the text "OK". This method should be used for debugging purposes. The message to be shown to the user. The title of the dialog box. This may be null. A Task allowing this async method to be awaited. Displaying dialogs in Android is synchronous. As such, this method will be executed synchronously even though it can be awaited for cross-platform compatibility purposes. Xamarin iOS implementation of . This implementation can be used in Xamarin iOS applications (not Xamarin Forms). For this navigation service to work properly, it should be initialized using the method, with the application's . The key that is returned by the property when the current UIViewController is the root controller. The key that is returned by the property when the current UIViewController is not found. This can be the case when the navigation wasn't managed by this NavigationService, for example when it is directly triggered in the Storyboard. The key corresponding to the currently displayed page. Gets the NavigationController that was passed in the method. Adds a key/page pair to the navigation service. This method will create a new controller on demand, using reflection. You can use if you need more fine-grained control over the controller's creation. The key that will be used later in the or methods. The type of the controller corresponding to the key. Adds a key/page pair to the navigation service. This method allows the caller to have fine grained control over the controller's creation. The key that will be used later in the or methods. A Func returning the controller corresponding to the given key. Adds a key/page pair to the navigation service. This method should be used when working with Storyboard for the UI. The key that will be used later in the or methods. The idea of the UIViewController in the Storyboard. Use the storyboardIdentifier/restorationIdentifier property in the *.storyboard document. Allows a caller to get the navigation parameter corresponding to the Intent parameter. The that was navigated to. The navigation parameter. If no parameter is found, returns null. If possible, discards the current page and displays the previous page on the navigation stack. Initialized the navigation service. This method must be called before the or methods are called. The application's navigation controller. Displays a new page corresponding to the given key. Make sure to call the or method first. The key corresponding to the page that should be displayed. When this method is called for a key that has not been configured earlier. Displays a new page corresponding to the given key, and passes a parameter to the new page's constructor. Make sure to call the or method first. The key corresponding to the page that should be displayed. The parameter that should be passed to the new page's constructor. When this method is called for a key that has not been configured earlier. When this method is called for a page that doesn't have a suitable constructor (i.e. a constructor with a parameter corresponding to the navigation parameter's type). Provides event listening support for classes that expect to receive events through the WeakEvent pattern and a WeakEventManager. Gets the WeakReference holding the instance that raised the event. Receives events from the centralized event manager. The type of the WeakEventManager calling this method. Object that originated the event. Event data. true if the listener handled the event. It is considered an error by the WeakEventManager handling in WPF to register a listener for an event that the listener does not handle. Regardless, the method should return false if it receives an event that it does not recognize or handle. Provides an implementation so that you can use the "weak event listener" pattern to attach listeners for the event. Get the current instance of Adds the specified listener to the list of listeners on the specified source. The object with the event. The object to add as a listener. The name of the property that exists on source upon which to listen for changes. Removes the specified listener from the list of listeners on the specified source. The object to remove as a listener. Private method to add the specified listener to the list of listeners on the specified source. The object with the event. The object to add as a listener. The name of the property that exists on source upon which to listen for changes. Private method to remove the specified listener from the list of listeners on the specified source. The object to remove as a listener. The method that handles the event. The source of the event. A that contains the event data. Begin listening for the event on the provided source. The object on which to start listening for . Stop listening for the event on the provided source. The object on which to start listening for .