Hello I read this Displaying a background image on a UWP ink canvas for my development
So I can draw on the image and save it.
And I want to move the image too.
I have 2 problems About image control
Firstly , When I move the Popup UI's image then, I can't draw on the image.
And Secondly, when i use only Grid control, then i can't move the image
---Here is my xaml code (only Grid)---
<Grid x:Name="img_grid3" Width="600" Height="500" HorizontalAlignment="Center" VerticalAlignment="Bottom" ManipulationDelta="img_grid3_ManipulationDelta">
<Image VerticalAlignment="Top" HorizontalAlignment="Left" x:Name="img3" Stretch="Fill" Height="400" Width="600" >
</Image>
<InkCanvas x:Name="img_inkcanvas3"/>
<InkToolbar x:Name="img_inktoolbar3" Canvas.ZIndex="8" TargetInkCanvas="{x:Bind img_inkcanvas3}" VerticalAlignment="Top"></InkToolbar>
<Button x:Name="IMG_C3" Canvas.ZIndex="8" Content="Close" Background="White" VerticalAlignment="Top" HorizontalAlignment="Left" Click="IMG_C3_Click"/>
<Button x:Name="Img_draw3" Canvas.ZIndex="8" VerticalAlignment="Top" HorizontalAlignment="Right" Content="Draw" Click="Img_draw3_Click"/>
</Grid>
private TranslateTransform dragTranslation_I;
public MainPage()
{
this.InitializeComponent();
dragTranslation_I = new TranslateTransform();
}
private void img_grid3_ManipulationDelta(object sender, ManipulationDeltaRoutedEventArgs e)
{
dragTranslation_I.X += e.Delta.Translation.X;
dragTranslation_I.Y += e.Delta.Translation.Y;
}
ㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡ
And this is my popup code
<Popup x:Name="IMG_G" Width="600" Height="300" ManipulationMode="All" HorizontalAlignment="Left" >
<Grid x:Name="img_grid" Width="600" Height="500">
<Image Canvas.ZIndex="6" VerticalAlignment="Top" HorizontalAlignment="Left" x:Name="img" Stretch="Fill" Height="400" Width="600" />
<InkCanvas x:Name="img_inkcanvas"/>
<InkToolbar x:Name="img_inktoolbar" Canvas.ZIndex="8" TargetInkCanvas="{x:Bind img_inkcanvas}" VerticalAlignment="Top"></InkToolbar>
<Button x:Name="IMG_C" Canvas.ZIndex="8" Content="Close" Background="White" VerticalAlignment="Top" HorizontalAlignment="Left" Click="IMG_C_Click" />
<Button x:Name="Img_draw" Canvas.ZIndex="8" VerticalAlignment="Top" HorizontalAlignment="Right" Click="Img_draw_Click" Content="Draw"/>
</Grid>
</Popup>
Can't I draw on the image using Popup UI?
OR Can't I move my Grid's image?
Is this impossible?? I'm really wondering
Please tell me anything you know!!
Thanks