public HomeBase()
{
InitializeComponent();
var SkinManager = MaterialSkin.MaterialSkinManager.Instance;
SkinManager.AddFormToManage(this);
SkinManager.Theme = MaterialSkin.MaterialSkinManager.Themes.DARK;
SkinManager.ColorScheme = new ColorScheme(Primary.DeepOrange800, Primary.Brown900, Primary.DeepOrange500, Accent.LightBlue200, TextShade.WHITE);
}
private void materialRaisedButton1_Click_1(object sender, EventArgs e)
{
Form Banking = new Form();
Banking.ShowDialog();
}
这段代码是主窗体,我尝试打开名为banking的窗体,它确实打开了,但是材质皮肤设置没有显示出来
公共银行业务
InitializeComponent();
var SkinManager = MaterialSkin.MaterialSkinManager.Instance;
SkinManager.AddFormToManage(Form);
SkinManager.Theme = MaterialSkin.MaterialSkinManager.Themes.DARK;
SkinManager.ColorScheme = new ColorScheme(Primary.DeepOrange800, Primary.Brown900, Primary.DeepOrange500, Accent.LightBlue200, TextShade.WHITE);
任何建议都是有用的
我尝试过将主窗体控件传递给子窗体,但没有成功
1条答案
按热度按时间yvfmudvl1#
希望看到更多的代码,特别是Program.cs类,但无论如何,一定要有Application.EnableVisualStyles();
在Main()方法中。