• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1373
  • Last Modified:

WPF About Box

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
Thomasian
Asked:
Thomasian
  • 2
  • 2
1 Solution
 
theHollowCommented:
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
 
ThomasianAuthor Commented:
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
 
theHollowCommented:
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
 
ThomasianAuthor Commented:
Thanks! That's perfect!
0

Featured Post

Industry Leaders: 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!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now