Click here to Skip to main content
15,867,292 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I work on a demo for an article where a winform hosts a wpf usercontrol with a ribbon.

There are wpf controls and ribbon controls in the toolbox and all was good until I wanted to add filedialog and printdialog.

How can I add them?

(I use VS 2019 Community)

What I have tried:

I opened the toolbox and on rightclick I can select wpf controls, but there is nothing like filedialog, open filedialog, save filedialog or print dialog.

What else can I do?
Posted
Updated 26-Dec-21 3:03am
v2
Comments
[no name] 26-Dec-21 8:35am    
It shows that using a ribbon that requires "common dialog controls" is a poor example for your article about hosting a WPF "user control".

1 solution

There are no "controls" for those dialogs.

You have to use the OpenFileDialog class in the Microsoft.Win32 namespace.

The PrintDialog is in the System.Windows.Controls namespace
 
Share this answer
 
Comments
Jo_vb.net 26-Dec-21 11:20am    
Thank you. Open / Save File is already running.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900