首页 > Windows开发 > 详细

[WPF系列] 高级 调试

时间:2015-01-08 17:52:15      阅读:252      评论: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
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!