tags:

views:

15

answers:

0

I am loading a resource.xaml file from the hard drive when the app starts for theming. When I try to load a ImageBrush I cannot specify the Uri as a relative so we get IOExeption when that style is loaded. Am I missing something?

Here is a segment of my loaded xaml file with the ImageBrush

<Style x:Key="theBackground" TargetType="{x:Type UserControl}">
    <Setter Property="Background">
        <Setter.Value>
            <ImageBrush Stretch="Fill">
                <ImageBrush.ImageSource>
                    <BitmapImage UriSource="/BackgroundImage/BG.png" />
                </ImageBrush.ImageSource>
            </ImageBrush>
        </Setter.Value>
    </Setter>
</Style>

Due to the nature of the intent of the file, I cannot use any procedural code.