[英]adding texture to shape in WPF and Blend
如何在矩形上添加紋理,例如在畫布上拉伸對象時會在調整大小時覆蓋它?
謝謝
不是說我在乎負面點,而是那些至少離開這種得分的人通過指出一個解決方案可能會有所幫助,因為他們認為這是一個低級的問題,所以我假設他們知道答案。 我已經搜索了xaml的blend 4和相關主題,但沒有找到方向。
將圖像添加為用於填充矩形的圖像畫筆:
<Rectangle Width="auto" Height="auto" Name="myRectangle">
<Rectangle.Fill>
<ImageBrush ImageSource="C:\Users\Public\Pictures\Sample Pictures\sample.gif"/>
</Rectangle.Fill>
</Rectangle>
源: http : //social.msdn.microsoft.com/Forums/en/wpf/thread/4c70e94b-23a1-4533-9332-eaa08bcf113d
輸出:
圖片來源: http : //googleblog.blogspot.com/2012/03/bringing-self-driving-cars-to-nascar.html
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.