/// <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)));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Search by Type from DependencyObject collection.
        /// </summary>
        /// <param name="collection">DependencyObject collection.</param>
        /// <param name="typeFullName">Target type.</param>
        /// <returns>Hit elements.</returns>
#else
        /// <summary>
        /// タイプから要素を検索。
        /// </summary>
        /// <param name="collection">DependencyObjectのコレクション。</param>
        /// <param name="typeFullName">検索対象のタイプ。</param>
        /// <returns>ヒットした要素。</returns>
#endif
        public static IWPFDependencyObjectCollection <DependencyObject> ByType(this IWPFDependencyObjectCollection <DependencyObject> collection, string typeFullName)
        {
            return(Searcher.ByType(collection, typeFullName));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Search by Type from DependencyObject collection.
        /// </summary>
        /// <typeparam name="T">Target type.</typeparam>
        /// <param name="collection">DependencyObject collection.</param>
        /// <returns>Hit elements.</returns>
#else
        /// <summary>
        /// タイプから要素を検索。
        /// </summary>
        /// <typeparam name="T">検索対象のタイプ。</typeparam>
        /// <param name="collection">DependencyObjectのコレクション。</param>
        /// <returns>ヒットした要素。</returns>
#endif
        public static IWPFDependencyObjectCollection <T> ByType <T>(this  IWPFDependencyObjectCollection <DependencyObject> collection) where T : DependencyObject
        {
            return(Searcher.ByType <T>(collection));
        }