public override void OnApplyTemplate() { base.OnApplyTemplate(); templateApplied = true; if (Template != null) { color = Template.FindName("Vector3_Color", this) as Control_Property_Vector3; color.FieldChangedEvent += Color_FieldChanged; if (currentObjectGuid != null) { UpdateProperty(Hierarchy.GetObject(currentObjectGuid)); } } }
public override void OnApplyTemplate() { base.OnApplyTemplate(); templateApplied = true; if (Template != null) { position = Template.FindName("Vector3_Position", this) as Control_Property_Vector3; position.FieldChangedEvent += Position_FieldChanged; rotation = Template.FindName("Vector3_Rotation", this) as Control_Property_Vector3; rotation.FieldChangedEvent += Rotation_FieldChanged; scale = Template.FindName("Vector3_Scale", this) as Control_Property_Vector3; scale.FieldChangedEvent += Scale_FieldChanged; if (!string.IsNullOrEmpty(currentObjectGuid)) { UpdateProperty(Hierarchy.GetObject(currentObjectGuid)); } } }