[SOLVED]PropertySheet theme issue |
Post Reply |
Author | ||
xsensordev
Groupie Joined: 19 August 2021 Location: Canada Status: Offline Points: 24 |
Post Options
Thanks(0)
Posted: 20 August 2021 at 2:46pm |
|
I've modified the Samples\Controls\PropertySheet sample that comes with Toolkit Pro 20.0 to test the effect of the Windows 10 dark theme on it. If the CXTPPropertySheet::SetTheme function is called BEFORE the CXTPPropertySheet::SetNavigator call, then I get this look: If the CXTPPropertySheet::SetTheme function is called AFTER the CXTPPropertySheet::SetNavigator call, then I get this look: Where's the title bar? To achieve this effect, I only modified CPropertySheetApp::InitInstance() and CPropertySheetDlg::OnButtonList(). My changes are BOLDED
If you switch to the theme to xtpIniWindows10Light, its the same bad titlebar effect: Am I doing something wrong? |
||
xsensordev
Groupie Joined: 19 August 2021 Location: Canada Status: Offline Points: 24 |
Post Options
Thanks(0)
|
|
Okay I've spent several hours digging through the maze of cj code and managed to figure out the issue.
The CXTPPropertySheet::SetTheme() call after the call to SetNavigator() causes CXTPCommandBars::EnableFrameTheme(TRUE) to be executed later in the call stack. The colors for the frame are in fact properly read from the INI dll via a call to
However, those colors are then wiped out with calls to XTPGetAccentColor() in CXTPFrameThemeNativeWindows10::RefreshMetrics(). Anyway my fix is to replace that function with the following:
|
||
agontarenko
Admin Group Joined: 25 March 2016 Status: Offline Points: 299 |
Post Options
Thanks(0)
|
|
Hello,
See please CCustomizePageGeneral
class in RibbonSample. I think, this class contains same functional what
you need. You can to use XAML for controls with black themes in
CXTPPropertyPage. Regards Artem Gontarenko
|
||
xsensordev
Groupie Joined: 19 August 2021 Location: Canada Status: Offline Points: 24 |
Post Options
Thanks(0)
|
|
Thank you Artem, I will give it a try.
Best regards Terry R. @ xsensor.com
|
||
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |