Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Passing specific data to multiple instance of User Control in WPF (C#)

$
0
0

I am developing the desktop application using WPF with MVVM architecture, In which, I created one User Control (View) contains the Menu control and its Menu Items would be added dynamically from its View Model.

Above things are working perfectly. But the thing is, I want to re-use the above user control in order to create multiple Menu's in different locations in the view with different menu Items data.

My View Model need to know Menu name (or some param value) in order to fetch its corresponding Menu Items and add it to Menu dynamically.

Please help me out how to pass the data/menu name to the View Model?

Regards,

Srihari.


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>