Populating Items via ItemSource - multi-level

Is it possible to load multiple levels of menu into the radial menu via a ViewModel?

Although I can see how to load items manually: 

radialMenu.Items[n].Items.Add(colorSubMenuItem);

If I construct a ViewModel to take advantage of the ItemSource feature and MVVM, I cannot see how to create a structure to support nested menu


23 Replies

JK Jeya Kasipandi Syncfusion Team June 25, 2021 01:01 PM UTC

Hi Peter Mortley,

We have validated your query and currently we don't have support to add nested menu subitems via item source property in SfRadialMenu.

We suggest you can use SfRadialMenuItem collection from the view model to load nested items via the items property. We have created a sample to load items from view model's radialmenuitem collection. Please find the sample from below link

https://www.syncfusion.com/downloads/support/directtrac/166658/ze/GettingStarted-940620706

Please let us know if you have any other queries.

Regards,
Jeya K



PM Peter Mortley June 28, 2021 02:06 PM UTC

Hi Jeya, thank-you for your response.

I don't seem to be able to download the sample? It says 'Access Denied'? I am logged in, as I would not be able to post this reply?



PM Peter Mortley replied to Jeya Kasipandi June 29, 2021 10:10 AM UTC

Can you please provide the sample again or update the link so that I can download it.



JK Jeya Kasipandi Syncfusion Team June 29, 2021 10:23 AM UTC

Hi Peter,

Sorry for the inconvenience caused.

We have modified the sample link and you can now access the sample. Please find the modified sample from below link


Please check with the above and let us know if you have any concern.

Regards,
Jeya K



PM Peter Mortley replied to Jeya Kasipandi June 29, 2021 10:26 AM UTC

Thank-you Jeya, I will have a look at the sample



PM Peter Mortley June 29, 2021 01:18 PM UTC

Hi Jeya, the sample has been very useful.

In my use-case, the menu could be n-levels deep. I have modified the sample to load a SfRadialMenuItem that displays a View (SfAvatar in this case), but only one level deep (there would be an indeterminate number of levels). I have attached an ItemTapped event to the SfRadialMenuItem, in order to load a second level for the item placed in the 'East' position (Alexander). This clears the EmployeeCollection, and loads with a new set of Employees. Although I can see that the EmployeeCollection as been refreshed, the display remains unaltered - the 'Items' binding is not working.


I would have expected the SfRadialMenu to refresh if Items is bound to the EmployeeCollection, which is Observable?


Attachment: Manually_Bound_to_VM_6bb246df.zip


JK Jeya Kasipandi Syncfusion Team June 30, 2021 12:04 PM UTC

Hi Peter Mortley,

We have validated your query and we suggest you set Items to the RadialMenuItem as like below code snippet to display the next level items. Please find the code snippet for this

Code snippet:

  private void RMI_ItemTapped(object sender, Syncfusion.SfRadialMenu.XForms.ItemTappedEventArgs e)
        {
            SfRadialMenuItem RMI = (SfRadialMenuItem)sender;
            if (RMI.Text == "Alex")
            {
              RMI.Items = DisplayAlexLevel2Items();
            }

        }

private ObservableCollection<SfRadialMenuItem> DisplayAlexLevel2Items()
        {
            EmployeeCollection.Clear();

            AddRadialMenuItem("Ellie", "Ellie.png");
            AddRadialMenuItem("Finley", "Finley.png");
            AddRadialMenuItem("Gabriella", "Gabriella.png");
            AddRadialMenuItem("Jackson", "Jackson.png");
            AddRadialMenuItem("Jayden", "Jayden.png");
            return EmployeeCollection;
        }


Please find the modified sample from below link:

Sample link:
https://www.syncfusion.com/downloads/support/forum/166658/ze/GettingStarted672820239

Please check with the above and let us know if you have any concern.

Regards,
Jeya K


PM Peter Mortley June 30, 2021 01:27 PM UTC

Hi Jeya, thank-you for the update. I have looked at the updated sample. I have further modified it to explore my use-case of n-levels by adding the following:

private ObservableCollection<SfRadialMenuItem> DisplayAlexLevel3Items()

        {

             EmployeeCollection.Clear();

            AddRadialMenuItem("Kaylee", "Kaylee.png");

            AddRadialMenuItem("Leila", "Leila.png");

            AddRadialMenuItem("Lucy", "Lucy.png");

            AddRadialMenuItem("Mckenna", "Mckenna.png");

            AddRadialMenuItem("Michael", "Michael.png");

            return EmployeeCollection;

        }


private void RMI_ItemTapped(object sender, Syncfusion.SfRadialMenu.XForms.ItemTappedEventArgs e)

        {

            SfRadialMenuItem RMI = (SfRadialMenuItem)sender;

            if (RMI.Text == "Alex")

            {

                RMI.Items = DisplayAlexLevel2Items();

            }

            else if (RMI.Text == "Ellie")

                RMI.Items = DisplayAlexLevel3Items();

        }


Unfortunately clicking on the 'level 2' menu item does not refresh to display 'level 3' items?






JK Jeya Kasipandi Syncfusion Team July 1, 2021 11:06 AM UTC

 Hi Peter Mortley,

Sorry for the inconvenience caused.

We have validated your query and we are able to reproduce the reported issue in iOS platform. We have logged a defect report for this. You can track the status of the bug from the below link.

Feedback: https://www.syncfusion.com/feedback/26637/ios-next-level-sub-radial-menu-items-not-shown-when-clicking-radial-menu-item  

