port from perforce
This commit is contained in:
36
intromat/Intromat/Views/CodeGenPendingConnectionView.xaml.cs
Normal file
36
intromat/Intromat/Views/CodeGenPendingConnectionView.xaml.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.Reactive.Disposables;
|
||||
using System.Windows;
|
||||
using Intromat.ViewModels;
|
||||
using ReactiveUI;
|
||||
|
||||
namespace Intromat.Views
|
||||
{
|
||||
public partial class CodeGenPendingConnectionView : IViewFor<CodeGenPendingConnectionViewModel>
|
||||
{
|
||||
public static readonly DependencyProperty ViewModelProperty = DependencyProperty.Register(nameof(ViewModel),
|
||||
typeof(CodeGenPendingConnectionViewModel), typeof(CodeGenPendingConnectionView), new PropertyMetadata(null));
|
||||
|
||||
public CodeGenPendingConnectionView()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
this.WhenActivated(d =>
|
||||
{
|
||||
PendingConnectionView.ViewModel = ViewModel;
|
||||
d(Disposable.Create(() => PendingConnectionView.ViewModel = null));
|
||||
});
|
||||
}
|
||||
|
||||
public CodeGenPendingConnectionViewModel? ViewModel
|
||||
{
|
||||
get => (CodeGenPendingConnectionViewModel?)GetValue(ViewModelProperty);
|
||||
set => SetValue(ViewModelProperty, value);
|
||||
}
|
||||
|
||||
object? IViewFor.ViewModel
|
||||
{
|
||||
get => ViewModel;
|
||||
set => ViewModel = (CodeGenPendingConnectionViewModel?)value;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user