Added alternative .NET 4.6.2 project; MultiPageViewForm now has a default constructor just so it doesn't upset the Windows Forms designer

git-svn-id: file:///srv/devel/repo-conversion/nuwi@57 d2e56fa2-650e-0410-a79f-9358c0239efd
This commit is contained in:
Markus Ewald 2023-10-03 12:35:14 +00:00
parent db68a9741e
commit 857917aad5
3 changed files with 203 additions and 12 deletions

View file

@ -59,6 +59,11 @@ namespace Nuclex.Windows.Forms.Views {
#endregion // struct RedrawLockScope
/// <summary>Initializes a new multi page view window for the windows forms designer</summary>
public MultiPageViewForm() {
this.createViewMethod = typeof(IWindowManager).GetMethod(nameof(IWindowManager.CreateView));
}
/// <summary>Initializes a new multi page view window</summary>
/// <param name="windowManager">
/// Window manager that is used to set up the child views

View file

@ -36,6 +36,18 @@ namespace Nuclex.Windows.Forms.Views {
this.onViewModelPropertyChangedDelegate = OnViewModelPropertyChanged;
}
/// <summary>Provides the data binding target for the view</summary>
public object DataContext {
get { return this.dataContext; }
set {
if(value != this.dataContext) {
object oldDataContext = this.dataContext;
this.dataContext = value;
OnDataContextChanged(this, oldDataContext, value);
}
}
}
/// <summary>Called when the window's data context is changed</summary>
/// <param name="sender">Window whose data context was changed</param>
/// <param name="oldDataContext">Data context that was previously used</param>
@ -67,18 +79,6 @@ namespace Nuclex.Windows.Forms.Views {
object sender, PropertyChangedEventArgs arguments
) { }
/// <summary>Provides the data binding target for the view</summary>
public object DataContext {
get { return this.dataContext; }
set {
if(value != this.dataContext) {
object oldDataContext = this.dataContext;
this.dataContext = value;
OnDataContextChanged(this, oldDataContext, value);
}
}
}
/// <summary>Active data binding target, can be null</summary>
private object dataContext;
/// <summary>Delegate for the OnViewModelPropertyChanged() method</summary>