Ejemplo n.º 1
0
 /// <summary>
 ///   Initializes the control with the inspector property it is for and the current value.
 /// </summary>
 /// <param name="inspectorProperty">Inspector property the control is for.</param>
 /// <param name="editorContext">Editor context this control lives in.</param>
 /// <param name="localizationContext">Context used for showing and changing localized attribute values.</param>
 /// <param name="currentValue">Current value.</param>
 /// <param name="valueInherited">Indicates if the current value was inherited.</param>
 public virtual void Init(InspectorPropertyAttribute inspectorProperty, EditorContext editorContext, LocalizationContext localizationContext, object currentValue, bool valueInherited)
 {
     // Setup data context of control.
     this.dataContext = new InspectorPropertyData(inspectorProperty, localizationContext) { EditorContext = editorContext, Value = currentValue, ValueInherited = valueInherited };
     this.dataContext.ValueChanged += this.OnValueChanged;
     this.DataContext = this.dataContext;
 }
Ejemplo n.º 2
0
 /// <summary>
 ///   Initializes the control with the inspector property it is for and the current value.
 /// </summary>
 /// <param name="inspectorProperty">Inspector property the control is for.</param>
 /// <param name="editorContext">Editor context this control lives in.</param>
 /// <param name="localizationContext">Context used for showing and changing localized attribute values.</param>
 /// <param name="currentValue">Current value.</param>
 /// <param name="valueInherited">Indicates if the current value was inherited.</param>
 public virtual void Init(InspectorPropertyAttribute inspectorProperty, EditorContext editorContext, LocalizationContext localizationContext, object currentValue, bool valueInherited)
 {
     // Setup data context of control.
     this.dataContext = new InspectorPropertyData(inspectorProperty, localizationContext)
     {
         EditorContext = editorContext, Value = currentValue, ValueInherited = valueInherited
     };
     this.dataContext.ValueChanged += this.OnValueChanged;
     this.DataContext = this.dataContext;
 }