public class DataFormViewModel
{
private DataFormModel _item;
public DataFormModel Item
{
get { return _item; }
set
{
_item = value;
}
}
public void SomeMethod()
{
this.Item.Number = "123456";
}
public DataFormViewModel()
{
this._item = new DataFormModel();
this.SomeMethod();
}
} |
[XAML]
<dataForm:SfDataForm Grid.Row="1" x:Name="dataForm" DataObject="{Binding Item}" NotifyPropertyChanges="True"/> |
[C#]
public DataFormModel Item
{
get { return _item; }
set
{
_item = value;
this.RaisePropertyChanged("Item");
}
}
|