private static void OnFieldPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { Control_Property_String cps = d as Control_Property_String; if (cps.textField != null) { cps.textField.Text = e.NewValue as string; } }
public override void OnApplyTemplate() { base.OnApplyTemplate(); templateApplied = true; if (Template != null) { name = Template.FindName("String_Name", this) as Control_Property_String; name.FieldChangedEvent += Name_FieldChanged; guid = Template.FindName("String_Guid", this) as Control_Property_ReadOnly; if (currentObjectGuid != null) { UpdateProperty(Hierarchy.GetObject(currentObjectGuid)); } } }