public override bool EquivalentTo(MenuItemViewModelBase other) { if (!base.EquivalentTo(other)) { return(false); } if (!(other is ToggleMenuItemViewModel toggleMenuItem)) { return(false); } return(BindingSource == toggleMenuItem.BindingSource && BindingPath == toggleMenuItem.BindingPath); }
public override bool EquivalentTo(MenuItemViewModelBase other) { if (!base.EquivalentTo(other)) { return(false); } if (!(other is RadioMenuItemViewModel radioMenuItem)) { return(false); } return(GroupName == radioMenuItem.GroupName && BindingSource == radioMenuItem.BindingSource && BindingPath == radioMenuItem.BindingPath); }
public override bool EquivalentTo(MenuItemViewModelBase other) { if (!base.EquivalentTo(other)) { return(false); } if (!(other is ExpandableMenuItemViewModel otherExpandable) || SubItems.Count != otherExpandable.SubItems.Count) { return(false); } return(!SubItems.Where((t, i) => !t.EquivalentTo(otherExpandable.SubItems[i])).Any()); }