/// <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); }
/// <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; }