I got this Zoomborder.cs and added it to my Project. Currently I have a big map that I can freely drag around.
In this map I have this Code block to generate Images/canvas on the Map:
<ItemsControl ItemsSource="{Binding RectItems}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<Canvas/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Rectangle Width="{Binding Width}" Height="{Binding Height}" Fill="Black">
<Rectangle.RenderTransform>
<TranslateTransform X="{Binding X}" Y="{Binding Y}"/>
</Rectangle.RenderTransform>
</Rectangle>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
but now I want to drag and drop this Images/canvas too. I tried it with a few ways but I cant get it to work because the Zoomborder.cs is also trying to drag the map.
Is there some way to get this rectangle to drag and drop within the Zoom element?
Full Code example:
<Zoom:Zoomborder x:Name="border" ClipToBounds="True" Background="Gray">
<Grid x:Name="firstChild">
<Image Width="4045" Width="2823" Source="..." ... />
//Here is the Code block from above.
</Grid>
</Zoom>