This is a migrated thread and some comments may be shown as answers.

RadImageEditor handles the Mouse events

2 Answers 98 Views
ImageEditor
This is a migrated thread and some comments may be shown as answers.
Antony
Top achievements
Rank 1
Antony asked on 09 Feb 2017, 01:13 PM

Hi Team,

I have used the RadImageEditor to show the tif images in ListView. When clicking on RadImageEditor, the Selection is not processed in ListView, it is working fine when clicking over TextBlock. How to skip the mouse operations in RadImageEdiotr? Please refer the below code snippet.

 

<ControlTemplate TargetType="{x:Type ListViewItem}">
    <Border x:Name="PART_ImageView"
            BorderBrush="#D3D3D3"
            BorderThickness="1"
            Margin="10">
        <Grid Width="155"
              Height="195">
            <telerik:RadImageEditor Image="{Binding}"  
                                    AllowMouseWheelScaling="False"
                                    HorizontalContentAlignment="Stretch"
                                    VerticalAlignment="Stretch"
                                    Style="{DynamicResource RadImageEditorStyle1}"
                                    ScaleFactor="0"/>
            <Border x:Name="PART_PageNoBorder"
                    Width="24"
                    Height="24"
                    HorizontalAlignment="Right"
                    VerticalAlignment="Bottom"
                    Background="#D3D3D3"
                    BorderThickness="0">
                <TextBlock x:Name="PART_PageNo" FontSize="14"
                           FontFamily="Segoe UI"
                           Foreground="Gray"
                           Margin="4"
                           Text="01"/>
            </Border>
        </Grid>
    </Border>
    <ControlTemplate.Triggers>
        <Trigger Property="IsSelected" Value="True">
            <Setter TargetName="PART_ImageView"
                    Property="BorderBrush"
                    Value="#1ba1e2"/>
            <Setter TargetName="PART_PageNoBorder"
                    Property="Background"
                    Value="#1ba1e2"/>
            <Setter TargetName="PART_PageNo"
                    Property="Foreground"
                    Value="#FFFFFF"/>
        </Trigger>
    </ControlTemplate.Triggers>
</ControlTemplate>

 

Regards,

Antony Raj

2 Answers, 1 is accepted

Sort by
0
Antony
Top achievements
Rank 1
answered on 09 Feb 2017, 01:58 PM

Even the Mouse Wheel scrolling is also not working when the cursor on RadImageEditor. Could you please check on this?

 

Regards,

Antony Raj

0
Milena
Telerik team
answered on 13 Feb 2017, 03:20 PM
Hello Antony,

To achieve this you can set IsHitTestVisible property of the RadImageEditor to false. This way you will be able to select the ListViewItem when click on the image editor. 

I hope this information helps.

Regards,
Milena
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
ImageEditor
Asked by
Antony
Top achievements
Rank 1
Answers by
Antony
Top achievements
Rank 1
Milena
Telerik team
Share this question
or