Category / Section
How to customize Maximize Button in DockingManager Control?
1 min read
Maximize button for the dock window can be customized by
MaximizeButtonTemplate of DockingManager with the TargetType as
ToggleButton.
The same has been explained in the following code snippet:
XAML:
//Code Explains how to customize MaximizeButtonTemplate in Docking Manager <Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:syncfusion="http://schemas.syncfusion.com/wpf" x:Class="Docking_MaximizationCustomTemplate_.MainWindow" Title="MainWindow" Height="350" Width="525"> <Grid> <syncfusion:DockingManager Name="Docking" UseDocumentContainer="True" MaximizeButtonEnabled="True"> <syncfusion:DockingManager.MaximizeButtonTemplate> <ControlTemplate TargetType="ToggleButton"> <TextBlock Text="Max" Foreground="Green" Background="Orange"> </TextBlock> </ControlTemplate> </syncfusion:DockingManager.MaximizeButtonTemplate> <ContentControl syncfusion:DockingManager.Header="Dock" syncfusion:DockingManager.DesiredWidthInDockedMode="150"> </ContentContro> <ContentControl syncfusion:DockingManager.Header="Dock1" syncfusion:DockingManager.DesiredWidthInDockedMode="150"> </ContentContro> <ContentControl syncfusion:DockingManager.Header="Dock2" syncfusion:DockingManager.DesiredWidthInDockedMode="150"> </ContentContro> </syncfusion:DockingManager> </Grid> </Window>
Output: