예제 #1
0
 public override void OnApplyTemplate()
 {
     base.OnApplyTemplate();
     _b = (Border)GetTemplateChild("Border");
     if (SelectedObject != null)
     {
         var p = new UiElementTypeConverter1().ConvertTo(SelectedObject, typeof(UIElement));
         _b.Child = (UIElement)p;
     }
 }
예제 #2
0
 private void SelectedObjectChanged(object eOldValue, object eNewValue)
 {
     if (_b != null)
     {
         if (eNewValue != null)
         {
             var p = new UiElementTypeConverter1().ConvertTo(eNewValue, typeof(UIElement));
             _b.Child = (UIElement)p;
         }
     }
 }