Beispiel #1
0
        /// <summary>
        /// Adds an UIElement as adorner with the specified placement.
        /// </summary>
        protected void AddAdorner(AdornerPlacement placement, AdornerOrder order, UIElement adorner)
        {
            AdornerPanel p = new AdornerPanel();

            p.Order = order;
            AdornerPanel.SetPlacement(adorner, placement);
            p.Children.Add(adorner);
            this.Adorners.Add(p);
        }
Beispiel #2
0
        /// <summary>
        /// Adds several UIElements as adorners with the specified placement.
        /// </summary>
        protected void AddAdorners(AdornerPlacement placement, params UIElement[] adorners)
        {
            AdornerPanel p = new AdornerPanel();

            foreach (UIElement adorner in adorners)
            {
                AdornerPanel.SetPlacement(adorner, placement);
                p.Children.Add(adorner);
            }
            this.Adorners.Add(p);
        }
Beispiel #3
0
 public static void SetPlacement(UIElement adorner, AdornerPlacement placement)
 {
     if (adorner == null)
     {
         throw new ArgumentNullException("adorner");
     }
     if (placement == null)
     {
         throw new ArgumentNullException("placement");
     }
     adorner.SetValue(PlacementProperty, placement);
 }