Last Updated: 03 Aug 2016 13:48 by ADMIN
Martin Ivanov
Created on: 28 Jul 2016 08:53
Category: OutlookBar
Type: Bug Report
OutlookBar: The minimize button overlaps the title of the control
You can work this around by extracting the RadOutlookBar style and slightly modify it. You can find the Grid panel that holds the title and the minimize button and position the elements in different columns. 
<!-- Other XAML from the template -->
        <ColumnDefinition />
        <ColumnDefinition />
    <ContentControl x:Name="TitleElement" ContentTemplate="{TemplateBinding TitleTemplate}" Foreground="#FFDDDDDD"
                    FontWeight="Bold" HorizontalContentAlignment="Stretch" IsTabStop="False" Margin="5,3"
                    VerticalAlignment="Center" VerticalContentAlignment="Center"/>
    <telerik:RadToggleButton x:Name="MinimizeButton" Grid.Column="1"
                             IsChecked="{Binding IsMinimized, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                             Style="{TemplateBinding MinimizeButtonStyle}">
            <Binding Path="IsMinimizable" RelativeSource="{RelativeSource TemplatedParent}">
<!-- Other XAML from the template -->

Another approach is to use the ChildrenOfTypeExtensions.ChildrenOfType<T>() method to get the Grid and the minimize button, and add set the required properties. Here is an example:

private void outlookBar_Loaded(object sender, RoutedEventArgs e)
    var minimizeButton = this.outlookBar.ChildrenOfType<RadToggleButton>().FirstOrDefault(x => x.Name == "MinimizeButton");
    if (minimizeButton != null)
        var parentGrid = minimizeButton.ParentOfType<Grid>();
        parentGrid.ColumnDefinitions.Add(new ColumnDefinition());
        parentGrid.ColumnDefinitions.Add(new ColumnDefinition());
        Grid.SetColumn(minimizeButton, 1);