From 833ae04848a25190a07bbba5665c5baeca19056c Mon Sep 17 00:00:00 2001 From: KrithikaGanesan Date: Wed, 22 Oct 2025 14:31:21 +0530 Subject: [PATCH 1/2] 985360: Updated ReadMe file of this repository --- README.md | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0c3c3ee..0e6c938 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,28 @@ # WPF-GroupBar-Fontstyle -This repository contains the sample which shows how to change the font of header item using HeaderTemplate +This repository demonstrates how to customize the font style of header items in the **WPF GroupBar** control using the `HeaderTemplate` property. The GroupBar control is a navigation component that organizes content into expandable groups, commonly used in applications for structured navigation. By default, the header text uses the system font style, but you can override this to match your application’s theme or branding. -KB article - [WPF-GroupBar-Fontstyle](https://www.syncfusion.com/kb/11716/how-to-override-groupbaritemheader-font-in-wpf-groupbar) +## Why Customize Font Style? +Customizing the font style improves the visual appeal and consistency of your application. You can apply different fonts, sizes, colors, and styles such as bold or italic to make headers stand out or align with your design guidelines. + +## Key Implementation Steps: +- Use the `HeaderTemplate` property of the GroupBar control. +- Define a `DataTemplate` in XAML that includes a `TextBlock` or similar element. +- Apply custom font properties such as `FontFamily`, `FontSize`, and `FontWeight` within the template. +- Bind the header text to the appropriate property in your data model. + +### Example XAML: +```xml + + + + + + + + + +``` + +This approach gives you full control over the header’s appearance, allowing you to create a polished and professional UI. + +For detailed instructions and additional examples, refer to the official KB article - [WPF-GroupBar-Fontstyle](https://www.syncfusion.com/kb/11716/how-to-override-groupbaritemheader-font-in-wpf-groupbar) From d1f351a120557e32176c88dea55e31dc7e293b4b Mon Sep 17 00:00:00 2001 From: Manivannan-E <92844213+Manivannan-E@users.noreply.github.com> Date: Fri, 24 Oct 2025 15:12:35 +0530 Subject: [PATCH 2/2] Update README.md --- README.md | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 0e6c938..0393e6f 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,26 @@ -# WPF-GroupBar-Fontstyle -This repository demonstrates how to customize the font style of header items in the **WPF GroupBar** control using the `HeaderTemplate` property. The GroupBar control is a navigation component that organizes content into expandable groups, commonly used in applications for structured navigation. By default, the header text uses the system font style, but you can override this to match your application’s theme or branding. +# WPF GroupBar – Customize Header Font Style +## Overview +The GroupBar control is a navigation component that organizes content into expandable groups, commonly used in applications for structured navigation. This repository demonstrates how to customize the font style of GroupBarItem headers in the Syncfusion WPF GroupBar using the HeaderTemplate property. By default, the header text uses the system font style, but you can override this to match your application’s theme or branding. -## Why Customize Font Style? -Customizing the font style improves the visual appeal and consistency of your application. You can apply different fonts, sizes, colors, and styles such as bold or italic to make headers stand out or align with your design guidelines. +## Why customize the font style? +- Maintain visual consistency with your app’s theme +- Emphasize important navigation sections +- Improve accessibility with larger fonts and better contrast -## Key Implementation Steps: -- Use the `HeaderTemplate` property of the GroupBar control. -- Define a `DataTemplate` in XAML that includes a `TextBlock` or similar element. -- Apply custom font properties such as `FontFamily`, `FontSize`, and `FontWeight` within the template. -- Bind the header text to the appropriate property in your data model. +## Prerequisites +- WPF application (.NET Framework or .NET Desktop) +- Syncfusion WPF controls installed + - NuGet: Syncfusion.Shared.WPF and related packages for GroupBar +- XAML namespace + - xmlns:syncfusion="http://schemas.syncfusion.com/wpf" + +## Key implementation steps +- Use GroupBarItem.HeaderTemplate to override the default header look +- Define a DataTemplate with a TextBlock (or any custom element) +- Set font properties such as FontFamily, FontSize, FontWeight, FontStyle, and Foreground +- Bind the header text: + - If Header is a string: Text="{Binding}" + - If Header is an object: Text="{Binding YourProperty}" ### Example XAML: ```xml @@ -22,7 +34,4 @@ Customizing the font style improves the visual appeal and consistency of your ap ``` - -This approach gives you full control over the header’s appearance, allowing you to create a polished and professional UI. - -For detailed instructions and additional examples, refer to the official KB article - [WPF-GroupBar-Fontstyle](https://www.syncfusion.com/kb/11716/how-to-override-groupbaritemheader-font-in-wpf-groupbar) +This approach gives you full control over the header’s appearance, allowing you to create a polished and professional UI. For detailed instructions and additional examples, refer to the official KB article - [WPF-GroupBar-Fontstyle](https://www.syncfusion.com/kb/11716/how-to-override-groupbaritemheader-font-in-wpf-groupbar)