?
Solved

WPF About Box

Posted on 2011-09-28
4
Medium Priority
?
1,319 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
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…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

752 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