Note: The provided feedback link is private, and you need to login to view this feedback.

We will provide the patch for this issue on July 14, 2021. We appreciate your patience until then.

Regards,
Jeya K 



PM Peter Mortley July 1, 2021 12:39 PM UTC

Thank-you Jeya.



JK Jeya Kasipandi Syncfusion Team July 2, 2021 07:25 AM UTC

Hi Peter Mortley,

Most welcome. As we promised, will update the patch for the reported issue on July 14, 2021.We appreciate your patience until then.

Regards,
Jeya K


PM Peter Mortley July 14, 2021 12:42 PM UTC

Hi Jeya,


Is the patch available to test please?



JK Jeya Kasipandi Syncfusion Team July 14, 2021 03:26 PM UTC

Hi Peter,

We have fixed the reported issue in iOS and please find the custom assemblies from below link.

Custom assemblies : https://www.syncfusion.com/downloads/support/directtrac/general/ze/SubRadialMenu_Assembly1140522767

Assembly Version: 19.1.0.69

Since 19.1.0.69 is a weekly NuGet release, we are not able to generate patch in 19.1.0.69 version. We can generate patch only for Main release and SP1 release versions, so we have provided the custom assembly in 19.1.0.69.

Disclaimer:

Please note that we have created this patch for version 19.1.0.69 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

Please refer the below link for how to apply custom assemblies.

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

The fix for the reported issue will be included in our upcoming weekly NuGet release which is expected to be rolled out on July 27, 2021. We appreciate your patience until then.

Regards,
Jeya K




PM Peter Mortley July 15, 2021 10:47 AM UTC

Hi Jeya,

Thank-you for the custom assemblies, I have applied them to my test program. I can see that the images are now refreshed when the underlying collection is changed.

Is there a way of preventing the refresh when the bound collection is not modified? For instance at the top level, if you select 'Aiden' rather than 'Alex', there is no change to the underlying collection, but the menu collapses and refreshes anyway? This will be distracting to a user if an action is to be applied when there is no collection change?



JK Jeya Kasipandi Syncfusion Team July 16, 2021 02:52 PM UTC

Hi Peter,

Currently, we are validating on this and will update the details on July 20,2021.We appreciate your patience until then.

Regards,
Jeya K


JK Jeya Kasipandi Syncfusion Team July 20, 2021 01:21 PM UTC

Hi Peter,

Due to complexity, still we are validating on this and will update the details on July 23, 2021. We appreciate your patience until then.

Regards,
Jeya K


RS Ruba Shanmugam Syncfusion Team July 23, 2021 03:34 PM UTC

Hi Peter Mortley,


Thanks for your patience. We have fixed the reported issue and find the assembly from the link below.


Assembly Version: 19.1.0.69

Disclaimer: Please note that we have created this patch for the version v19.1.0.69 specifically to resolve the issue reported in this incident.


Assembly: https://www.syncfusion.com/downloads/support/directtrac/general/ze/SubMenuItem_Assembly1858797492


Note: Please refer 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

Note: We have created this patch only for resolving this issue, based on your confirmation we will proceed further on our next release.


When using the same collection for SfRadialMenu Items and SfRadialMenuItem Items, the whole radial menu items are cleared when setting the SfRadialMenuItem items collection. So we have modified the sample. Check the sample from the below link:


Sample:  https://www.syncfusion.com/downloads/support/directtrac/general/ze/RadialMenu_UpdatedSample1494213893


Regards,

Ruba Shanmugam



PM Peter Mortley July 26, 2021 02:29 PM UTC

Hi Ruba,

Thank-you for the update, I am in the process of evaluation.

Best Regards,

Peter.



PM Peter Mortley July 26, 2021 04:54 PM UTC

Hi Ruba,


I have evaluated the solution, and can confirm that I am satisfied that it will now allow my intended use case.


Please continue to release the patch, and thank-you for your effort in resolving this issue,


With Best Regards,


Peter.




JK Jeya Kasipandi Syncfusion Team July 27, 2021 10:37 AM UTC

Hi Peter,

Thanks for the update.

The fix for the reported issue will be included in our upcoming weekly NuGet release which is expected to be rolled out on August 03, 2021. We appreciate your patience until then.

Regards,
Jeya K



JK Jeya Kasipandi Syncfusion Team August 3, 2021 02:29 PM UTC

Hi Peter,

Sorry for the inconvenience.

The fix for the reported issue is not included in this weekly release due to having some pending test cases to ensure that fix, so we were unable to move the fix. We will move the fix in our next weekly NuGet which is expected to be rolled out on August 10, 2021.

We appreciate your patience until then.

Regards,
Jeya K


RS Ruba Shanmugam Syncfusion Team August 10, 2021 09:30 AM UTC

Hi Peter Mortley, 
 
We would like to let you know that, there is no weekly NuGet release today due to the having Volume 2 Sp1 release, 2021. This fix will be included in the next weekly NuGet release, which is scheduled for August 17, 2021. Until then, we appreciate your patience. 
 
Regards, 
Ruba Shanmugam 



RS Ruba Shanmugam Syncfusion Team August 17, 2021 11:33 AM UTC

Hi Peter Mortley, 
  
 
Thanks for your patience. We have included the fix for the reported issue in our latest Weekly NuGet release v19.2.0.56 which is available for download (https://www.nuget.org/ ). We thank you for your support and appreciate your patience in waiting for this update. 
 
Regards, 
Ruba Shanmugam 


Loader.
Up arrow icon