下記のようなItemsPanelTemplateのCanvasのMouseMoveイベントでのマウス位置座標を取得するにはどうしたら良いでしょうか?
よろしくお願いします。
<ScrollViewer x:Name="scrollViewer" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"> <ItemsControl x:Name="itemsControl" ItemsSource="{Binding Path=Lines}"> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <Canvas Background="White" Width="10000" Height="10000" /> </ItemsPanelTemplate> </ItemsControl.ItemsPanel> <ItemsControl.ItemTemplate> <DataTemplate> <Line X1="{Binding X1}" Y1="{Binding Y1}" X2="{Binding X2}" Y2="{Binding Y2}" Stroke="{Binding LineColor}" StrokeThickness="3" /> </DataTemplate> </ItemsControl.ItemTemplate> </ItemsControl> </ScrollViewer>
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/06/09 03:14
2017/06/09 03:59
2017/06/09 04:04
2017/06/09 04:34
2017/06/09 23:53