Search code examples
.netwpfpixelsense

Why SurfaceInkCanvas do not draw?


I am trying to do a simple example to use the SurfaceInkCanvas but, it will not draw any thing when I try to use the touch over it, although EditingMode="Ink"

Here is the code:

<s:SurfaceWindow x:Class="SurfaceApplication1.SurfaceWindow1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:s="http://schemas.microsoft.com/surface/2008"
    Title="SurfaceApplication1"
    >
  <Grid>
        <s:SurfaceInkCanvas x:Name="PostcardCanvas"
                                EditingMode="Ink"
                                Background="Orange"
                                Height="320"
                                IsHitTestVisible="False"
                                UsesTouchShape="False"
                                Width="426" />          
  </Grid>
</s:SurfaceWindow>

So, what's I am missing here ?


Solution

  • Change

    IsHitTestVisible="False"
    

    to

    IsHitTestVisible="True"