Solved

WPF About Box

Posted on 2011-09-28
4
1,246 Views
Last Modified: 2013-12-17
I have a solution with multiple projects (applications). Now I want to create an "About" window (production/company info, etc..) on a control library so that I can reuse it on all my applications.

I have tried PedroSilva's AboutBox template which works fine if the window is on the same project as the application.

i.e. The About window automatically gets the Assembly Title, Description, etc... But since the About window is on a control library in my case, it is getting the assembly information for the control library.

How can I modify it so that it gets the assembly information of the running WPF application?
0
Comment
Question by:Thomasian
  • 2
  • 2
4 Comments
 
LVL 4

Expert Comment

by:theHollow
ID: 36813273
Hello
I would create my own control with similar design.
That way, I would have full controll over the information, and it would be no problem to add more information at a later point.
0
 
LVL 22

Author Comment

by:Thomasian
ID: 36813500
The AboutBox is just a template and is fully customizable. The code that gets the assembly information can be modified. The problem is it is getting the assembly information of the controllibrary and not the wpf application.
0
 
LVL 4

Accepted Solution

by:
theHollow earned 500 total points
ID: 36813558
Aha
In that case...

This will get you the name of the DLL (control library):
Assembly.GetExecutingAssembly().FullName

And this will get you the name of the EXE:
Assembly.GetEntryAssembly().FullName

And if you need it, this will get you the outer calling assembly:
Assembly.GetCallingAssembly().FullName
When you run your app from Visual Studio, this would be "PresentationCore".
So stick to the two first :-)

You have more choices than "FullName" available.

Hope I understood you correctly :-)
0
 
LVL 22

Author Closing Comment

by:Thomasian
ID: 36813593
Thanks! That's perfect!
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now