From 34864ac842b35445fba744fad332fb9bc9adb81b Mon Sep 17 00:00:00 2001 From: Vishal Omprasad Date: Mon, 8 Sep 2025 12:50:14 +0530 Subject: [PATCH 1/3] 977013 - Kanban UG code-snippet highlight --- wpf/Kanban-Board/Getting-started.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wpf/Kanban-Board/Getting-started.md b/wpf/Kanban-Board/Getting-started.md index 3df898eb5..bc2c9cf36 100644 --- a/wpf/Kanban-Board/Getting-started.md +++ b/wpf/Kanban-Board/Getting-started.md @@ -94,7 +94,7 @@ To populate the kanban card items, utilize the [`ItemsSource`](https://help.sync The following sample code demonstrates this process in action: {% tabs %} -{% highlight XAML hl_lines="3, 4, 5, 6, 7, 8, 91, 11, 12, 13" %} +{% highlight XAML hl_lines="3 4 5 6 7 8 9 10 11 12 13" %} {% endhighlight %} -{% highlight C# hl_lines="1, 3, 4, 7, 9, 10, 11, 12, 15, 17, 18, 19, 20, 23, 25, 26, 27, 28, 31" %} +{% highlight C# hl_lines="1 3 4 7 9 10 11 12 15 17 18 19 20 23 25 26 27 28 31" %} SfKanban kanban = new SfKanban() { @@ -222,7 +222,7 @@ Alternatively, you can manually define columns by setting [`AutoGenerateColumns` Let’s look at the practical code example: {% tabs %} -{% highlight XAML hl_lines="2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27" %} +{% highlight XAML hl_lines="2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27" %} {% endhighlight %} -{% highlight C# hl_lines="1, 2" %} +{% highlight C# hl_lines="1 2" %} this.kanban.ItemsSource = new ViewModel().Tasks; this.kanban.ColumnMappingPath = "Status"; From fd209b181e1c3df5d868af8d2fc9d054d2c03150 Mon Sep 17 00:00:00 2001 From: JothikaSF4341 Date: Mon, 8 Sep 2025 20:35:55 +0530 Subject: [PATCH 2/3] Updated the UG changes in SfSkinManager --- wpf/Themes/Skin-Manager.md | 69 ++++++++++++++++++ ...-Theme-Resources-Using-TryFindResource.png | Bin 0 -> 3738 bytes 2 files changed, 69 insertions(+) create mode 100644 wpf/Themes/Skin-Manager_images/Accessing-Theme-Resources-Using-TryFindResource.png diff --git a/wpf/Themes/Skin-Manager.md b/wpf/Themes/Skin-Manager.md index 5db27ca3e..2024ad2d3 100644 --- a/wpf/Themes/Skin-Manager.md +++ b/wpf/Themes/Skin-Manager.md @@ -536,6 +536,75 @@ Dark Theme: ![Customizing using ThemeResource Dark](Skin-Manager_images/Customizing-using-ThemeResource-Dark.png) +### Accessing Theme Resources Using TryFindResource + +To access specific theme resources in your WPF application, you can use the `TryFindResource(key)` method to retrieve a resource by its key and apply it in the code-behind. + +Theme resource keys are typically defined in: + +1) **Brushes.xaml:** Contains brush-related keys such as ContentBackground, ContentForeground, etc. + +2) **Common.xaml:** Contains font size and style keys like HeaderTextStyle, SubHeaderTextStyle, etc. + +These files are located under the Common folder when [exporting a theme from ThemeStudio](https://help.syncfusion.com/wpf/themes/theme-studio#exporting-theme-project). You can also refer to the [Resource Key list](https://help.syncfusion.com/wpf/themes/skin-manager#resource-key-list) to locate specific styles for various controls. + +**Example: Applying Theme Resources to a Button** + +{% tabs %} + +{% highlight XAML %} + + + +{% endhighlight %} + +{% endtabs %} + +Include the following namespace and apply the implementation in your code-behind to retrieve and assign theme-specific resources for a button control. + +{% tabs %} + +{% highlight C# %} + +using Syncfusion.Themes.Windows11Light.WPF; + +Theme currentTheme = SfSkinManager.GetTheme(myButton); + +if (currentTheme.ThemeName == "Windows11Light") +{ + var buttonStyleKey = new ThemeKey + { + Theme = typeof(Windows11LightSkinHelper), + Key = "WPFPrimaryButtonStyle" + }; + var textStyleKey = new ThemeKey + { + Theme = typeof(Windows11LightSkinHelper), + Key = "HeaderTextStyle" + }; + var foregroundStyleKey = new ThemeKey + { + Theme = typeof(Windows11LightSkinHelper), + Key = "ContentForeground" + }; + Style buttonStyle = TryFindResource(buttonStyleKey) as Style; + myButton.Style = buttonStyle; + double fontSize = (double)TryFindResource(textStyleKey); + myButton.FontSize = fontSize; + SolidColorBrush backgroundBrush = TryFindResource(foregroundStyleKey) as SolidColorBrush; + myButton.Foreground = backgroundBrush; +} + +{% endhighlight %} + +{% endtabs %} + +This example demonstrates how to dynamically apply a button style, foreground color, and font size using theme resource keys defined in the Brushes.xaml and Common.xaml files for the Windows11Light theme. + +**Output Screenshot** + +![Accessing Theme Resources Using TryFindResource](Skin-Manager_images/Accessing-Theme-Resources-Using-TryFindResource.png) + ## Resource Key List ### Framework Controls diff --git a/wpf/Themes/Skin-Manager_images/Accessing-Theme-Resources-Using-TryFindResource.png b/wpf/Themes/Skin-Manager_images/Accessing-Theme-Resources-Using-TryFindResource.png new file mode 100644 index 0000000000000000000000000000000000000000..15767b6c0bd3b9fbf8c72db5392129575ba80816 GIT binary patch literal 3738 zcmds4={Fk)_fD%QrVA}yP;HG7OX$@0mZGSoK@f@5UbVFLr6iW3RoaT;)l#k4B7(%e zB-YTOt*LZ^v1g&BT3ceN2qN+`zrWx;=l%A6xZ64R-sjx&e7R4$BgFccSwnQuXdV4yn#>Wi zyGQKlN30~vZzQUty%H8bP&QpotHoa~#aX$?y{79IabWykl*R+OS&WXp~ zOrNE8N6Z8u`N^+sGs`|YR-Aoe5}uy!#Q@Wl*x=-m^?!;i$VM*t_xB>)#vWdPUzHyUK}z<5SaR_FrV zq0u*47gy)zWF1*q{iZ~dBW-35rYjMyVC~cwJp0F`2N>n!FG!Br+;G#*I;BFl(YMvM z9W6sk+M=8~W062(lb2(|7Dk)%4!4|^m_kW(C|#hfSP<3AkU*=k2m7ZHP!)S%5Q zC(I=kj&#_sZy{pp{uYYUmVh^5`tk&N9mfw6bS^ItiEoW;fCrzj{a zaaExN-YyN&eg~2s2rXy{Y?X(1ocb5X?|4N0^5jTMP~&xdS0~EY;tbmT09MyIY%vJW z5=yq2w%w+=xS^S{u?KTeBkVMl3hlO@w)}d}!tlu6$c+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O3E0p1k#y)|LCh`>Av`nNvAFVVnQju# zL-iZ6^%+0tbB~ai+Rm>1AY=)|&(z#DF33r$UiPjfX}m{ zP(3jWN;XAsW^iF`dQ5oIM|rsWJ#N|- z!Luo6O!1*~xLx3+);q!bv?!rX*3^*P!Hc&$Io(xE&qtUjZWcd$N1++pqrO=ray}KQ z(>LXlQll`(vt>6EO3scy5EpBye*dQouUoOb+$8aSW%u@IDH^q_tj}@Yo1JESal_a8 zzLG6!cbnirv=+Wa+dr_)DT^tA9%X{C$CN!Up5V}y7O;xDe~(xgZro0PbNa~kA7V;c-; dQ&~(tlwOYgEM9PF Date: Tue, 14 Oct 2025 03:51:23 +0530 Subject: [PATCH 3/3] Added the release notes MD file and corresponding node entry in the TOC.html file --- wpf-toc.html | 2 +- wpf/Release-notes/v31.2.2.md | 96 ++++++++++++++++++++++++++++++++++++ 2 files changed, 97 insertions(+), 1 deletion(-) create mode 100644 wpf/Release-notes/v31.2.2.md diff --git a/wpf-toc.html b/wpf-toc.html index b16f11a95..d471bc5b5 100644 --- a/wpf-toc.html +++ b/wpf-toc.html @@ -2289,7 +2289,7 @@ Word Library (DocIO)
  • Release Notes -