Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.Problems.GrammaticalOptimization/DynamicDataDisplay/Common/Auxiliary/VisualTreeHelperHelper.cs @ 13808

Last change on this file since 13808 was 12503, checked in by aballeit, 9 years ago

#2283 added GUI and charts; fixed MCTS

File size: 565 bytes
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.Windows;
6using System.Windows.Media;
7
8namespace Microsoft.Research.DynamicDataDisplay.Common.Auxiliary
9{
10  internal static class VisualTreeHelperHelper
11  {
12    public static DependencyObject GetParent(DependencyObject target, int depth)
13    {
14      DependencyObject parent = target;
15      do
16      {
17        parent = VisualTreeHelper.GetParent(parent);
18        if (parent == null)
19        {
20          break;
21        }
22      } while (--depth > 0);
23
24      return parent;
25    }
26  }
27}
Note: See TracBrowser for help on using the repository browser.