port from perforce
This commit is contained in:
30
intromat/Intromat/Views/Previews/StringPreview.xaml.cs
Normal file
30
intromat/Intromat/Views/Previews/StringPreview.xaml.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using System.Reactive.Disposables;
|
||||
using Intromat.ViewModels.Previews;
|
||||
using ReactiveUI;
|
||||
|
||||
namespace Intromat.Views.Previews
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for StringPreview.xaml
|
||||
/// </summary>
|
||||
public partial class StringPreview : IViewFor<StringPreviewViewModel>
|
||||
{
|
||||
public StringPreview()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
this.WhenActivated(d =>
|
||||
{
|
||||
this.Bind(ViewModel, vm => vm.Value, v => v._textBlock.Text).DisposeWith(d);
|
||||
});
|
||||
}
|
||||
|
||||
object? IViewFor.ViewModel
|
||||
{
|
||||
get => ViewModel;
|
||||
set => ViewModel = (StringPreviewViewModel?)value;
|
||||
}
|
||||
|
||||
public StringPreviewViewModel? ViewModel { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user