I\'ve built a WPF app, which completely works now. However, to clean it up a bit I wish to move my MainWindow.xaml
to the view folder I\'ve created. After I\'ve
You don't need to update class name in xaml file unless you have changed the namespace of your class.
Most likely you haven't updated StartupUri
for App.xaml
. Change it to:
StartupUri="view/MainWindow.xaml"
from
StartupUri="MainWindow.xaml"
The answer of @Rohit Vats is quite good!
However that's a good point to remember: you have to change all the absolute paths (in XAML) to your resources, prepending them by a /
in order to indicate that these paths are relative to the root directory
.
Example:
From <Image Source="Assets/Loading.gif">
To <Image Source="/Assets/Loading.gif">
and so on.