Skip to content

Commit

Permalink
[Clean]Code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
zerodev1200 committed Nov 16, 2024
1 parent 2bab43c commit 85523ca
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
4 changes: 1 addition & 3 deletions sandbox/WpfApp1/Item.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System.ComponentModel;
using System.Windows.Controls;


namespace WpfApp1;
internal class Item : BindableBase
{
Expand Down
15 changes: 8 additions & 7 deletions sandbox/WpfApp1/ViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Diagnostics;

namespace WpfApp1;

public class ViewModel
Expand All @@ -19,7 +20,6 @@ public class ViewModel

public ViewModel()
{

var source = ReactiveValidationHelper.CreateCanExecuteSource(RP1, RP2, RP3);
SubmitCommand = source.ToReactiveCommand(x =>
{
Expand Down Expand Up @@ -80,20 +80,21 @@ public ViewModel()
var bindable4 = outerObject.ToTwoWayBindableReactiveProperty(
x => x.InnerObject,
y => y.DeepInnerObject,
y => y.DeepNestedValue,
z => z.DeepNestedValue,
pushCurrentValueOnSubscribe: true);

bindable.Value = 1;
bindable2.Value = "1";
}

}
}

public class Outer : INotifyPropertyChanged
{
private Inner? _innerObject;
private Inner _innerObject = new();
public event PropertyChangedEventHandler? PropertyChanged;

public Inner? InnerObject
public Inner InnerObject
{
get => _innerObject;
set
Expand All @@ -108,7 +109,7 @@ public class Inner : INotifyPropertyChanged
{
private int _nestedIntValue;
private string _nestedStringValue = "";
private DeepInner? _deepInnerObject;
private DeepInner _deepInnerObject = new();
public event PropertyChangedEventHandler? PropertyChanged;

public int NestedIntValue
Expand All @@ -131,7 +132,7 @@ public string NestedStringValue
}
}

public DeepInner? DeepInnerObject
public DeepInner DeepInnerObject
{
get => _deepInnerObject;
set
Expand Down

0 comments on commit 85523ca

Please sign in to comment.