Hi i have an application Wpf with Caliburn Micro and MongoDb i have a collection like this
[Bson IgnoreExtraElements]
public class ResourceCollection : CompanyModel
{
public ResourceCollection(string Vat) : base(Vat)
{
}
private long _ResourceID;
public long ResourceID
{
get { return _ResourceID; }
set { _ResourceID = value; }
}
private string _Description;
public string Description
{
get { return _Description; }
set
{
_Description = value;
NotifyOfPropertyChange(() => Description);
}
}
}
where CompanyModel inherit from PropertyChangedBase, and i have a view model:
public class ResourceCreateViewModel : Screen
{
private IWindowManager _windowManager;
private readonly AppConnection _appConnection;
private readonly ResourceRepository _resourceRepository;
private ResourceCollection _Resource;
public ResourceCollection Resource
{
get
{
return _Resource;
}
set
{
_Resource = value;
NotifyOfPropertyChange(() => Resource);
NotifyOfPropertyChange(() => CanSave);
}
}
}
And this is my xaml
<TextBox Text="{Binding Resource.Description, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Height="20" DockPanel.Dock="Right"></TextBox>
my problem is that when i change the value inside the texbox, the set of my viewmodel class not fire, how can i bind my class to the textbox?
Thank you in advance