Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Version 18 Ribbon Office 2016 Theme
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Version 18 Ribbon Office 2016 Theme

 Post Reply Post Reply
Author
Message
jasonl View Drop Down
Newbie
Newbie


Joined: 16 October 2009
Location: Australia
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote jasonl Quote  Post ReplyReply Direct Link To This Post Topic: Version 18 Ribbon Office 2016 Theme
    Posted: 31 July 2017 at 8:08pm
I can't find a sample application or any forum posts which show how to use the new 2016 themes.  
I'm assuming you use CommandBarsGlobalSettings.ResourceImages.LoadFromFile but how can I find out what the IniFileNames are in the Office2016.dll?

Back to Top
olebed View Drop Down
Admin Group
Admin Group


Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 841
Post Options Post Options   Thanks (1) Thanks(1)   Quote olebed Quote  Post ReplyReply Direct Link To This Post Posted: 01 August 2017 at 3:38am
Hello jasonl,

Office2016 theme changed in the same way as Office2013.

SetCommandbarsTheme xtpThemeOffice2013, App.Path & "\..\..\..\Styles\Office2016.dll", "Office2016WordColorful.ini"

INI files are:

Office2016AccessBlack.ini
Office2016AccessColorful.ini
Office2016AccessDarkGray.ini
Office2016AccessWhite.ini

Office2016Excel...
Office2016OneNote...
Office2016Outlook...
Office2016PowerPoint...
Office2016Publisher...
Office2016Word...

Regards,
 Oleksandr Lebed
Back to Top
Harry1975 View Drop Down
Newbie
Newbie
Avatar

Joined: 01 August 2017
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote Harry1975 Quote  Post ReplyReply Direct Link To This Post Posted: 01 August 2017 at 2:59pm
Exist there an example for the Office 2016 Backstage ?
Back to Top
olebed View Drop Down
Admin Group
Admin Group


Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote olebed Quote  Post ReplyReply Direct Link To This Post Posted: 02 August 2017 at 12:08pm
Hello Harry1975,

If you load Office2016.dll as CommandBars theme  then Backstage also will get resources from Office2016.
If you ask about  fullscreen Backstage in ActiveX - you can set 
BackstageView.SetTheme 17  'show new fullscreen backstage

17 is xtpThemeOffice2016, but unfortunately we haven't added it to ActiveX version. Now we are working on improving  switching between old backstage and new fullscreen version. So it is temporary solution.

Regards,
 Oleksandr Lebed
Back to Top
Harry75 View Drop Down
Groupie
Groupie
Avatar

Joined: 30 March 2014
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote Harry75 Quote  Post ReplyReply Direct Link To This Post Posted: 11 August 2017 at 4:56am
Exist there also an Windows10 cjstyle ?
Product: Xtreme SuitePro (ActiveX) version 15.3.1 , 16.4 , 17.x , 18.x

Platform: Windows XP (32bit) - SP 3 , Windows 7 SP1 / Win 10 (64bit)

Language: Visual Basic 6.0 SP6
Back to Top
olebed View Drop Down
Admin Group
Admin Group


Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote olebed Quote  Post ReplyReply Direct Link To This Post Posted: 11 August 2017 at 6:42am
unfortunately we don't have such skin.
Back to Top
Nick View Drop Down
Groupie
Groupie


Joined: 23 July 2012
Location: United Kingdom
Status: Offline
Points: 30
Post Options Post Options   Thanks (0) Thanks(0)   Quote Nick Quote  Post ReplyReply Direct Link To This Post Posted: 18 January 2018 at 11:17am
I'm using the Office 2016 dll's as suggested, and this works fine for the ribbon bar.  But I can't get the backstage buttons and recent file list controls to adopt the Office 2016 theme.  How do I get this to work?
Back to Top
Fritzchen View Drop Down
Groupie
Groupie


Joined: 13 December 2017
Location: Germany
Status: Offline
Points: 27
Post Options Post Options   Thanks (1) Thanks(1)   Quote Fritzchen Quote  Post ReplyReply Direct Link To This Post Posted: 18 January 2018 at 4:26pm
I use the backstage buttons in my application also outside of the backstage.

So that the buttons always take on the same color as the color theme (Office2016. dll), I use the following:

Here's where I give the main theme:
BackstageButton.Appearance = xtpAppearanceOffice2013

'Here the background color (I need the buttons e. g. in white):
BackstageButton.BackColor = RGB(255, 255, 255)

'And here the font color.
BackstageButton.ForeColor = strThemeFontColor

'--------------------------------------------

Fill the variable "strThemeFontColor" with the corresponding font color when changing the theme.


Case ID_THEME_01: strStyleINI = "Office2016WordColorful.ini"
                  strThemeFontColor = RGB(42, 87, 154)

Case ID_THEME_02: strStyleINI = "Office2016OutlookColorful.ini"
                  strThemeFontColor = RGB(1, 115, 199)

Case ID_THEME_03: strStyleINI = "Office2016PublisherColorful.ini"
                  strThemeFontColor = RGB(7, 117, 104)

Case ID_THEME_04: strStyleINI = "Office2016ExcelColorful.ini"
                  strThemeFontColor = RGB(34, 116, 71)

