Exemplo n.º 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);
         }
     }
 }
Exemplo n.º 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);
         }
     }
 }
Exemplo n.º 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);
        }