This example demonstrates about how to center align the header text in .NET MAUI Expander (SfExpander).
You can center align the text of the Expander Header in .NET MAUI SfExpander by using the HorizontalTextAlignment and VerticalTextAlignment properties.
XAML:
Set HorizontalTextAlignment and VerticalTextAlignment of the header label to Center.
{% tabs %} {% highlight xaml tabtitle="MainPage.xaml"%}
{% endhighlight %} {% endtabs %}