This article can be useful to anyone who wants to modify the theme of a giving VSDX file using Aspose.Diagram. We use a test file Themes1.vsdx, look like below.
Theme1.vsdx
Apply a Preset Theme to a Page
Aspose.Diagram APIs allows to apply a preset theme to get a uniform look and feel to shapes within a page, and across multiple documents. Perform the following steps in order to do this:
Create an instance of Diagram class to load a diagram
Get an instance of Page class to be set theme
Assign a Preset value to the PresetTheme property of the Page instance
Apply a Preset Theme to a Page Programming Sample
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Aspose.Diagram APIs allows to apply a preset theme variant to get a uniform look and feel to shapes within a page, and across multiple documents. Perform the following steps in order to do this:
Create an instance of Diagram class to load a diagram
Get an instance of Page class to be set theme
Assign a Preset value to the PresetTheme property of the Page instance
Assign a Preset value to the PresetThemeVariant property of the Page instance
Apply a Preset Theme Variant to a Page Programming Sample
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Aspose.Diagram APIs allows to apply a preset theme to a shape within a page. Perform the following steps in order to do this:
Create an instance of Diagram class to load a diagram
Get an instance of Shape class to be set theme
Assign a Preset value to the PresetTheme property of the Shape instance
Apply a Preset Theme to a Shape Programming Sample
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Aspose.Diagram APIs allows to apply a preset theme variant to a shape within a page. Perform the following steps in order to do this:
Create an instance of Diagram class to load a diagram
Get an instance of Shape class to be set theme
Assign a Preset value to the PresetTheme property of the Shape instance
Assign a Preset value to the PresetThemeVariant property of the Shape instance
Apply a Preset Theme Variant to a Shape Programming Sample
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Apply a Preset Theme Variant Quickstyle to a Shape
Aspose.Diagram APIs allows to apply a preset theme quickstyle to a shape within a page. Perform the following steps in order to do this:
Create an instance of Diagram class to load a diagram
Get an instance of Shape class to be set theme
Assign a Preset value to the PresetTheme property of the Shape instance
Assign a Preset value to the PresetThemeVariant property of the Shape instance
Assign a Preset value to the PresetThemeQuickStyle property of the Shape instance
Apply a Preset Theme Variant Quickstyle to a Shape Programming Sample
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Result of Apply a Preset Theme Variant Quickstyle to a Shape
Apply a Preset Theme Style to a Shape Using SetPresetThemeStyleMatrics Method
Aspose.Diagram APIs allows to apply a preset theme quickstyle to a shape within a page. Perform the following steps in order to do this:
Create an instance of Diagram class to load a diagram
Get an instance of Shape class to be set theme
Assign a Preset value to the PresetTheme property of the Shape instance
Assign a Preset value to the PresetThemeVariant property of the Shape instance
Assign a theme style by setting style value and color value of the Shape instance using SetPresetThemeStyleMatrics Method
Apply a Preset Theme Style to a Shape Using SetPresetThemeStyleMatrics Method Programming Sample
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters