1

I am trying to develop a modern wpf application using the MUI package. However I do not wish for the back button to be present and I tried to follow the steps mentioned in this link but it is not working.

I am getting errors as controls not defined in namespace, etc. Basically, I cannot get the code to compile. What am I doing wrong?

Machavity
  • 30,841
  • 27
  • 92
  • 100
akanshas
  • 13
  • 7

1 Answers1

3

Because the TargetType property in the Style references controls from the ModernUI library, you need to add the XML namespace for the ModernUI controls in the ResourceDictionary containing the Style.

I don't know what that namespace is, but need to add something like this:

xmlns:mui="clr-namespace:FirstFloor.ModernUI.Windows.Controls;assembly=FirstFloor.ModernUI"
Glen Thomas
  • 10,190
  • 5
  • 33
  • 65
  • Hi Glen. Thanks for your reply. I did that too but it shows ModernWindow does not exist in that namespace. – akanshas Aug 19 '15 at 22:14
  • And if just comment out the back button code and leave the rest as is, the Initialize component funtion in MainWindow.xaml.cs is undefined – akanshas Aug 19 '15 at 22:22
  • Like I said in my answer, I do not know the exact namespace as I do not have the Modern UI library to hand, you would need to find out what it is. – Glen Thomas Aug 19 '15 at 22:27
  • Went down this path, had to make a few edits to those files but had it working :) – akanshas Jan 13 '17 at 21:18
  • This seems to be a common issue. As Glen already suggested, "assembly=FirstFloor.ModernUI" is required to be added to the namspace. More details can be find at: https://github.com/firstfloorsoftware/mui/issues/53 – Francesco Jan 25 '17 at 07:29