Click or drag to resize

SelectionMouseToolAspectRatio Property

Gets or sets the width-to-height ratio for the selection.

Namespace:  Atalasoft.Imaging.Wpf
Assembly:  Atalasoft.dotImage.Wpf (in Atalasoft.dotImage.Wpf.dll) Version: 11.4.0.9.0.377 (.NET 4.5.2, x86)
Syntax
public double AspectRatio { get; set; }

Property Value

Type: Double
The width-to-height ratio for the selection.
Remarks
Setting AspectRatio to zero will disable the feature.
Examples
 <Window x:Class="WpfControlsDemo.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:atala="clr-namespace:Atalasoft.Imaging.Wpf;assembly=Atalasoft.dotImage.Wpf"
    Title="WPF Controls Demo" Height="565" Width="756"
    Background="White"
    >
  <Grid>
    <atala:AtalaImageViewer Name="Viewer">
      <atala:AtalaImageViewer.MouseTool>
        <atala:SelectionMouseTool AspectRatio="1.5"/>
      </atala:AtalaImageViewer.MouseTool>
    </atala:AtalaImageViewer>
  </Grid>
</Window>
 Me.Viewer.MouseTool = SelectionMouseTool tool = New SelectionMouseTool()
tool.AspectRatio = 1.5
Me.Viewer.MouseTool = tool
 SelectionMouseTool tool = new SelectionMouseTool();
tool.AspectRatio = 1.5;
this.Viewer.MouseTool = tool;
See Also