I am work with wpf on visual studio 2019.
menu strip is not intended, menustrip is not available in toolbox.
not included as code
how is your design?? (I'm new to wpf)
I am work with wpf on visual studio 2019.
menu strip is not intended, menustrip is not available in toolbox.
not included as code
how is your design?? (I'm new to wpf)
@Zaug-0766
Welcome to Microsoft Q&A platform, this is an English platform. Please translate your question to English.
System.Windows.Forms.MenuStrip is a WinForm control. In WPF, we use System.Windows.Controls.Menu control. If you still want to use MenuStrip in WPF, you can implement it as below steps:1. Add two dll WindowsFormsIntegration.dll,System.Windows.Forms.dll for the WPF project.2. Add below code to your XAML:
xmlns:wf="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
xmlns:wfi ="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration"
3. Then you can use it like:
<wfi:WindowsFormsHost Width="200" Height="50">
<wf:MenuStrip x:Name="wfLabel" Text="winForm MenuStrip" Width="120" Height="50"/>
</wfi:WindowsFormsHost>
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
4 people are following this question.