Case ID_THEME_05: strStyleINI = "Office2016PowerpointColorful.ini"
                  strThemeFontColor = RGB(183, 71, 42)

Case ID_THEME_06: strStyleINI = "Office2016AccessColorful.ini"
                  strThemeFontColor = RGB(164, 55, 58)

Case ID_THEME_07: strStyleINI = "Office2016OnenoteColorful.ini"
                  strThemeFontColor = RGB(128, 57, 123)

This method may be unconventional but it works
Maybe this will help you.

Many greetings

Fritzchen



Back to Top
olebed View Drop Down
Admin Group
Admin Group


Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote olebed Quote  Post ReplyReply Direct Link To This Post Posted: 19 January 2018 at 11:42am
Originally posted by Nick Nick wrote:

I'm using the Office 2016 dll's as suggested, and this works fine for the ribbon bar.  But I can't get the backstage buttons and recent file list controls to adopt the Office 2016 theme.  How do I get this to work?


Hello Nick,

You can explore our sample  Samples\CommandBars\C#.NET\RibbonSample\
I have added example how customize Ribbon Backstage Page
//frmMain.cs
private 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;    
..............

}

Regards,
 Oleksandr Lebed
Back to Top
Nick View Drop Down
Groupie
Groupie


Joined: 23 July 2012
Location: United Kingdom
Status: Offline
Points: 30
Post Options Post Options   Thanks (0) Thanks(0)   Quote Nick Quote  Post ReplyReply Direct Link To This Post Posted: 20 January 2018 at 7:16am
thanks guys Smile.  I've got the backstage buttons and separator ok now based on what you've shown as examples.  I'm actually doing it this way now rather than changing each individual control...

Public Sub ChangeButtonTheme(xObject As Object)
'- object can be a form or a usercontrol
   Dim xButton As Control
   Dim btnStyle As XTPBackstageButtonControlAppearanceStyle
   Dim sepStyle As XTPBackstageSeparatorControlAppearanceStyle

   Select Case CurrentRibbonTheme
   Case ID_OPTIONS_STYLESYSTEM
      btnStyle = xtpAppearanceStandard
      sepStyle = xtpSeparatorAppearanceResource
   Case ID_OPTIONS_STYLE2007BLUE To ID_OPTIONS_STYLE2007AQUA
      btnStyle = xtpAppearanceOffice2007
      sepStyle = xtpSeparatorAppearanceResource
   Case ID_OPTIONS_STYLE2013WHITE To ID_OPTIONS_STYLE2013DARKGREY
      btnStyle = xtpAppearanceOffice2013
      sepStyle = xtpSeparatorAppearanceOffice2013
   Case ID_OPTIONS_STYLE2016WHITE To ID_OPTIONS_STYLE2016COLORFUL
      btnStyle = xtpAppearanceOffice2013
      sepStyle = xtpSeparatorAppearanceOffice2013
   Case ID_OPTIONS_STYLEVISUALSTUDIO2015BLUE To ID_OPTIONS_STYLEVISUALSTUDIO2015LIGHT
      btnStyle = xtpAppearanceVisualStudio2015
      sepStyle = xtpAppearanceVisualStudio2015
   Case ID_OPTIONS_STYLE2016WHITE To ID_OPTIONS_STYLE2016COLORFUL
      btnStyle = xtpAppearanceOffice2013
      sepStyle = xtpSeparatorAppearanceResource
      '- codejock example uses resource for both
   Case Else
      btnStyle = xtpAppearanceResource
      sepStyle = xtpSeparatorAppearanceResource
   End Select
  
   For Each xButton In xObject.Controls
      If TypeOf xButton Is BackstageButton Then
         xButton.Appearance = btnStyle
         xButton.ForeColor = mainForm.BackstageView.GetForeColor
         xButton.BackColor = mainForm.BackstageView.GetBackColor
        
      ElseIf TypeOf xButton Is BackstageSeparator Then
         xButton.Appearance = sepStyle
      End If
   Next
End Sub


There's still an issue with the BackstageListBox (for a recent file list) though - it fails to pick up any of the themes (not just the office 2016 one) and it fails to show the appropriate icon associated with the file type.  Codejock's own examples (VB RibbonSample) don't work either as from v17.1.0, though v16.4.0 does work.  For example, try the Visual Studio 2015 dark theme in Codejock's examples, and you'll see what I mean.  So this appears to be a bug that's been around for a couple of years Cry
Back to Top
olebed View Drop Down
Admin Group
Admin Group


Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote olebed Quote  Post ReplyReply Direct Link To This Post Posted: 20 January 2018 at 3:01pm
I have moved  discussion about Shell Icons in BackstagePageRecent to this separate topic 
Back to Top
Nick View Drop Down
Groupie
Groupie


Joined: 23 July 2012
Location: United Kingdom
Status: Offline
Points: 30
Post Options Post Options   Thanks (0) Thanks(0)   Quote Nick Quote  Post ReplyReply Direct Link To This Post Posted: 28 July 2018 at 2:18am
still not solved in 18.4.0, so still needs a workaround (involving forcing the form background to white irrespective of the theme background
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.