void EnableFormEvents()
        {
            _form = CoreUtil.GetParent <FormEx>(this);

            if (_form != null)
            {
                CoreUtil.AdjustImages(this, ref _dpiOld, _form.DpiNew);
            }
        }
Beispiel #2
0
        protected virtual void AdjustFont(float factor)
        {
            if (Util.DesignMode)
            {
                return;
            }

            var dic = GetChildControlFontSizes(this);

            CoreUtil.ScaleFont(this, factor);

            foreach (var item in dic)
            {
                // not affected by parent font?
                if (item.Key.Font.Size == item.Value)
                {
                    CoreUtil.ScaleFont(item.Key, factor);
                    continue;
                }
            }
        }
 protected override void ScaleControl(System.Drawing.SizeF factor, BoundsSpecified specified)
 {
     base.ScaleControl(factor, specified);
     CoreUtil.AdjustImages(this, ref _dpiOld, _form.DpiNew);
 }