Skip to content

ComparerView

Javier Suárez edited this page Aug 16, 2020 · 5 revisions

ComparerView

Provides an option for displaying a split-screen of two views, which can help you to make comparisons.

Features

  • Supports for any source and target content.
  • Customizes the BackgroundColor, Color, etc.
  • Support different orientations.
  • ControlTemplate support.

Using the control

To use the control, we need to set the SourceView and TargetView properties.

<controls:ComparerView>
    <controls:ComparerView.SourceView>
        <Image
            Aspect="AspectFill"
            Source="before.jpg"/>
    </controls:ComparerView.SourceView>
    <controls:ComparerView.TargetView>
        <Image
            Aspect="AspectFill"
            Source="after.jpg"/>
    </controls:ComparerView.TargetView>
</controls:ComparerView>

Orientation

The comparison of the views can be vertical or horizontal using the Orientation property.

<controls:ComparerView Orientation="Vertical" />

Customization

We can set the background color of the control, but also the color used in the Thumb using the Color property.

Clone this wiki locally