コード例 #1
0
 private void UnmonitorExtendElement(object element)
 {
     if (element != null)
     {
         MeasureElement extend = element as MeasureElement;
         if (extend != null)
         {
             extend.NeedMeasure -= new EventHandler(OnNeedMeasure);
             LogicalChildRemove(extend);
         }
     }
 }
コード例 #2
0
 private void MonitorExtendElement(object element)
 {
     if (element != null)
     {
         MeasureElement extend = element as MeasureElement;
         if (extend != null)
         {
             LogicalChildAdd(extend);
             extend.NeedMeasure += new EventHandler(OnNeedMeasure);
         }
     }
 }
コード例 #3
0
        /// <summary>
        /// Invoked when a property change requires a measure to occur.
        /// </summary>
        /// <param name="d">Owning object.</param>
        /// <param name="e">Details of property that has changed.</param>
        protected static void OnNeedMeasureOnChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            MeasureElement sender = (MeasureElement)d;

            sender.OnNeedMeasure(sender, EventArgs.Empty);
        }