❔ WPF application resources not found in window
I'm doing a small project but for reason I can't use my WPF application resources in my windows. I have done it before and looking at my other projects so find what I do wrong but everything seems to be the same... I'm using a 3 layer architecture. Where my notes.startup start everything up and the start.xaml file is my wpf window. it starts the window but when I want to add a style I get an "resource could not be resolved" error. Because the window opens I guess almost everything works but I probably forgot something small
Start.xaml
app.xaml
11 Replies
Now it works if I build the code but not in my preview. (The style gives it a blue background)
Do not rely on designer
please
$rulesofwpf
Is it so bad?
for bugs etc
It's awful.
Hot reload is significantly better.
Just debug your app and change the XAML at runtime, when you save it is reflected immediately for the debugged app.
my first problems where in the XAML ... But I think with a build it fixed itself
Yes. That is a must.
You have to build first for everything regarding intellisense to update.
Oh ok! Just starting with UI and seems buggier then just (simple) console apps.
I guess because I do alot of console logs so it rebuilds more
I used to use the designer as a xaml replica for roughing things in, but really like was stated, the designer in WPF is a hot mess; it's never gotten better since day 1.
tbh designer in XAML shouldn't exist. Only preview should exist.
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.