コード例 #1
0
 public static void SetPlacements(UIElement adorner, AdornerPlacementCollection value)
 {
     if (adorner == null)
     {
         throw new ArgumentNullException("adorner");
     }
     adorner.SetValue(AdornerPanel.PlacementsProperty, (object)value);
 }
コード例 #2
0
        internal static AdornerPlacementCollection GetCurrentPlacements(UIElement adorner)
        {
            AdornerPlacementCollection placements = AdornerPanel.GetPlacements(adorner);

            if (placements == null || placements.Count == 0)
            {
                return((AdornerPlacementCollection)AdornerPanel.GetSyntaticSugarPlacements((DependencyObject)adorner));
            }
            return(placements);
        }