如何在C#中添加Mac OS最小化Windows窗体中的样式? [英] How to add Mac OS minimize style in windows form in C#?
问题描述
我有一个项目需要更改默认窗口最小化样式并添加新样式。新的风格,如Mac OS窗口最小化风格。
是否可以在C#中添加另一种最小化样式?如果可以改变最小化样式,那么请帮帮我..
谢谢代码项目!!谢谢大家!
I have a project which is need to change default window minimize style & add new style. New style such as- Mac OS window minimize style.
Is it possible to add another minimize style in C#? If is it possible to change the minimize style, so please help me..
Thanks Code Project!! Thanks Everybody!!
推荐答案
搜索Google& CP?
适用于Windows的Mac OS X主题表格 [ ^ ]
根据您的要求定制东西。
Searched Google & CP?
Mac OS X Theme for Windows Forms[^]
Customize things based on your requirement.
我不确定你到底是什么意思你说一个新的风格:但我可以告诉你如何在用户点击以最小化它时改变WinForm的行为:
I am not sure exactly what you mean when you say a new "style:" but I can show you how to alter the behavior of a WinForm when the user clicks to minimize it:
// some arbitrary size and location parameters
private Size customMinSize = new Size(100,100);
private Point customMinLocation = new Point(100, Screen.PrimaryScreen.WorkingArea.Height - 100);
// the SizeChanged EventHandler for the Form
private void Form1_SizeChanged(object sender, EventArgs e)
{
if (WindowState == FormWindowState.Minimized)
{
this.SuspendLayout();
this.WindowState = FormWindowState.Normal;
this.Size = customMinSize;
this.Location = customMinLocation;
this.ResumeLayout();
}
}
我强烈建议您认为用户已经社交化期望 Windows操作系统在某些方面表现得一致。
每当你改变一个基本的预期行为时,比如当窗口被最小化时会发生什么,你就会冒着混淆用户的风险。
I strongly suggest you consider that users are socialized to expect the Windows OS to behave in certain ways, consistently.
Any time you change a basic expected behavior, like what happens when a Window is minimized, you run the risk of confusing users.
这篇关于如何在C#中添加Mac OS最小化Windows窗体中的样式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!