* UIForm: 增加DPI强制缩放的函数ReSetDPIScale

This commit is contained in:
Sunny 2022-03-13 23:16:06 +08:00
parent fe6acb78fc
commit ad600f6459
5 changed files with 14 additions and 0 deletions

Binary file not shown.

Binary file not shown.

View File

@ -93,6 +93,12 @@ namespace Sunny.UI
}
}
public void ReSetDPIScale()
{
IsScaled = false;
SetDPIScale();
}
[DefaultValue(true)]
[Description("是否点击标题栏可以移动窗体"), Category("SunnyUI")]
public bool Movable { get; set; } = true;

View File

@ -56,5 +56,7 @@ namespace Sunny.UI
bool SetParamToPage(int toPageIndex, int fromPageIndex, params object[] objects);
bool SetParamToPage(Guid toPageGuid, Guid fromPageGuid, params object[] objects);
void Init();
void Final();
}
}

View File

@ -92,6 +92,12 @@ namespace Sunny.UI
}
}
public void ReSetDPIScale()
{
IsScaled = false;
SetDPIScale();
}
public void Render()
{
SetStyle(UIStyles.Style);