Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>(Answer completely rewritten)</p> <p>You are correct, VS 2008 no longer lists the 'WPF window' template in an add-in. Fortunately, it still lists the 'WPF User Control' template. Use it. This will add the necessary references to the project.</p> <p>Then replace the contents of the generated XAML file (in my case, it was UserControl1.xaml) by what you have in Figure 5 (+ the end tag). Instead of declaring a UserControl, you now have a Window in the XAML. You also need to edit the generated C# file. Replace the class name (for me, it was UserControl1) by the name in the tutorial (Window2) and its constructor, too. Change the derivation from UserControl to Window. Here is the end result:</p> <pre><code>public partial class Window2 : Window { public Window2() { InitializeComponent(); } </code></pre> <p>It is quite important that the namespace and class name in the .cs match the x:Class declaration in the XAML.</p> <p>Now, follow what the tutorial says (not forgetting to adapt the path to the image file, otherwise it doesn't work. The original line in the tutorial is:</p> <pre><code>imageSource.UriSource = new Uri(@"C:\Fulvio\img\yast_suse_tour.png"); </code></pre> <p>Set the path to an existing image on your hard drive.</p> <p>And then it works!</p> <p>I have to add that this tutorial was written before VS had a XAML designer. It is no longer needed to add controls by hand like the tutorial does. Add a user control, change it to a window and then use the toolbox and drag&amp;drop controls, like you may be used to.</p> <p>But as far as creating an outlook add-in is concerned, the tutorial is great.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload