/// <summary> /// Initializes a new instance of the <see cref="DefaultPropertyViewModelFactory"/> class. /// </summary> /// <param name="owner">The owner PropertyEditor of the factory. /// This is neccessary in order to get the PropertyTemplateSelector to work.</param> public DefaultPropertyViewModelFactory(PropertyEditor owner) { this.owner = owner; IsEnabledPattern = "Is{0}Enabled"; IsVisiblePattern = "Is{0}Visible"; UsePropertyPattern = "Use{0}"; }
public OptionalPropertyViewModel(object instance, PropertyDescriptor descriptor, PropertyDescriptor optionalDescriptor, PropertyEditor owner) : base(instance, descriptor, owner) { this.optionalDescriptor = optionalDescriptor; // http://msdn.microsoft.com/en-us/library/ms366789.aspx IsPropertyNullable = descriptor.PropertyType.IsGenericType && descriptor.PropertyType.GetGenericTypeDefinition() == typeof(Nullable<>); IsPropertyNullable = true; }
/// <summary> /// Initializes a new instance of the <see cref="PropertyViewModel"/> class. /// </summary> /// <param name="instance">The instance being edited</param> /// <param name="descriptor">The property descriptor</param> /// <param name="owner">The parent PropertyEditor</param> public PropertyViewModel(object instance, PropertyDescriptor descriptor, PropertyEditor owner) : base(owner) { Instance = instance; Descriptor = descriptor; Header = descriptor.DisplayName; ToolTip = descriptor.Description; Height = double.NaN; }
/// <summary> /// Initializes a new instance of the <see cref="PropertyViewModel"/> class. /// </summary> /// <param name="instance"> /// The instance being edited /// </param> /// <param name="descriptor"> /// The property descriptor /// </param> /// <param name="owner"> /// The parent PropertyEditor /// </param> public PropertyViewModel(object instance, PropertyDescriptor descriptor, PropertyEditor owner) : base(owner) { this.Instance = instance; this.Descriptor = descriptor; this.Header = descriptor.DisplayName; this.ToolTip = descriptor.Description; this.Height = double.NaN; this.SetByThis = false; }
/// <summary> /// Initializes a new instance of the <see cref="ResettablePropertyViewModel"/> class. /// </summary> /// <param name="instance"> /// The instance. /// </param> /// <param name="descriptor"> /// The descriptor. /// </param> /// <param name="owner"> /// The owner. /// </param> public ResettablePropertyViewModel(object instance, PropertyDescriptor descriptor, PropertyEditor owner) : base(instance, descriptor, owner) { this.instance = instance; this.resettableDescriptor = descriptor; this.ResetCommand = new DelegateCommand(this.ExecuteReset); var resettableAttr = AttributeHelper.GetFirstAttribute<ResettableAttribute>(this.resettableDescriptor); if (resettableAttr != null) { this.Label = (string)resettableAttr.ButtonLabel; } }
public CategoryViewModel(string categoryName, PropertyEditor owner) : base(owner) { Name = Header = categoryName; Properties = new List <PropertyViewModel>(); }
public OptionalPropertyViewModel(object instance, PropertyDescriptor descriptor, string optionalPropertyName, PropertyEditor owner) : this(instance,descriptor, GetDescriptor(instance,optionalPropertyName),owner) { }
public WidePropertyViewModel(object instance, PropertyDescriptor descriptor, bool showHeader, PropertyEditor owner) : base(instance, descriptor, owner) { HeaderVisibility = showHeader ? Visibility.Visible : Visibility.Collapsed; }
public CategoryTemplateSelector(PropertyEditor owner) { Owner = owner; }
/// <summary> /// Initializes a new instance of the <see cref="ViewModelBase"/> class. /// </summary> /// <param name="owner"> /// The owner. /// </param> protected ViewModelBase(PropertyEditor owner) { this.Owner = owner; this.SortIndex = int.MinValue; }
/// <summary> /// Initializes a new instance of the <see cref="SlidablePropertyViewModel"/> class. /// </summary> /// <param name="instance"> /// The instance. /// </param> /// <param name="descriptor"> /// The descriptor. /// </param> /// <param name="owner"> /// The owner. /// </param> public SlidablePropertyViewModel(object instance, PropertyDescriptor descriptor, PropertyEditor owner) : base(instance, descriptor, owner) { }
protected ViewModelBase(PropertyEditor owner) { Owner = owner; SortOrder = int.MinValue; }
public TabViewModel(string tabName, PropertyEditor owner) : base(owner) { Name = Header = tabName; Categories = new List<CategoryViewModel>(); }
public ResettablePropertyViewModel(object instance, PropertyDescriptor descriptor, PropertyEditor owner) : base(instance, descriptor, owner) { this.instance = instance; resettableDescriptor = descriptor; ResetCommand = new DelegateCommand(ExecuteReset); var resettableAttr = AttributeHelper.GetFirstAttribute <ResettableAttribute>(resettableDescriptor); if (resettableAttr != null) { Label = (string)resettableAttr.ButtonLabel; } }
/// <summary> /// Initializes a new instance of the <see cref="TabViewModel"/> class. /// </summary> /// <param name="tabName"> /// The tab name. /// </param> /// <param name="owner"> /// The owner. /// </param> public TabViewModel(string tabName, PropertyEditor owner) : base(owner) { this.Name = this.Header = tabName; this.Categories = new List <CategoryViewModel>(); }
public DirectoryPathPropertyViewModel(object instance, PropertyDescriptor descriptor, PropertyEditor owner) : base(instance, descriptor, owner) { }
/// <summary> /// Initializes a new instance of the <see cref="PropertyTemplateSelector"/> class. /// </summary> /// <param name="owner"> /// The owner. /// </param> public PropertyTemplateSelector(PropertyEditor owner) { this.Editors = new Collection<TypeEditor>(); this.Owner = owner; }
public CheckBoxPropertyViewModel(object instance, PropertyDescriptor descriptor, PropertyEditor owner) : base(instance, descriptor, owner) { }
/// <summary> /// Initializes a new instance of the <see cref="CategoryViewModel"/> class. /// </summary> /// <param name="categoryName"> /// The category name. /// </param> /// <param name="owner"> /// The owner. /// </param> public CategoryViewModel(string categoryName, PropertyEditor owner) : base(owner) { this.Name = this.Header = categoryName; this.Properties = new List<PropertyViewModel>(); }
/// <summary> /// Initializes a new instance of the <see cref="FilePathPropertyViewModel"/> class. /// </summary> /// <param name="instance"> /// The instance. /// </param> /// <param name="descriptor"> /// The descriptor. /// </param> /// <param name="owner"> /// The owner. /// </param> public FilePathPropertyViewModel(object instance, PropertyDescriptor descriptor, PropertyEditor owner) : base(instance, descriptor, owner) { }