Theming of WPF dialog not working for all controls on the dialog
Hi,
I need to change color/theme of all controls on WPF dialog whenever there is change of theme from VS2022 (i.e. Tools -> Options -> Color Theme )
I followed below MSDN article
https://learn.microsoft.com/en-us/visualstudio/extensibility/vsix/recipes/use-themes?view=vs-2022
As per article, I download project from github - https://github.com/VsixCommunity/Community.VisualStudio.Toolkit/tree/master
Build the project - Community.VisualStudio.Toolkit.17.0 and used generated assembly Community.VisualStudio.Toolkit.dll
I observed issues like - content of textbox control are not visible , combo box control background does not change with theme etc.
Is there any issue with this article or there is any other recommend way to change color of all different types of control on the dialog when the theme changes?
Following is code snippet of dialog window
<platformUI:DialogWindow
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:platformUI="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Shell.15.0"
xmlns:System="clr-namespace:System;assembly=mscorlib"
xmlns:draw="clr-namespace:System.Drawing;assembly=System.Drawing"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" x:Name="m_vabc" x:Class="class1"
Title="test"
ShowInTaskbar="False"
WindowStartupLocation="CenterOwner"
HorizontalAlignment="Left" VerticalAlignment="Top"
ScrollViewer.VerticalScrollBarVisibility="Auto"
ScrollViewer.HorizontalScrollBarVisibility="Auto"
HorizontalContentAlignment="Center"
VerticalContentAlignment="Center"
Height="640"
Width="580"
DataContext="{Binding RelativeSource={RelativeSource Mode=Self}, Path=<someObject>, Mode=OneWay}"
ResizeMode="NoResize"
SizeToContent="WidthAndHeight"
SnapsToDevicePixels="True"
Loaded="OnLoaded"
xmlns:toolkit="clr-namespace:Community.VisualStudio.Toolkit;assembly=Community.VisualStudio.Toolkit"
toolkit:Themes.UseVsTheme="True">