Hello,
Welcome to Microsoft Q&A!
How can I change the size of the InkCanvas and when zoom is enlarged to another size.
It seems like that you are trying to resize the InkCanvas as well as the inkstrokes inside it. You could take a look at ScaleTransform. You could use ScaleTransform to scale the InkCanvas to get what you want.
Code-behind:
private void SetCanvasSize()
{
InkCanvasScaleTransform.ScaleX = 0.5;
InkCanvasScaleTransform.ScaleY = 0.5;
}
Xaml:
<InkCanvas Grid.Row="1" x:Name="inkCanvas" Width="800" Height="800" >
<InkCanvas.RenderTransform>
<ScaleTransform x:Name="InkCanvasScaleTransform" />
</InkCanvas.RenderTransform>
</InkCanvas>
Thank you.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.