user6895357
user6895357

Reputation:

mahapp Lost window style after updated to latest version

I recently Moved to the latest version of MahApp available on NUget.I changed because i moved my application .Net4.0 to .NET 4.5. System.Windows.Interactivity for .NET 4.5 wpf project for .NET 4.5 wpf project After this i am facing issues with Window style Please find the screenshot.

enter image description here

Upvotes: 0

Views: 359

Answers (1)

shanmugharaj
shanmugharaj

Reputation: 3924

I tried to reproduce the same by creating a WPF application in Net40 framework and following the MahApps document to add the library and styles. Then I migrated the project to Net45. After I removed the

  1. Package.config file
  2. MahApps.Metro reference from the project
  3. System.Windows.Interactivity reference from the project

Then again install the MahApps libraries by

Install-Package MahApps.Metro

in package manager console. And when I run i the same application it just works fine. This is my App.Xaml code as per the docs

<Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <!-- MahApps.Metro resource dictionaries. Make sure that all file names are Case Sensitive! -->
                <!--<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" />
                <!-- Accent and AppTheme setting -->
                <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>

But what I observed is when i remove this line

<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />

I am getting the same style as you described in the image

enter image description here

If I add that line then everything works fine,

enter image description here

So I guess you App.Xaml should miss something.

I apologize if i misunderstood your question.

Upvotes: 1

Related Questions