WPF Canvas ZoomIn ZoomOut via set Background="Transparent"
<Canvas Grid.Column="1" Background="Transparent" x:Name="cvs" ClipToBounds="True" MouseWheel="cvs_MouseWheel" MouseDown="cvs_MouseDown" MouseUp="cvs_MouseUp" MouseMove="cvs_MouseMove"> <Canvas.LayoutTransform> <TransformGroup> <ScaleTransform x:Name="scaler"/> <TranslateTransform x:Name="translater"/> </TransformGroup> </Canvas.LayoutTransform> </Canvas> private void cvs_MouseWheel(object sender, MouseWheelEventArgs e) { if(e.Delta>0) { scaler.ScaleX *= 1.2; scaler.ScaleY *= 1.2; } else { scaler.ScaleX /= 1.2; scaler.ScaleY /= 1.2; } scaler.CenterX = e.GetPosition(this).X; scaler.CenterY= e.GetPosition(this).Y; }