I am new in WPF. Created a new WPF UserControl. See that some people uses an app.xaml file in order to set inside application level ressources.
My solution consists of a WinForm and a WPF UserControl. I don't see somewhere any app.xaml file.
How to proceed?
App.xaml is associated with a WPF application. If you've only got a UserControl, there's no application for it to be part of, is there?
Create a WPF application and you'll have an App.xaml to put application-level resources in.
Out of interest, why do you have WinForm if you're using a WPF user control?
EDIT: To repeat my comment: you're not going be provided with WPF Application resources smoothly when you're not creating a WPF application.
EDIT: As noted in Anthony Brien's answer, it seems you can hack it around - but I would strongly recommend against this sort of thing if you can possibly help it. Fundamentally, you're working against the expectations of the platform - and that's never a nice situation to be in.
It is possible to have application wide WPF resources in a WinForms application. Look at http://www.wpftutorial.net/AppLevelResourcesWinForms.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With