Skip to content

Commit 7691432

Browse files
author
Ricardo Krause
committed
rename class to fix 404 error
update class with current c# features change namespace
1 parent 092f551 commit 7691432

File tree

2 files changed

+8
-20
lines changed

2 files changed

+8
-20
lines changed

MainDemo.Wpf/Domain/ListFieldsViewModel.cs renamed to MainDemo.Wpf/Domain/ListsAndGridsViewModel.cs

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
using System.Collections.ObjectModel;
33
using System.ComponentModel;
44
using System.Runtime.CompilerServices;
5-
using System.Windows.Controls;
5+
using MaterialDesignColors.WpfExample.Domain;
66

7-
namespace MaterialDesignColors.WpfExample.Domain
7+
namespace MaterialDesignDemo.Domain
88
{
99
public class ListsAndGridsViewModel : INotifyPropertyChanged
1010
{
@@ -36,7 +36,7 @@ public bool? IsAllItems3Selected
3636
}
3737
}
3838

39-
private void SelectAll(bool select, IEnumerable<SelectableViewModel> models)
39+
private static void SelectAll(bool select, IEnumerable<SelectableViewModel> models)
4040
{
4141
foreach (var model in models)
4242
{
@@ -70,28 +70,16 @@ private static ObservableCollection<SelectableViewModel> CreateData()
7070
};
7171
}
7272

73-
public ObservableCollection<SelectableViewModel> Items1
74-
{
75-
get { return _items1; }
76-
}
73+
public ObservableCollection<SelectableViewModel> Items1 => _items1;
74+
public ObservableCollection<SelectableViewModel> Items2 => _items2;
7775

78-
public ObservableCollection<SelectableViewModel> Items2
79-
{
80-
get { return _items2; }
81-
}
82-
83-
public ObservableCollection<SelectableViewModel> Items3
84-
{
85-
get { return _items3; }
86-
}
76+
public ObservableCollection<SelectableViewModel> Items3 => _items3;
8777

8878
public event PropertyChangedEventHandler PropertyChanged;
8979

9080
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
9181
{
92-
if (PropertyChanged != null)
93-
PropertyChanged.Invoke(this, new PropertyChangedEventArgs(propertyName));
94-
//PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
82+
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
9583
}
9684

9785
public IEnumerable<string> Foods

MainDemo.Wpf/MaterialDesignDemo.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
<Compile Include="Domain\NotifyPropertyChangedExtension.cs" />
100100
<Compile Include="Domain\DemoItem.cs" />
101101
<Compile Include="Domain\DialogsViewModel.cs" />
102-
<Compile Include="Domain\ListFieldsViewModel.cs" />
102+
<Compile Include="Domain\ListsAndGridsViewModel.cs" />
103103
<Compile Include="Domain\Sample4Dialog.xaml.cs">
104104
<DependentUpon>Sample4Dialog.xaml</DependentUpon>
105105
</Compile>

0 commit comments

Comments
 (0)