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)
时间: 2024-10-09 20:11:12