码迷,mamicode.com
首页 > Windows程序 > 详细

[WPF系列] 高级 调试

时间:2015-01-08 17:54:24      阅读:168      评论:0      收藏:0      [点我收藏+]

标签:

ImageBrush出现TypeConverter问题

‘Provide value on ‘System.Windows.Baml2006.TypeConverterMarkupExtension‘ threw an exception.‘ Line number ‘49‘ and line position ‘38‘

 

Assuming the image is:

  • Included in your project
  • It‘s in a folder named "Images"
  • The build action for the image is set to "Resource" (should be the default)

You can reference it like this:

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

 

This fixed the issue, I put the image in the project folder whithout including it in the project itself.

 

 

With与MaxWidth的区别

当你所要控制的对象,宽度或者高度值总是变化,而不是你想要指定的固定值,那么很有可能设置成了MaxHeight(MaxWidth)

[WPF系列] 高级 调试

标签:

原文地址:http://www.cnblogs.com/HQFZ/p/4211336.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!