TaskPane - Applying Powerpoint Office Theme
ADX Task Pane, I want to apply PPTX Office Theme
|
Dan Linstedt
Posts: 6
Joined: 2022-09-01
|
I have created a PowerPoint add-in for Office 365. Everything works, I added an ADXTaskPane instance, and it works.
Now - when it initializes, I would like to have the task pane "read and apply" the current PowerPoint office theme (in this case Dark Mode) colors to the task pane, the list box and the button in the task pane.
I searched everywhere I could find in Office / Microsoft, VB.NET script forums, etc.. for anything related to themes, colors, PowerPoint colors, and reading their settings - I was not able to find anything.
Would you be able to provide me with some code that:
a) recognizes when the Office theme changes and changes the task pane with it?
b) sets the theme on task pane instantiation?
Thanks,
Dan |
|
Posted 06 Feb, 2023 16:23:25
|
|
Top
|
|
Andrei Smolin
Add-in Express team
Posts: 19018
Joined: 2006-05-11
|
Hello Dan,
Note that another set of task panes - of the ADXPowerPointTaskPane type - allows you to color the pane to the current Office theme. Check section Your first Microsoft Office COM add-in, see the PDF file in the folder {Add-in Express}\Docs on your development PC. When following the steps pay attention to the ADXPowerPointTaskPanesCollectionItem.UseOfficeThemeForBackground property;select that component and find the property in the Property window.
If you need to use Custom Task Panes (of the ADXTaskPane type), see the OfficeColorScheme property and OfficeColorSchemeChanged event of the add-in module.
Regards from Poland (GMT+1),
Andrei Smolin
Add-in Express Team Leader |
|
Posted 07 Feb, 2023 11:05:00
|
|
Top
|
|
Dan Linstedt
Posts: 6
Joined: 2022-09-01
|
Thank you, this is helpful. But I have another question, can I build one of these with the "UX designer" that comes with your product?
Also, how do I convert my existing taskpane (built in the designer) to a ADXPowerPointTaskPane type?
Thanks,
Dan |
|
Posted 07 Feb, 2023 14:17:33
|
|
Top
|
|
Andrei Smolin
Add-in Express team
Posts: 19018
Joined: 2006-05-11
|
Hello Dan,
Create a UserControl, put it onto the custom task pane, move your controls from the custom task pane to the UserControl, move the logic from the CTP to the UserControl. Once this is done, create an ADXPowerPointTaskPane as described in the manual and put the UserControl onto the ADX pane.
Regards from Poland (GMT+1),
Andrei Smolin
Add-in Express Team Leader |
|
Posted 08 Feb, 2023 08:34:17
|
|
Top
|
|
Dan Linstedt
Posts: 6
Joined: 2022-09-01
|
Thank you Andrei for accurate answers. Thank you for creating such a wonderful product. It really makes my life easy. I have done the following:
1. Created PowerPointTaskPaneManager with a PowerPointTaskPaneCollectionItem.
2. Moved my controls in to the collection item
3. compiled
4. started powerpoint (office 365)
5. result? task pane is back to original default light gray color
6. Looked at the settings UseOfficeThemeForBackground and set it to TRUE
7. Recompiled, re-deployed, and again (even though powerpoint is already in dark mode, the background is still set to light gray)
8. Looked at the PowerPointTaskPane: BackColor and it's set to the standard light gray, the textcolor is set to black
It does not appear to inherit the office theme properly to override the properties of the colors set.
Do you have any code suggestions during Init cycle / pre-display to take care of this? Not sure where to go from here.
Thanks,
Dan |
|
Posted 08 Feb, 2023 10:12:38
|
|
Top
|
|
Andrei Smolin
Add-in Express team
Posts: 19018
Joined: 2006-05-11
|
|
Posted 09 Feb, 2023 04:13:54
|
|
Top
|
|