Solved

WPF About Box

Posted on 2011-09-28
4
1,280 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 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

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…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
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…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

697 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