To go along with the Set-ControlTheme from Sapien I created a MenuItem to go along with the naming convention
Dark, Light, Custom
When I select a new theme, how do I uncheck the others?
Items in ThemeStripMenuItem
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Re: Items in ThemeStripMenuItem
[Topic moved by moderator to PowerShell GUIs forum]
Brittney
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: Items in ThemeStripMenuItem
Here is a quick code example of how to handle menu items. Add this to each of the menu item's "click" event and it will always clear the corresponding items according to the array of items you wish to group.
- $mymenuitems_Click = {
- if ($this.Checked){
- @($submenu1, $submenu2, $submenu3) |
- Where-Object{ $_.Name -ne $this.Name } |
- ForEach-Object{$_.Checked = $false}
- }
- }