c# - Mahapps.Metro : The attachable property WindowCommands was not found in type MetroWindow -
i thought i'd try out wpf metro using mahapps.metro , have come across error:
the attachable property windowcommands not found in type metrowindow
i have included packages nuget , have following xaml:
<controls:metrowindow x:class="wpfapplication1.mainwindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:controls="clr-namespace:mahapps.metro.controls;assembly=mahapps.metro" title="mainwindow" height="350" width="525"> <window.resources> <resourcedictionary> <resourcedictionary.mergeddictionaries> <resourcedictionary source="pack://application:,,,/mahapps.metro;component/styles/colours.xaml" /> <resourcedictionary source="pack://application:,,,/mahapps.metro;component/styles/fonts.xaml" /> <resourcedictionary source="pack://application:,,,/mahapps.metro;component/styles/controls.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> </window.resources> <controls:metrowindow.windowcommands> <controls:windowcommands> <button content="settings" /> </controls:windowcommands> </controls:metrowindow.windowcommands> <controls:metrocontentcontrol> <button content="blah" height="20" width="150" /> </controls:metrocontentcontrol> </controls:metrowindow>
and code behind:
using mahapps.metro.controls; namespace wpfapplication1 { /// <summary> /// interaction logic mainwindow.xaml /// </summary> public partial class mainwindow : metrowindow { public mainwindow() { initializecomponent(); } } }
i attempting title bar 1 on documentation here.
any ideas?
build project.
your code seems ok. seems might have not build project after references added. error still persist?
Comments
Post a Comment