mirror of
https://github.com/DevExpress/netcore-winforms-demos.git
synced 2025-12-30 13:30:06 +00:00
30 lines
1.1 KiB
C#
30 lines
1.1 KiB
C#
namespace DevExpress.DevAV.Modules {
|
|
using DevExpress.DevAV.Presenters;
|
|
using DevExpress.DevAV.ViewModels;
|
|
using DevExpress.Utils.MVVM;
|
|
|
|
public partial class CustomersPeek : BaseModuleControl {
|
|
CustomerPeekListPresenter presenterCore;
|
|
IPropertyBinding entitiesBinding;
|
|
public CustomersPeek()
|
|
: base(typeof(CustomerCollectionViewModel)) {
|
|
InitializeComponent();
|
|
entitiesBinding = mvvmContext.SetBinding(gridControl, g => g.DataSource, "Entities");
|
|
presenterCore = CreatePresenter();
|
|
}
|
|
protected override void OnDisposing() {
|
|
Presenter.Dispose();
|
|
entitiesBinding.Dispose();
|
|
base.OnDisposing();
|
|
}
|
|
public CustomerCollectionViewModel ViewModel {
|
|
get { return GetViewModel<CustomerCollectionViewModel>(); }
|
|
}
|
|
public CustomerPeekListPresenter Presenter {
|
|
get { return presenterCore; }
|
|
}
|
|
protected virtual CustomerPeekListPresenter CreatePresenter() {
|
|
return new CustomerPeekListPresenter(gridView, ViewModel);
|
|
}
|
|
}
|
|
} |