/// <summary> /// Get item. /// </summary> /// <param name="indices">The array of index to the target item. </param> /// <returns>Item.</returns> #else /// <summary> /// アイテムを取得します。 /// </summary> /// <param name="indices">目的のアイテムまでの各階層でのインデックスの配列です。</param> /// <returns>アイテム。</returns> #endif public WPFTreeViewItem GetItem(params int[] indices) { var tree = Searcher.ByType <TreeView>(TreeUtility.VisualTree(AppVar, TreeRunDirection.Ancestors))[0]; App[typeof(WPFTreeView), "ShowNextItem"](this); return(new WPFTreeViewItem(App[typeof(WPFTreeView), "GetItemEx"](tree, this, indices, 0))); }
/// <summary> /// Enumerate DependencyObject continuing to LogicalTree. /// </summary> /// <param name="start">Start DependencyObject.</param> /// <param name="direction">Run direction.</param> /// <returns>Enumerated DependencyObject.</returns> #else /// <summary> /// LogicalTreeに連なるDependencyObjectを列挙。 /// </summary> /// <param name="start">列挙を開始するDependencyObject。</param> /// <param name="direction">走査方向。</param> /// <returns>列挙されたDependencyObject。</returns> #endif public static IWPFDependencyObjectCollection <DependencyObject> LogicalTree(this IAppVarOwner start, TreeRunDirection direction = TreeRunDirection.Descendants) { var app = (WindowsAppFriend)start.AppVar.App; return(TreeUtility.LogicalTree(start.AppVar, direction)); }