On my WPF Window
I have an Image
whose UriSource
is set to the URL of some image on the internet.
<Image>
<Image.Source>
<BitmapImage UriSource="http://tinyurl.com/anmucph" />
</Image.Source>
</Image>
Everything works properly when I use a publicly accessible image on the internet: the WPF framework does the necessary HTTP GET request and displays the image.
What I want to do is use a UriSource
that is a URL that requires the HTTP GET request to come with an Authorization header. (I have the required Authorization header string that I want to use.)
How do I use a UriSource
that requires authorization? Is there something built into WPF? Or does this require a custom solution? If so, how can I hook into the WPF framework to provide custom logic for performing the HTTP GET?