spiegelp / MaterialDesignExtensions

Material Design Extensions is based on Material Design in XAML Toolkit to provide additional controls and features for WPF apps
https://spiegelp.github.io/MaterialDesignExtensions/
MIT License
762 stars 122 forks source link

SaveFile throws ReferenceKeyNotFoundException #8

Closed danieljnm closed 6 years ago

danieljnm commented 6 years ago

Hi,

When I try to implement the SaveFile I get the following exception: "ResourceReferenceKeyNotFoundException: 'fileSystemEntriesGroupHeaderTemplate' resource not found."

I get the following stack trace as well: "at MS.Internal.Helper.FindResourceHelper.DoTryCatchWhen(Object arg) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)", without any inner exceptions.

What could be the course of this?

spiegelp commented 6 years ago

@k0ngen

Hi, I can only guess about the cause, because I do not have your actual code. However, the exception message points to a missing resource. I assume that you forgot to add the styles and templates to your application. Have a look to App.xaml from the demo. The resources will be added to the demo application in line 11.

If this does not solve you problem, please provide a demo project with your code that I can reproduce the situation on my computer.

danieljnm commented 6 years ago

@spiegelp Hi again, Sorry for the late response. It seems that this error only happens when I try to insert one of the file dialogs into a stepper.

Can you gives this a try?

spiegelp commented 6 years ago

@k0ngen I can embed a file control inside a stepper or call a file dialog via a button without any problems. So the issue seems to be in your code. You have to provide me a demo project in order to do further debugging.

danieljnm commented 6 years ago

@spiegelp Can you show me how you did that?

spiegelp commented 6 years ago

@k0ngen I added an example to the Stepper demo. Have a look at the files StepperControl.xaml, StepperControl.xaml.cs, StepperViewModel.cs, as well as App.xaml.