Change Title Bar color

Nov 21, 2013 at 4:35 PM
Hi, can someone please give me a hand. Is it possible to change the colour of the title bar, I can only change it between white and black when I set the theme to Light or Dark, but can I set it to any color? I've noticed it is blue on some screen shots, how are people able to change it?

Thanks a lot.
Nov 28, 2013 at 1:53 AM
Hey, did you try adding IsMainWindow="True" to the open tag <metro:Window .... > in your MainWindow.xaml file? Hopefully that is what you're trying to do. This will make the title bar inherit the accent color. I'm still trying to figure out how to do specific changes to certain aspects of the theme myself.

Good luck.
Jan 31, 2014 at 5:54 AM
In your window's constructor, do the following -
SetIsMainWindow(this, true);
This is because IsMainWindow cannot be set directly from XAML (as far as I know).
Feb 8, 2014 at 6:09 AM
I tried to that what you said, but the title bar is still blue even though i have color changed. Or might not be changing the correct value. Can tell what the correct values i need to change in order to get the title bar different color. Its weird because i did the same thing another window and it work fine but not on this one.
<metro:Window x:Class="MultiVariAnalysisWindow"
    WindowStartupLocation="CenterScreen" params:Manager.AccentBrush="#FF1A1A1C"
    Title="MultiVariAnalysisWindow" Height="600" Width="800" Foreground="White" Background="#FF1A1A1C">

                <ResourceDictionary Source="ImageResourceDictionary.xaml" />
        <CommandBinding Command="Close" Executed="mnuClose_Executed" />

    <DockPanel Name="MainDockPanel" LastChildFill="True">
        <Menu x:Name="MainMenu" Background="#FF262626" Foreground="#FFA6A6A6" DockPanel.Dock="Top" VerticalAlignment="Stretch" 
              params:MenuBase.SubmenuBorderThickness="0" Padding="7,6,6,6" UseLayoutRounding="True" params:Design.Theme="Light">
            <MenuItem x:Name="mnuFile" Header="_File">
                <MenuItem x:Name="mnuClose" Command="Close" InputGestureText="Alt+F4" />
            <Separator Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}" />
            <MenuItem x:Name="mnuOverView" Header="OverV_iew" />
            <Separator Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}" />
            <MenuItem x:Name="mnuHowTo" Header="Ho_w to" />
            <Separator Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}" />
            <MenuItem x:Name="mnuExamples" Header="Exa_mples" />
        <StackPanel x:Name="ToolBarStackPanel" Orientation="Vertical" Width="45" Height="Auto" MinWidth="32" AllowDrop="True" Background="Black" >
            <Button x:Name="tbbUndo" ToolTip="Undo" Background="{x:Null}" Padding="0,5" Margin="0,0,0,0" MinWidth="32" MinHeight="32" BorderThickness="0" Width="32" Foreground="{x:Null}">
                <Image Source="images/Command-Undo.png" Stretch="None" VerticalAlignment="Center" HorizontalAlignment="Left" />
                <!--<Image Style="{StaticResource ResourceKey=UndoImage}" Stretch="None" VerticalAlignment="Center" HorizontalAlignment="Left"/>-->
            <Button x:Name="tbbRedo" ToolTip="Redo" Background="{x:Null}" Padding="0,5" Margin="0,0,0,0" MinWidth="32" MinHeight="32" BorderThickness="0" Width="32" Foreground="{x:Null}">
                <Image Source="images/Command-Redo.png" Stretch="None" VerticalAlignment="Center" HorizontalAlignment="Left" />
            <Button x:Name="tbbCut" ToolTip="Cut" Padding="0,5" Margin="0,0,0,0" MinWidth="32" BorderThickness="0" params:Manager.ContrastBrush="White" Width="32" Background="{x:Null}" Foreground="{x:Null}">
                <Image Source="images/Cut.png" Stretch="None" VerticalAlignment="Center" HorizontalAlignment="Left" />
            <Button x:Name="tbbCopy" ToolTip="Copy" Background="{x:Null}" Padding="0,5" Margin="0,0,0,0" MinWidth="32" BorderThickness="0" Width="32" Foreground="{x:Null}">
                <Image Source="images/Copy.png" Stretch="None" VerticalAlignment="Center" HorizontalAlignment="Left" />
            <Button x:Name="tbbPaste" ToolTip="Paste" Background="{x:Null}" Padding="0,5" Margin="0,0,0,0" BorderThickness="0" MinWidth="32" Width="32" Foreground="{x:Null}">
                <Image Source="images/Paste.png" Stretch="None" VerticalAlignment="Center" HorizontalAlignment="Left" />
        <Frame x:Name="Frame" Width="737">

Partial Public Class MultiVariAnalysisWindow
    Inherits Elysium.Controls.Window

    Sub New()

        ' This call is required by the designer.

        ' Add any initialization after the InitializeComponent() call.
        SetIsMainWindow(Me, True)

    End Sub

#Region "Executed Events"
    Private Sub mnuClose_Executed(sender As Object, e As ExecutedRoutedEventArgs)
    End Sub
#End Region
End Class