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