1

I've created an Resourcedictionary where i define my ImageBrush to an jpg picture. I use this ImageBrush on my Path object to fill it. However when I build I get the error Error: Error HRESULT E_FAIL has been returned from a call to a COM component.

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                xmlns:c="clr-namespace:System;assembly=mscorlib"
                xmlns:Model="clr-namespace:MVVMTestApp.Model;assembly=MVVMTestApp.Model"
                xmlns:View="clr-namespace:MVVMTestApp.View"
                xmlns:ViewModel="clr-namespace:MVVMTestApp.ViewModel">

<c:Double x:Key ="StrokeUserControl">
2
</c:Double>

<ImageBrush x:Key="CountryBackground" ImageSource="../Assets/gra-bakgrund.jpg" Stretch="Fill"/>

And I'm trying to get it to fill in my Path object like this

Fill="{StaticResource CountryBackground}"
JonasN89
  • 1,386
  • 2
  • 11
  • 23

0 Answers0