Пример #1
0
 internal static FrameworkElement AsToolHandle(FrameworkElement elt)
 {
     if (NodePanel.GetFigure(elt) != NodeFigure.None)
     {
         return(elt);
     }
     else
     {
         return(null);
     }
 }
Пример #2
0
 internal static FrameworkElement FindToolHandle(DependencyObject v)
 {
     if (v == null || v is Part)
     {
         return(null);
     }
     if (NodePanel.GetFigure(v) != NodeFigure.None)
     {
         return(v as FrameworkElement);
     }
     return(FindToolHandle(System.Windows.Media.VisualTreeHelper.GetParent(v)));
 }