예제 #1
0
        /// <summary>
        /// Event handler that adds the cue banner to the control.
        /// </summary>
        /// <param name="sender">The object where the event handler is attached.</param>
        /// <param name="e">The event data.</param>
        private static void Control_Loaded(object sender, RoutedEventArgs e)
        {
            Control          control          = sender as Control;
            AdornerLayer     adornerLayer     = AdornerLayer.GetAdornerLayer(control);
            CueBannerAdorner cueBannerAdorner = new CueBannerAdorner(control, CueBannerService.GetCueBanner(control));

            adornerLayer.Add(cueBannerAdorner);

            CueBannerService.UpdateAdornerState(control);
        }
예제 #2
0
        /// <summary>
        /// Event handler that updates the cue banner when the control's text is changed.
        /// </summary>
        /// <param name="sender">The object where the event handler is attached.</param>
        /// <param name="e">The event data.</param>
        private static void Control_TextChanged(object sender, TextChangedEventArgs e)
        {
            Control control = sender as Control;

            CueBannerService.UpdateAdornerState(control);
        }
예제 #3
0
        /// <summary>
        /// Event handler that updates the cue banner when the control gets focus.
        /// </summary>
        /// <param name="sender">The object where the event handler is attached.</param>
        /// <param name="e">The event data.</param>
        private static void Control_GotFocus(object sender, RoutedEventArgs e)
        {
            Control control = sender as Control;

            CueBannerService.UpdateAdornerState(control);
        }