RadImageEditor handles the Mouse events

3 posts, 0 answers
  1. Antony
    Antony avatar
    11 posts
    Member since:
    May 2014

    Posted 09 Feb Link to this post

    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. Antony
    Antony avatar
    11 posts
    Member since:
    May 2014

    Posted 09 Feb in reply to Antony Link to this post

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

     

    Regards,

    Antony Raj

  3. Milena
    Admin
    Milena avatar
    218 posts

    Posted 13 Feb Link to this post

    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.
Back to Top