"Provide a value to" System.Windows.Baml2006.TypeConverterMarkupExtension "throws an exception." Line number "49" and line position "38"

I am making my first wpf application, which now simply implements a "floor" with the texture viewed from above. on startup, I get this exception:

Provide a value in System.Windows.Baml2006.TypeConverterMarkupExtension 'threw an exception.' Line number "49" and line position "38"

The line they are talking about is

<ImageBrush ImageSource="/wood1_1000X1000.jpg" />.

I also tried with the png extension. Image has a resolution of 1000 x 1000.

+4
source share
2 answers

Assuming the image:

  • Included in your project.
  • ""
  • "" ( )

:

<ImageBrush ImageSource=
   "pack://application:,,,/YourProjectName;component/Images/wood1_1000X1000.jpg";
+14

282828 . # 282828. .

0

Source: https://habr.com/ru/post/1534072/


All Articles