//frmMain.csprivate void SetBackstageTheme()
{
XtremeCommandBars.XTPBackstageButtonControlAppearanceStyle nButtonAppearance = XtremeCommandBars.XTPBackstageButtonControlAppearanceStyle.xtpAppearanceResource;
XtremeCommandBars.XTPBackstageSeparatorControlAppearanceStyle nSeparatorAppearance = XtremeCommandBars.XTPBackstageSeparatorControlAppearanceStyle.xtpSeparatorAppearanceResource;
switch (CommandBars.VisualTheme)
{
case XtremeCommandBars.XTPVisualTheme.xtpThemeOffice2013:
nButtonAppearance = XtremeCommandBars.XTPBackstageButtonControlAppearanceStyle.xtpAppearanceOffice2013;
nSeparatorAppearance = XtremeCommandBars.XTPBackstageSeparatorControlAppearanceStyle.xtpSeparatorAppearanceOffice2013;
break;
case XtremeCommandBars.XTPVisualTheme.xtpThemeVisualStudio2015:
nButtonAppearance = XtremeCommandBars.XTPBackstageButtonControlAppearanceStyle.xtpAppearanceVisualStudio2015;
nSeparatorAppearance = XtremeCommandBars.XTPBackstageSeparatorControlAppearanceStyle.xtpSeparatorAppearanceVisualStudio2015;
break;
default:
nButtonAppearance = XtremeCommandBars.XTPBackstageButtonControlAppearanceStyle.xtpAppearanceResource;
nSeparatorAppearance = XtremeCommandBars.XTPBackstageSeparatorControlAppearanceStyle.xtpSeparatorAppearanceResource;
break;
}
BackstageView.SetTheme(CommandBars.VisualTheme);
Color clrText = ColorFromUint( BackstageView.GetForeColor() );
Color clrBack = ColorFromUint( BackstageView.GetBackColor() );
pageBackstageInfo.SetAppearance(CommandBars.VisualTheme, nButtonAppearance, nSeparatorAppearance, clrText, clrBack);
pageBackstageHelp.SetAppearance(CommandBars.VisualTheme, nButtonAppearance, nSeparatorAppearance, clrText, clrBack);
pageBackstageSend.SetAppearance(CommandBars.VisualTheme, nButtonAppearance, nSeparatorAppearance, clrText, clrBack);
pageBackstageRecent.SetAppearance(CommandBars.VisualTheme, nButtonAppearance, nSeparatorAppearance, clrText, clrBack);
pageBackstageDisabled.SetAppearance(CommandBars.VisualTheme, nButtonAppearance, nSeparatorAppearance, clrText, clrBack);
}
// pageBackstageSend.cs
public void SetAppearance(XtremeCommandBars.XTPVisualTheme theme, XtremeCommandBars.XTPBackstageButtonControlAppearanceStyle nButtonAppearance,
XtremeCommandBars.XTPBackstageSeparatorControlAppearanceStyle nSeparatorAppearance, Color clrText, Color clrBack)
{
this.ForeColor = clrText;
this.BackColor = clrBack;
BackstageButton1.Appearance = nButtonAppearance;
BackstageButton2.Appearance = nButtonAppearance;
btnManageVersions.Appearance = nButtonAppearance;
btnProtectDocument.Appearance = nButtonAppearance;
BackstageButton1.ForeColor = clrText;
BackstageButton1.BackColor = clrBack;
BackstageButton2.ForeColor = clrText;
BackstageButton2.BackColor = clrBack;
..............
BackstageButton1.TextImageRelation = XtremeCommandBars.TextImageRelationStyle.xtpImageAboveText;
BackstageButton2.TextImageRelation = XtremeCommandBars.TextImageRelationStyle.xtpImageAboveText;
btnTab_0.Appearance = nButtonAppearance;
btnTab_1.Appearance = nButtonAppearance;
..............
btnTab_0.ForeColor = clrText;
btnTab_0.BackColor = clrBack;
..............
lblBackstageSeparator1.Appearance = nSeparatorAppearance;
lblBackstageSeparator4.Appearance = nSeparatorAppearance;
BackstageSeparator1.Appearance = nSeparatorAppearance;
BackstageSeparator2.Appearance = nSeparatorAppearance;
..............
Label1.ForeColor = clrText;
Label1.BackColor = clrBack;
Label2.ForeColor = clrText;
Label2.BackColor = clrBack;
..............
tabPage_0.ForeColor = clrText;
tabPage_0.BackColor = clrBack;
..............
}