Drag event not working when slow drag

Hi,

While using the SfRadialMenu for Xamarin Forms, the drag event is not called when the menu is dragged slowly, instead it call the opened event. This is unexpected as open event need to call only when the menu tapped, but during the drag, sfradialmenu is to recognize the drag or position change.

Also there is no property to get the Point (NewValue) in OpenedEventArgs, similar to available in DragEndEventArgs because radial_Menu.Point in opened event gives 0,0 coordinates 


Can someone please look into this issue and advice the fix? 

Please have a look at attached gif / video and code for reference

Thanks.



XAML


    <ContentPage.Content>

        <StackLayout VerticalOptions="FillAndExpand">

            <Grid>

                <Label x:Name="lblMessage" Text="Message" FontSize="30" HorizontalOptions="Center" VerticalOptions="Center"></Label>

                <radialMenu:SfRadialMenu x:Name="radial_Menu" EnableCenterButtonAnimation="False" CenterButtonRadius="13" IsDragEnabled="True" DragEnd="radial_Menu_DragEnd" Opened="radial_Menu_Opened" CenterButtonBackgroundColor="Transparent">

                    <radialMenu:SfRadialMenu.CenterButtonView>

                        <Image x:Name="img_radial_menu" Source="bookmarks_color" HeightRequest="100" WidthRequest="100"/>

                    </radialMenu:SfRadialMenu.CenterButtonView>

                </radialMenu:SfRadialMenu>

            </Grid>

        </StackLayout>

    </ContentPage.Content>



cs


        public NewItemPage()

        {

            InitializeComponent();

        }


        private void radial_Menu_Opened(object sender, Syncfusion.SfRadialMenu.XForms.OpenedEventArgs e)

        {

            lblMessage.Text = "Opened " + radial_Menu.Point.ToString();

        }


        private void radial_Menu_DragEnd(object sender, Syncfusion.SfRadialMenu.XForms.DragEndEventArgs e)

        {

            lblMessage.Text = "Dragged " + e.NewValue.ToString();

        }





Attachment: syncfusion_sfradialmenu_drag_issue_b098ca9e.zip


7 Replies 1 reply marked as answer

HC Hariharan Chokkalingam Syncfusion Team September 4, 2024 02:11 PM UTC

Hi Raaz,

 

Currently, we are investigating the reported query at our end and will share the details on or before September 9, 2024. We appreciate your understanding and patience until that time.

 

Regards,

Hariharan C.



HC Hariharan Chokkalingam Syncfusion Team September 9, 2024 02:56 PM UTC

Hi Raaz,

 

Thank you for your patience. We have reproduced the reported issue and resolved the problem with the "Drag event not working during slow drags." Please find the fixed assembly file attached. Based on your confirmation, this fix will be included in our weekly release following the main release. We will notify you once the NuGet package is available.

 

Additionally, please note that there is no Point value in the OpenedEvent. Instead, you should use the DragEnd event to obtain the Point. Also, the radial menu's point coordinates are reset to (0,0) when the menu opens, so the point needs to be recalculated accordingly.

 

If you require any further information or assistance, please do not hesitate to let us know.

 

Assembly version: 26.2.13

 

Note: Please refer to the below link to apply the custom assembly

https://www.syncfusion.com/kb/8279/how-to-apply-the-custom-assemblies-when-configured-the-project-with-syncfusion-nuget

 

Disclaimer:

Please note that we have created this patch for version 26.2.13 specifically, to resolve the issue reported in this incident. If you have received other patches for the same version for other products, please apply all patches in the order received.

 

Root Cause and Resolution:

 

Root Cause: The issue occurred because the opened event was triggered when dragging slowly.

Resolution: The issue has been resolved by preventing the opened event from being triggered during dragging.


Regards,

Hariharan.


Attachment: Assembely_dd899a4f.zip

Marked as answer

RA Raaz September 10, 2024 04:14 PM UTC

Hi Hariharan Chokkalingam,

That's great and really appreciated your and team support in fixing the issue. 

I checked, and the provided assembly fixes the issue. Please let me know once this fix is release in NuGet package.

Another thing if you may have noticed within same above code, the width and height of img_radia_menu under CenterButtonView is not being considered. As above its 100 x 100 but rendered as much smaller in size. 

<Image x:Name="img_radial_menu" Source="bookmarks_color" HeightRequest="100" WidthRequest="100"/>

If you can advise is anything missing or suggest how to resize the image used as center button view?

Regards,




HC Hariharan Chokkalingam Syncfusion Team September 11, 2024 01:19 PM UTC

Hi Raaz,


Thank you for your update. We are glad to hear that the provided fix works for you. As mentioned earlier, we will notify you once the NuGet package is released. We appreciate your patience until then.


Regarding your query about the width and height of the image not being applied to the center button, we reviewed the sample you provided. In the snippet, you are using CenterButtonRadius set to 13. The button size is determined by this radius. To ensure that the image’s width and height of 100 are properly applied, you should also set CenterButtonRadius to 100 to match the image size.


Here is the updated code snippet:

  <radialMenu:SfRadialMenu x:Name="radial_Menu" EnableCenterButtonAnimation="False" CenterButtonRadius="100" IsDragEnabled="True" DragEnd="radial_Menu_DragEnd" Opened="radial_Menu_Opened" CenterButtonBackgroundColor="Transparent">

 

                    <radialMenu:SfRadialMenu.CenterButtonView>

 

                        <Image x:Name="img_radial_menu" Source="bookmarks_color" HeightRequest="100" WidthRequest="100"/>

 

                    </radialMenu:SfRadialMenu.CenterButtonView>

 

                </radialMenu:SfRadialMenu>


Please let us know whether the provided suggestion helps to resolve your query. Please don’t hesitate to contact us if you have any concerns or queries.


Regards,

Hariharan.



RA Raaz September 12, 2024 03:55 PM UTC

Hi Hariharan Chokkalingam,

Thank you for your advice and pointing to CenterButtonRadius. 

Adjusting the CenterButtonRadius works and resulted in adjusted the image size.

Appreciated your support.

Regards



PR Preethi Rajakandham Syncfusion Team September 13, 2024 04:50 AM UTC

Hi Raaz,

We are glad that the provided response satisfies your needs. As promised, the fix for the "Drag event not working during slow drags" issue will be included in our weekly release subsequent to the main release.

Regards,

Preethi R



HC Hariharan Chokkalingam Syncfusion Team September 24, 2024 03:18 AM UTC

 Hi Raaz,

 

We have included the fix for the reported issue "Drag event not working during slow drags" in our latest weekly NuGet release v27.1.50 which is available for download (NuGet). We thank you for your support and appreciate your patience in waiting for this update. Please get in touch with us if you require any further assistance.

 

Regards,

Hariharan.


Loader.
Up arrow icon