[英]'Provide value on 'System.Windows.Baml2006.TypeConverterMarkupExtension' threw an exception.' Line number '49' and line position '38'
I am making my first wpf application which now just implements a "floor" with a texture, viewed from above. 我正在制作我的第一个wpf应用程序,它现在只是实现了一个带有纹理的“地板”,从上面看。 when running I get this exception: 在运行时我得到这个例外:
Provide value on System.Windows.Baml2006.TypeConverterMarkupExtension' threw an exception.' 在System.Windows.Baml2006.TypeConverterMarkupExtension'上提供了一个异常'。 Line number '49' and line position '38' 行号'49'和行位置'38'
The line they talk about is 他们谈论的界限是
<ImageBrush ImageSource="/wood1_1000X1000.jpg" />.
I also tried with a png extension. 我也试过png扩展。 The image has a resolution of 1000 x 1000. 图像的分辨率为1000 x 1000。
Assuming the image is: 假设图像是:
You can reference it like this: 你可以像这样引用它:
<ImageBrush ImageSource=
"pack://application:,,,/YourProjectName;component/Images/wood1_1000X1000.jpg";
In my case, I had foreground color as 282828 for a checkbox. 就我而言,我的前景色为复选框282828。 I changed it as #282828. 我改为#282828。 Its fixed the issue. 它解决了这个问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.