DropdownMenu icon indicating copy to clipboard operation
DropdownMenu copied to clipboard

HELP! How to add functionality to the Drop Down Menu

Open fahmidshibib opened this issue 5 years ago • 1 comments

Hi, I am a complete beginner in WPF and C# in general. I really like your idea and was wondering how I could add my own functionality to the Sub Items. For example I want to load a command on my DataGrid when I select a Sub Item from the Menu. How do I do that?

Thanks!

fahmidshibib avatar Oct 07 '20 20:10 fahmidshibib

Hi, I had similar issues, and maybe someone much smarter than me can tell me why it works in the demo solution I downloaded, but I can't get this to work in mine. This is what I've found:

In MainWindow.xaml.cs from the demo, the Using for the view model is "BeautySolutions.View.ViewModel", however, the folder structure that you set up in the demo and the youtube video where he explains this, is just in a folder called ViewModel. Shouldn't it be "BeautySolutions.ViewModel"? Or is there a reason to create another folder called "View", and put that in it?

If I change my namespace in my project to ".ViewModel", this seems to clear the errors, but my SubItems don't show up?

And why does the file in the BeautySolutions github download work, with only the ViewModel folder just like mine? Does that make sense?

CT-Hull avatar Dec 27 '20 23:12 CT-Hull