Implemented opening/saving themes
This commit is contained in:
17
Filtration.Common/ViewModels/FiltrationViewModelBase.cs
Normal file
17
Filtration.Common/ViewModels/FiltrationViewModelBase.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
using Filtration.ObjectModel.Annotations;
|
||||
using GalaSoft.MvvmLight;
|
||||
|
||||
namespace Filtration.Common.ViewModels
|
||||
{
|
||||
public class FiltrationViewModelBase : ViewModelBase
|
||||
{
|
||||
/// This gives us the ReSharper option to transform an autoproperty into a property with change notification
|
||||
/// Also leverages .net 4.5 callermembername attribute
|
||||
[NotifyPropertyChangedInvocator]
|
||||
protected override void RaisePropertyChanged([CallerMemberName]string property = "")
|
||||
{
|
||||
base.RaisePropertyChanged(property);
|
||||
}
|
||||
}
|
||||
}
|
||||
65
Filtration.Common/ViewModels/PaneViewModel.cs
Normal file
65
Filtration.Common/ViewModels/PaneViewModel.cs
Normal file
@@ -0,0 +1,65 @@
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace Filtration.Common.ViewModels
|
||||
{
|
||||
public class PaneViewModel : FiltrationViewModelBase
|
||||
{
|
||||
private string _title;
|
||||
public string Title
|
||||
{
|
||||
get { return _title; }
|
||||
set
|
||||
{
|
||||
if (_title != value)
|
||||
{
|
||||
_title = value;
|
||||
RaisePropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public ImageSource IconSource { get; protected set; }
|
||||
|
||||
private string _contentId;
|
||||
public string ContentId
|
||||
{
|
||||
get { return _contentId; }
|
||||
set
|
||||
{
|
||||
if (_contentId != value)
|
||||
{
|
||||
_contentId = value;
|
||||
RaisePropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private bool _isSelected;
|
||||
public bool IsSelected
|
||||
{
|
||||
get { return _isSelected; }
|
||||
set
|
||||
{
|
||||
if (_isSelected != value)
|
||||
{
|
||||
_isSelected = value;
|
||||
RaisePropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private bool _isActive;
|
||||
public bool IsActive
|
||||
{
|
||||
get { return _isActive; }
|
||||
set
|
||||
{
|
||||
if (_isActive != value)
|
||||
{
|
||||
_isActive = value;
|
||||
RaisePropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user