tags:

views:

58

answers:

2

Hello All,

I am looking for About Window for WPF VS2008. Any Source code is available to download or one have to develop on his/her own.

Thanks you, Harsha

+1  A: 

Microsoft have delivered a gee-whiz WPF AboutBox for VS2010 (as a downloadable control, not in the product) but there was no such beast in VS2008 last time I looked (about a month ago).

I ended up just creating a WinForms one (from the wizard) which worked fine. I then found I could simplify it to just use hard-coded values since I didn't need any of that variable-based stuff:

AboutBox1.cs:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Reflection;
using System.Windows.Forms;

namespace Dodgy {
    partial class AboutBox1 : Form {
        public AboutBox1() {
            InitializeComponent();
            this.Text = "About Dodgy Thing";
            this.labelProductName.Text = "Dodgy Thing";
            this.labelVersion.Text = "Version 1.0";
            this.labelCopyright.Text = "Copyright 2010. All rights reserved.";
            this.labelCompanyName.Text = "Dodgy Brothers Software GmbH";
            this.textBoxDescription.Text
                = "Dodgy Thing allows you to do all sorts of dodgy things.";
        }
    }
}

To call it, just use:

AboutBox1 about = new AboutBox1();
about.ShowDialog();

I haven't included the boilerplate files from the wizard, AboutBox1.Designer.cs and AboutBox1.resx, since the attempt made me realise SO has a 30K limit for answers (and they're pretty chunky). You should just use what the wizard gives you.

paxdiablo
+2  A: 

Just create a normal WPF Window and make it look like an about box (add text blocks for product name, version, copyright ...)

There is nothing special about the WinForms about box, it's just a normal form preloaded with common about box controls, there is no reason to use it from WPF.

Nir