Reputation: 355
I'm trying to use the Mahapps's Metro Style v1.0 stable in VS2013 with Windows 7. According to the initial modification in the quick start section, the main window should look like this:
but instead look like this:
When I used version 0.7 worked fine.
Has anyone else experienced this?
Interesting fact:
The second image is what I get, it is saved in .jpeg, but when I saved the screenshot in .png format, it looks like this:
Upvotes: 1
Views: 1422
Reputation: 14621
You should have always these basic stuff:
App.xaml
<Application x:Class="WpfApplication.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="MainWindow.xaml">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colors.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/Blue.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseLight.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>
Window xaml
<controls:MetroWindow x:Class="WpfApplication.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
Title="MainWindow"
Height="600"
Width="800">
<Grid>
<!-- now your content -->
</Grid>
</controls:MetroWindow>
Window xaml code behind
using System;
using MahApps.Metro.Controls; // MahApps.Metro reference
namespace WpfApplication
{
public partial class MainWindow : MetroWindow
{
public MainWindow()
{
InitializeComponent();
}
}
}
Hope this helps!
Upvotes: 2
Reputation: 2393
You can see how everything is implemented on very simple examples to GitHub MahApps.Metro Surely you forgot to remove or add what is namespace in xaml page or not remove window parameters.
Upvotes: 0