0

my question is as simple as difficult:

How can I replace the glass-frames of the window with single-colored ones like Visual Studio 11 does?

I already played around using Windows Forms and setting its border to none, but this will lack the Aero-Snap-functions. I saw Adobe Brackets using something familiar, but not as perfect as e.g. Visual Studio. Visual Studio uses WPF, I think, so there, it should be possible.

michaeln
  • 1,032
  • 17
  • 33
  • 1
    Check out this question: http://stackoverflow.com/questions/13592326/making-wpf-applications-look-metro-styled-even-in-windows-7-window-chrome-t – Daniel Oct 07 '13 at 20:22

1 Answers1

1

Just replace the window template for something simpler:

<Window x:Class="WpfApplication11.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525"
        WindowStyle="None" AllowsTransparency="True">
    <Window.Template>
        <ControlTemplate TargetType="Window">
            <Grid Background="Blue">
                <ContentPresenter ContentSource="Content"/>
            </Grid>
        </ControlTemplate>
    </Window.Template>
</Window>

Or

use MahApps.Metro

Edit: This only works with WindowStyle="None" and AllowsTransparency="True"

Federico Berasategui
  • 43,562
  • 11
  • 100
  • 154
  • Thanks, I will have a look at it – michaeln Oct 07 '13 at 18:52
  • well, you missed some backslashes in the `end tags`. Anyway this doesn't work as what the OP wants, the effect it brings is just like this `BackColor = Color.Blue;` in `winforms`. I've tested it, the `Window Chrome` is still glassy. – King King Oct 07 '13 at 19:01
  • @HighCore I think it's still not what the OP wants, the OP wants to keep the `control box` with minimize, maximize and close buttons, he just wants to disable the `glassy effect` of the title bar and border around the window. BTW, the effect after you edited can be achieved by `FormBorderStyle = FormBorderStyle.None` in `winforms` – King King Oct 07 '13 at 19:13
  • @KingKing if you have a better answer, then go ahead and post it. BTW, winforms sucks and is completely useless. – Federico Berasategui Oct 07 '13 at 19:15
  • @HighCore I agree that `winforms` is not good now, **what winforms can do, WPF can do** and **what WPF can do, winforms may not do**. I don't have any answer here, I think it's not easy because it's some kind of system theme, we can disable the glassy but that will affect all the windows, I think the solution is **customize the window from scratch to mimic the look and feel of control box**. – King King Oct 07 '13 at 19:23
  • @HighCore BTW, I've fallen in love with `WPF`, I'm enjoying it now, however still can't forget `winforms` :) – King King Oct 07 '13 at 19:24