This project is read-only.

Weird behavior when using MetroWindow

Apr 25, 2014 at 1:31 AM
Edited Apr 25, 2014 at 1:36 AM
Hi there :),

first off: great work on Fluent so far. It looks and behaves well and I think I'm going to dig a bit deeper into it and perhaps help if I can.

My current problem is the following:
I have made some very simple WPF 4.5 application, which does nothing, but display a MetroWindow-derived window, which contains a few tabs and other Fluent elements.

Now when I run it (either from within the IDE or from outside), it displays a window with a border for a few moments until it has loaded everything. Then it suddenly becomes the window I've seen in the designer.

It's odd, because I can't take a screenshot of this (the screenshot seems to contain the loaded window - even though it is - at that very moment - not visible to the user / me). It also does not matter whether I've build a release- or debug version and whether I'm using vshost or not.

Do you happen to have an idea why this is happening?

If I use regular RibbonWindow, it takes a few moments to load (off-screen) and then simply displays the rendered window once it's done loading and rendering it. So I take the problem is MetroWindow-related. It certainly isn't a serious issue, but I could imagine there's something I'm doing wrong.

Here's my MainWindow.xaml:
<Fluent:MetroWindow    x:Class="Form2DocX.MainWindow"
                       Title="MainWindow" Height="350" Width="525">

            <Fluent:RibbonTabItem ReduceOrder="Default,Default,Default,Large,Large,Large,Other,Other,Other"
<!-- some more controls here -->
Here's my App.xaml:
<Application x:Class="Form2DocX.App"
                <!--Attach Default Fluent Control's Theme-->
                <ResourceDictionary Source="pack://application:,,,/Fluent;component/Themes/Metro/White.xaml" />
Do you happen to have an idea what might be causing this?

Edit: this problem also seems to occur if I modify one of the samples, that is available inside the ZIP file, to go for the MetroWindow instead of the RibbonWindow; however: it's far less noticeable (at least it feels that way).