示例#1
0
        /*protected override void CommitProperties()
         * {
         *  base.CommitProperties();
         *
         *  if (_dataChanged)
         *  {
         *      _dataChanged = false;
         *      if (null != _buttonAdd)
         *          _buttonAdd.Text = null == _data ? string.Empty : _data.ToString();
         *  }
         * }*/

        protected override void Measure()
        {
            base.Measure();

            MeasuredWidth  = _hgroup.GetExplicitOrMeasuredWidth();
            MeasuredHeight = _hgroup.GetExplicitOrMeasuredHeight();

            MeasuredMinWidth  = LayoutUtil.GetMinBoundsWidth(_hgroup);
            MeasuredMinHeight = LayoutUtil.GetMinBoundsHeight(_hgroup);
        }
        protected override void Measure()
        {
            base.Measure();

            // label has padding of 3 on left and right and padding of 5 on top and bottom.
            MeasuredWidth  = _hGroup.GetExplicitOrMeasuredWidth();      // +6;
            MeasuredHeight = _hGroup.GetExplicitOrMeasuredHeight();     // +10;

            MeasuredMinWidth  = LayoutUtil.GetMinBoundsWidth(_hGroup);  // + 6;
            MeasuredMinHeight = LayoutUtil.GetMinBoundsHeight(_hGroup); // + 10;
        }