/// <inheritdoc/> protected override void OnApplyTemplate() { base.OnApplyTemplate(); PointerEventHandler pointerPressedHandler = RichEditBox_OnPointerPressed; PointerEventHandler pointerMovedHandler = RichEditBox_OnPointerMoved; _suggestionPopup = (Popup)GetTemplateChild(PartSuggestionsPopup); _richEditBox = (RichEditBox)GetTemplateChild(PartRichEditBox); _suggestionsList = (ListViewBase)GetTemplateChild(PartSuggestionsList); _suggestionsContainer = (Border)GetTemplateChild(PartSuggestionsContainer); ConditionallyLoadElement(Header, PartHeaderContentPresenter); ConditionallyLoadElement(Description, PartDescriptionPresenter); if (_richEditBox != null) { _richEditBox.SizeChanged -= RichEditBox_SizeChanged; _richEditBox.TextChanging -= RichEditBox_TextChanging; _richEditBox.TextChanged -= RichEditBox_TextChanged; _richEditBox.TextCompositionStarted -= RichEditBox_TextCompositionStarted; _richEditBox.TextCompositionChanged -= RichEditBox_TextCompositionChanged; _richEditBox.TextCompositionEnded -= RichEditBox_TextCompositionEnded; _richEditBox.SelectionChanging -= RichEditBox_SelectionChanging; _richEditBox.SelectionChanged -= RichEditBox_SelectionChanged; _richEditBox.Paste -= RichEditBox_Paste; _richEditBox.PreviewKeyDown -= RichEditBox_PreviewKeyDown; _richEditBox.RemoveHandler(PointerMovedEvent, pointerMovedHandler); _richEditBox.RemoveHandler(PointerPressedEvent, pointerPressedHandler); _richEditBox.ProcessKeyboardAccelerators -= RichEditBox_ProcessKeyboardAccelerators; _richEditBox.SizeChanged += RichEditBox_SizeChanged; _richEditBox.TextChanging += RichEditBox_TextChanging; _richEditBox.TextChanged += RichEditBox_TextChanged; _richEditBox.TextCompositionStarted += RichEditBox_TextCompositionStarted; _richEditBox.TextCompositionChanged += RichEditBox_TextCompositionChanged; _richEditBox.TextCompositionEnded += RichEditBox_TextCompositionEnded; _richEditBox.SelectionChanging += RichEditBox_SelectionChanging; _richEditBox.SelectionChanged += RichEditBox_SelectionChanged; _richEditBox.Paste += RichEditBox_Paste; _richEditBox.PreviewKeyDown += RichEditBox_PreviewKeyDown; _richEditBox.AddHandler(PointerMovedEvent, pointerMovedHandler, true); _richEditBox.AddHandler(PointerPressedEvent, pointerPressedHandler, true); _richEditBox.ProcessKeyboardAccelerators += RichEditBox_ProcessKeyboardAccelerators; } if (_suggestionsList != null) { _suggestionsList.ItemClick -= SuggestionsList_ItemClick; _suggestionsList.SizeChanged -= SuggestionsList_SizeChanged; _suggestionsList.GotFocus -= SuggestionList_GotFocus; _suggestionsList.ItemClick += SuggestionsList_ItemClick; _suggestionsList.SizeChanged += SuggestionsList_SizeChanged; _suggestionsList.GotFocus += SuggestionList_GotFocus; } }
public PopupPanel(Popup popup) { Popup = popup; Visibility = Visibility.Collapsed; Background = SolidColorBrushHelper.Transparent; }
protected PlacementPopupPanel(Popup popup) : base(popup) { Loaded += (s, e) => Windows.UI.Xaml.Window.Current.SizeChanged += Current_SizeChanged; Unloaded += (s, e) => Windows.UI.Xaml.Window.Current.SizeChanged -= Current_SizeChanged; }
public static void SetPopup(DependencyObject obj, Popup value) { obj.SetValue(PopupProperty, value); }
protected PlacementPopupPanel(Popup popup) : base(popup) { }
public DropDownLayouter(ComboBox combo, Popup popup) { _combo = (combo as IWeakReferenceProvider).WeakReference; _popup = (popup as IWeakReferenceProvider).WeakReference; }