Skip to content
WPF visual cropping image library
Branch: master
Clone or download
dmitryshelamov Update Readme
Add screenshots
Latest commit 5d4437a Jan 8, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
UI-Cropping-Image-Library Add first version of library Jan 8, 2018
.gitignore Initial commit Jan 7, 2018
LICENSE Initial commit Jan 7, 2018 Update Readme Jan 8, 2018
cropped-demo.png Add demonstated images Jan 8, 2018
cropped-result-info.png Add demonstated images Jan 8, 2018
cropped-result.png Add demonstated images Jan 8, 2018


A simply UI cropping image library for WPF that use adroner layer. Some screenshots:

Interface of sample app

Cropping result image

Cropping result image info

Main Workflow:

  1. Load image
  2. Select cropping area
  3. Crop and save image

Main features:

  • Can draw/redraw cropping rectangle
  • Can move cropping rectangle
  • Can resize cropping rectangle
  • Shadow area outside of cropping rectangle
  • Show current size of cropping rectangle

Basic Setup


<Grid x:Name="RootGrid" MouseLeftButtonDown="RootGrid_OnMouseLeftButtonDown">
    <Canvas x:Name="CanvasPanel"
        <Border Height="{Binding ElementName=CanvasPanel, Path=ActualHeight}" Width="{Binding ElementName=CanvasPanel, Path=ActualWidth}" Background="LightBlue">
            <Image x:Name = "SourceImage"

Code Behind:

    public CroppingAdorner CroppingAdorner;

    private void RootGrid_OnMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        CroppingAdorner.MouseLeftButtonDownEventHandler(sender, e);

    private void Window_Loaded(object sender, RoutedEventArgs e)
        AdornerLayer adornerLayer = AdornerLayer.GetAdornerLayer(CanvasPanel);
        CroppingAdorner = new CroppingAdorner(CanvasPanel);
You can’t perform that action at this time.