2 using System.Collections.Generic;
5 using System.Reflection;
6 using System.Configuration;
9 using SiliconStudio.Presentation.ViewModel;
11 namespace SiliconStudio.
Paradox.ConfigEditor.ViewModels
16 public PropertyInfo Property {
get;
private set; }
17 public ConfigurationPropertyAttribute Attribute {
get;
private set; }
22 throw new ArgumentNullException(
"parent");
24 throw new ArgumentNullException(
"property");
25 if (attribute == null)
26 throw new ArgumentNullException(
"attribute");
31 Attribute = attribute;
33 DefaultValue = Attribute.DefaultValue;
40 get {
return isUsed; }
41 set { SetValue(ref isUsed, value,
"IsUsed"); }
44 public string PropertyName {
get {
return Property.Name; } }
45 public string PropertyTypeName {
get {
return Property.PropertyType.FullName; } }
47 public object DefaultValue {
get;
private set; }
53 set { SetValue(ref this.value, value,
"Value"); }
56 public bool IsRequired {
get {
return Attribute.IsRequired; } }
This abstract class represents a basic view model, implementing INotifyPropertyChanging and INotifyPr...
PropertyViewModel(SectionViewModel parent, PropertyInfo property, ConfigurationPropertyAttribute attribute)