Almost same as TextSearch, except for the public properties (i.e. TextPath), which are used from TextSearch. Text Search is a feature that allows the user to quickly access items in a set by typing prefixes of the strings.
Inheritance: System.Windows.DependencyObject
Esempio n. 1
0
        /// <summary>
        ///     Get the instance of TextSearchInternal attached to the given ItemsControl or make one and attach it if it's not.
        /// </summary>
        /// <param name="itemsControl"></param>
        /// <returns></returns>
        internal static TextSearchInternal EnsureInstance(ItemsControl itemsControl)
        {
            TextSearchInternal instance = (TextSearchInternal)itemsControl.GetValue(TextSearchInternalInstanceProperty);

            if (instance == null)
            {
                instance = new TextSearchInternal(itemsControl);
                itemsControl.SetValue(TextSearchInternalInstancePropertyKey, instance);
            }

            return(instance);
        }
Esempio n. 2
0
        /// <summary>
        ///     Get the instance of TextSearchInternal attached to the given ItemsControl or make one and attach it if it's not.
        /// </summary>
        /// <param name="itemsControl"></param>
        /// <returns></returns>
        internal static TextSearchInternal EnsureInstance(ItemsControl itemsControl)
        {
            TextSearchInternal instance = (TextSearchInternal)itemsControl.GetValue(TextSearchInternalInstanceProperty);

            if (instance == null)
            {
                instance = new TextSearchInternal(itemsControl);
                itemsControl.SetValue(TextSearchInternalInstancePropertyKey, instance);
            }

            return instance;
        }