36 lines
1.2 KiB
C#
36 lines
1.2 KiB
C#
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;
|
|
}
|
|
}
|
|
} |