Reputation: 10713
I have a wpf app with this folder structure:
In the HomeController, I want to access the Images folder. I want to store an image in the Images folder from the HomeController. How can I do this? I tried using pack origin but it takes me to bin.
Upvotes: 0
Views: 128
Reputation: 5635
This should do the trick:
pack://application:,,,/Images/image.png
Can be used in xaml or in code. For more detailed explanation you can review this Microsoft page about it.
In code: Uri uri = new Uri("pack://application:,,,/Images/image.png");
In xaml: <element attribute="pack://application:,,,/Images/image.png"/>
Upvotes: 1