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

How to load a WPF from a custom made ribbon control

$
0
0

Hi,

I have created a Word Addin that tracks copy pasted content across .docx documents. I would now like to give the user the option to  visualize this information. I want to use a WPF to bring up a window depicting a graph representing this information. However, I fail to actually load the WPF.

I tried to test this with a basic untouched WPF that I added to my project, to see if the basic loading works. This WPF is called MainWindow.xaml.cs. I tried to load this window by calling:

new MainWindow { };

from my MyRibbon class defining the custom controls I added. I tested that the custom made button works and the MainWindow object gets created, but it does not get loaded. What command am I missing?

I know this is a beginners questions, but I could only find tutorials creating WPFs as the main application, not loading them from another class.

Thanks for any help!


Viewing all articles
Browse latest Browse all 18858

Trending Articles