У меня есть следующий макет:
<Grid Width="1024" Height="768" Background="{StaticResource WindowBackground}" >
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="auto"></RowDefinition>
</Grid.RowDefinitions>
<s:ScatterView Name="hitter">
<s:ScatterViewItem Orientation="0" Width="100" Height="100"></s:ScatterViewItem>
<s:ScatterViewItem Orientation="0" Width="100" Height="100"></s:ScatterViewItem>
<s:ScatterViewItem Orientation="0" Width="100" Height="100"></s:ScatterViewItem>
<s:ScatterViewItem Orientation="0" Width="100" Height="100"></s:ScatterViewItem>
<s:ScatterViewItem Orientation="0" Width="100" Height="100"></s:ScatterViewItem>
<s:ScatterViewItem Orientation="0" Width="100" Height="100"></s:ScatterViewItem>
</s:ScatterView>
<s:SurfaceInkCanvas Grid.Row="0" Name="Gesture" s:Contacts.PreviewContactDown="Gesture_PreviewContactDown" s:Contacts.PreviewContactChanged="Gesture_PreviewContactChanged" s:Contacts.PreviewContactUp="Gesture_PreviewContactUp"></s:SurfaceInkCanvas>
<StackPanel Margin="20" Grid.Row="1" Orientation="Horizontal">
<s:SurfaceTextBox Text="TemplateName" Background="Transparent" BorderThickness="3" BorderBrush="White" Width="200" Name="TemplateName"></s:SurfaceTextBox>
<s:SurfaceButton Name="Add" Foreground="White" Background="Transparent" Content="Add new template" PreviewContactDown="Add_PreviewContactDown"></s:SurfaceButton>
<TextBox Foreground="White" Background="Transparent" Margin="220,0,0,0" Name="ResultDisplay" Width="500"></TextBox>
</StackPanel>
</Grid>
Теперь проблема в том, что если я хочу переместить ScatterViewItems
, события потребляются SurfaceInkCanvas
, и рисуется штрих.
Вот почему я попытался установить для свойства IsHitTestVisible
из SurfaceInkCanvas
значение false
.
Затем я могу переместить ScatterviewItems
, но больше не могу рисовать штрихи и SurfaceInkCanvas
.
Как я могу разрешить оба?