Reputation: 5729
I would like to use the Controls.AnimatedTabControl.xaml
in my WPF project.
I added the line :
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.AnimatedTabControl.xaml" />
Like it's written in the documentation.
My app.xaml is now :
<Application x:Class="myAPP.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/Themes/Light.Blue.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
<ResourceDictionary Source="Controls.TabControl.xaml"/>
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.AnimatedTabControl.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
VS shows me that an error has been encountered when seeking for the dictionary resource :
pack://application:,,,/MahApps.Metro;component/Styles/Controls.AnimatedTabControl.xaml
Any idea why?
Upvotes: 1
Views: 498
Reputation: 22089
The documentation for tab control is not up-to-date. In version 2.0.0, all tab control styles were moved to the Controls.TabControl.xaml
resource dictionary that is already included in Controls.xaml
.
See the related change on GitHub: (GH-3587) All TabControl styles in one resource dictionary
In order to use the different styles, you have to replace your TabControl
with the MahApps equivalent.
<mah:MetroAnimatedTabControl>
<mah:MetroAnimatedSingleRowTabControl>
Upvotes: 1