我有應用程序與標準Inkcanvas。標準應用看起來像 Figure 1.和所有的應用程序代碼(XAML)是在這裏:wpf inkcanvas刷式
<Window x:Class="WpfApplication18.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<Grid>
<InkCanvas>
<InkCanvas.DefaultDrawingAttributes>
<DrawingAttributes x:Name="attribute" Width="40" Height="40" Color="BlueViolet" />
</InkCanvas.DefaultDrawingAttributes>
</InkCanvas>
</Grid>
我想知道如何創建非標準Inkcanvas刷圖像像這樣(圖片面膜?): Figure 2。我想使用Inkcanvas和簡單的「背景」圖像 (JPG,PNG或其他)。有沒有簡單的方法來做到這一點?你能舉一個例子嗎?
在我的應用我要畫標準Inkcanvas,之後轉換Inkcanvas選擇來實現這樣的圖2(點擊按鈕後?)