[WPF系列] 高级 调试_.NET_编程开发_程序员俱乐部

中国优秀的程序员网站程序员频道CXYCLUB技术地图
热搜:
更多>>
 
您所在的位置: 程序员俱乐部 > 编程开发 > .NET > [WPF系列] 高级 调试

[WPF系列] 高级 调试

 2015/1/8 18:21:56  Look Into Coding  程序员俱乐部  我要评论(0)
  • 摘要:ImageBrush出现TypeConverter问题'Providevalueon'System.Windows.Baml2006.TypeConverterMarkupExtension'threwanexception.'Linenumber'49'andlineposition'38' Assumingtheimageis:IncludedinyourprojectIt'sinafoldernamed"Images"
  • 标签:

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)

  • 相关文章
发表评论
用户名: 匿名