diff --git a/README.md b/README.md index eadb31e..e956fa4 100644 --- a/README.md +++ b/README.md @@ -1 +1,55 @@ **[View document in Syncfusion Xamarin Knowledge base](https://www.syncfusion.com/kb/12154/how-to-bind-command-to-expander-in-itemtemplate-of-xamarin-forms-listview-sflistview)** + +## Sample + +```xaml + + + + + + + + . . . + . . . + + + + + . . . + . . . + + + + + + + + +C#: + +public static readonly BindableProperty EventNameProperty = BindableProperty.Create ("EventName", typeof(string), typeof(EventToCommandBehavior), null, propertyChanged: OnEventNameChanged); +public static readonly BindableProperty CommandProperty = BindableProperty.Create ("Command", typeof(ICommand), typeof(EventToCommandBehavior), null); +public static readonly BindableProperty CommandParameterProperty = BindableProperty.Create ("CommandParameter", typeof(object), typeof(EventToCommandBehavior), null); +public static readonly BindableProperty InputConverterProperty = BindableProperty.Create ("Converter", typeof(IValueConverter), typeof(EventToCommandBehavior), null); + +public string EventName { + get { return (string)GetValue (EventNameProperty); } + set { SetValue (EventNameProperty, value); } +} + +public ICommand Command { + get { return (ICommand)GetValue (CommandProperty); } + set { SetValue (CommandProperty, value); } +} + +public object CommandParameter { + get { return GetValue (CommandParameterProperty); } + set { SetValue (CommandParameterProperty, value); } +} + +public IValueConverter Converter { + get { return (IValueConverter)GetValue (InputConverterProperty); } + set { SetValue (InputConverterProperty, value); } +} +```