I'm also experiencing this problem.
It works as expected if I change out the <syncfusion:MenuItemAdv> for a standard <MenuItem>.
DataConext is the ViewModel.
This does not work and behaves as described by OP:
<syncfusion:MenuItemAdv Header="_File">
<syncfusion:MenuItemAdv Header="_Open..." MinWidth="150" Command="{Binding CommandOpenCal}"/>
<syncfusion:MenuItemAdv Header="_Save" Icon="" IsEnabled="{Binding CalFileIsOpen, FallbackValue=False}" Command="{Binding CommandSaveCal}"/>
<syncfusion:MenuItemAdv Header="Save _As..." IsEnabled="{Binding CalFileIsOpen, FallbackValue=False}" Command="{Binding CommandSaveCalAs}"/>
<syncfusion:MenuItemSeparator/>
<syncfusion:MenuItemAdv Header="_Close" IsEnabled="{Binding CalFileIsOpen, FallbackValue=False, NotifyOnSourceUpdated=True}" Command="{Binding CommandCloseCal}"/>
<syncfusion:MenuItemSeparator/>
<syncfusion:MenuItemAdv Header="_Options..." Command="{Binding CommandOptions}"/>
<syncfusion:MenuItemSeparator/>
<syncfusion:MenuItemAdv Header="E_xit" Command="{Binding CommandExitApp}"/>
</syncfusion:MenuItemAdv>
This Works no problem:
<MenuItem Header="_File">
<MenuItem Header="_Open..." MinWidth="150" Command="{Binding CommandOpenCal}"/>
<MenuItem Header="_Save" Icon="" IsEnabled="{Binding CalFileIsOpen, FallbackValue=False}" Command="{Binding CommandSaveCal}"/>
<MenuItem Header="Save _As..." IsEnabled="{Binding CalFileIsOpen, FallbackValue=False}" Command="{Binding CommandSaveCalAs}"/>
<Separator/>
<MenuItem Header="_Close" IsEnabled="{Binding CalFileIsOpen, FallbackValue=False, NotifyOnSourceUpdated=True}" Command="{Binding CommandCloseCal}"/>
<Separator/>
<MenuItem Header="_Options..." Command="{Binding CommandOptions}"/>
<Separator/>
<MenuItem Header="E_xit" Command="{Binding CommandExitApp}"/>
</MenuItem>
Fantastic. Thankyou!
|
Recommended approach – exe will perform automatic configuration
Please find the patch setup here:
Advanced approach – use only if you have specific needs and can directly replace existing assemblies for your build environment
Please find the patch assemblies alone from:
Please find the Nugets from the below location:
|
Hi,
Thanks for the update.
The patch has solved the item's enabling themselves on hover, however they are not changing back to disabled when the bound bool changes back to disabled.
The IsEnabled binding only seems to work once.
Once again, changing out the MenuItemAdv for a MS Menu solves the problem.
|
Recommended approach – exe will perform automatic configuration
Please find the patch setup here:
Advanced approach – use only if you have specific needs and can directly replace existing assemblies for your build environment
Please find the patch assemblies alone from:
Please find the Nugets from the below location:
|
That fixed the issue. Menu seems to work as intended now. Thankyou.
Hi,
I've just updated to 20.1.0.47 and this issue is back. I assume this didn't get included in the latest release?
Hi Declan,
Sorry for the inconvenience caused
We can reproduce the problem at our end. We have considered this as a bug and logged a defect report on our end. We’ll provide the patch file for the reported issue on April 19, 2022. We appreciate your patience until then.
Please follow the below feedback link for further details.
Feedback link -https://www.syncfusion.com/feedback/34142/disabled-menu-items-are-enabled-when-hover-the-item-in-menuadv
Regards,
Sulthan Amanu
This issue keeps persisting. Setting a bound property in the ViewModel to false, will not trigger the menu to be disabled.
The code is taken exactly from your tutorials, with the only addition the extra HasPermissions property.
<syncfusion:MenuAdv.ItemContainerStyle>
<Style BasedOn="{StaticResource {x:Type syncfusion:MenuItemAdv}}" TargetType="{x:Type syncfusion:MenuItemAdv}">
<Setter Property="Icon" Value="{Binding ImagePath}" />
<Setter Property="InputGestureText" Value="{Binding GestureText}" />
<Setter Property="Command" Value="{Binding MenuItemClicked}" />
<Setter Property="CommandParameter" Value="{Binding MenuItemName}" />
<Setter Property="IsCheckable" Value="{Binding IsCheckable}" />
<Setter Property="CheckIconType" Value="{Binding CheckIconType}" />
<Setter Property="IsEnabled" Value="{Binding HasPermissions}" />
<Setter Property="Margin" Value="0,0,10,0" />
<Setter Property="FontSize" Value="17" />
</Style>
</syncfusion:MenuAdv.ItemContainerStyle>
I use the nuget Version for => Syncfusion.Shared.WPF 19.4.0.56
I think this repetitive issue is getting out of hand, with the repetitive bugs, dont you think :)?
If the above IsEnabled property is set manually to false, the all the menu items are correctly (although hardcoded) disabled
Hi Fanourios,
We deeply regret the inconvenience caused.
We have considered the reported case too and it will be included in the patch.
Regards,
Sulthan Amanu
Hi Fanourios,
Sorry for the inconvenience caused
While resolving the reported issue, we are encountering some difficulties. As a result, we are unable to deliver the patch file as promised. We will require additional time to resolve the reported issue. We will include the fix in our upcoming weekly NuGet release, which is expected on April 26, 2022.
Regards,
Sulthan amanu
I understand. I am looking forward for the correction
With regards
Fanourios Siskakis
Hi Fanourios
Sorry for the inconvenience caused.
We are facing some other issues while trying to fix the reported issue. Since we were unable to include the fix in the weekly nuget as promised. We need some more time to fix this issue and we will share the patch on April 29th, 2022.
Regards,
Sulthan amanu
Hi Fanourious,
Thanks for your patience.
We have fixed the reported issues . Please find the patch file from the following location:
V20.1.0.47
|
Recommended approach – exe will perform automatic configuration Please find the patch setup here: Advanced approach – use only if you have specific needs and can directly replace existing assemblies for your build environment Please find the NuGet alone from: Please find the patch assemblies alone from: |
NOTE:
You can change how you receive bug fixes by navigating to the following link and updating your preferences.
https://www.syncfusion.com/support/directtrac/patches
Disclaimer:
Please note that we have created this patch for version 20.1.0.47 specifically to resolve the issues reported in this forum #136480. If you have received other patches for the same version for other products, please apply all patches in the order received. This fix will be included in our May 3, 2022, weekly NuGet release.
Regards,
Sulthan Amanu
Thanks a lot for your info.
I will take a look at the update now and check that everything works as expected.
With regards
Fanourios Siskakis
-EDIT #1: are you sure the patch is updated through the newer versions? I have the 20.1.0.51 and it still doesnt seem to work...
-EDIT #2: Same thing with the newest version from today, 20.1.0.52, this issue still exists
Could you please check this?
20.1.0.52: The menu no longer reacts to any kind of enable binding now. It's even more useless.
could you please check this bug and finally correct this?
this is not a nice thing to see...
a week has passed and no answer from the devs yet???
Really :)??
I gave up and went back to a standard Microsoft menu. Works a treat.
Hi Fanourious/Declan,
Sorry for the delay.
We have fixed the reported issues and the fix will be included in our upcoming volume-1 2022 SP release which is expected to roll out on or before 13th May, 2022. Please find the patch file for the fix in volume-1 2022 release version 20.1.0.47 from the following location:
V20.1.0.47
|
Recommended approach – exe will perform automatic configuration Please find the patch setup here: Advanced approach – use only if you have specific needs and can directly replace existing assemblies for your build environment Please find the NuGet alone from: Please find the patch assemblies alone from: |
NOTE:
You can change how you receive bug fixes by navigating to the following link and updating your preferences.
https://www.syncfusion.com/support/directtrac/patches
Disclaimer:
Please note that we have created this patch for version 20.1.0.47 specifically to resolve the issues reported in this forum #136480. If you have received other patches for the same version for other products, please apply all patches in the order received.
Regards,
Prabakaran S
So, just to be clear, after 13. May, this fix is supposed to be in the latest nuget versions, right?
Because as we reported above, the latest nuget versions are not getting updated with the fixes you mentioned.
Could you please report on this thread, whenever the latest nuget Version is updated with this fix, in order for us to test it?
That would be helpful.
Thanks a lot
With regards
Fanourios Siskakis
Hi Fanourious,
As mentioned in previous update, we will include the fix in upcoming volume-1 2022 SP release which is expected to roll out on or before May 13th, 2022 with the latest nuget. We appreciate your patience until then. We will let you know once it gets rolled out.
Regards,
Prabakaran S
So, i saw that a new nuget Version is added, 20.1.0.55.
Are we to assume that you fixed the above problem in this version?
It would not be nice to update, test the whole thing again and see that it doesnt work again...
Hello again, The IsEnabled binding doesnt work once again... (version
20.1.0.55
)
this is getting in my nerves you know?? You are confirming that your changes are tested, are in the latest nuget packages, but they dont seem to work...
What kind of quality assurnanse do you have over there?? For real now... It is not enough that such easy things are still buggy in your software, you fail to correct them after aaaaall this time...
I should not mention all the emails "proposing" us to get the paid version instead of the free one...
What are you going to do about that???
Hi Fanourios,
We sincerely apologize for the inconvenience.
We are unable to reproduce the reported issue at our end with the most recent version (20.1.0.55). We have attached the tested sample and video for your reference. Could you please check again with the latest version of the NuGet by clearing the cache as per the instructions below?
https://www.syncfusion.com/kb/6987/how-to-clear-nuget-cache
Regards
Sulthan Amanu
Well, after a lot of debugging, how on earth it works on your project with the same code as mine, figured it out.
First of all, i apologize, you fixed indeed the original Problem. I am sorry about my comments...
Secondly, the problem in my solution is that i also have set a command on that enabled/disabled Menu. And somehow the command overrides the IsEnabled property, since i guess it is executed in a later time.
Wouldn't it be more correct to first check the IsEnabled (since this is specifically set in the root of the Element and has bigger priority) and then if IsEnabled check the CanExecute of the command.
I think that would be the correct logic behind it.
With regards
Fanourios Siskakis
Hi Fanourios,
Please let us know if you have any other concerns on this. We will be glad to assist you.
Regards,
Sulthan Amanu
If i understand you correctly, you will not change the logic behind the simultaneous Command + IsEnabled attributes, right?
Fanouris
Hi Fanouris,
We will validate the query and update the complete details in two business days(20th May 2022).
Regards,
Sulthan Amanu
Hi Fanouris,
Sorry for the miscommunication in the precious updates.
The investigation with framework control confirms that it does not execute the command when IsEnabled is false. However, when IsEnabled is true, command is executing and the UI is enabled/disabled based on the return value of CanExecute method.
Could you please confirm that you are expecting the same behaviour for the Syncfusion control? Based on your confirmation, we will check and update the possibilities of your requirement.
Regards,
Sulthan Amanu