MessageBox - when application loads a WPF theme DLL
-
I have developed a theme in XAML. Then I built a class library project using that .xaml. The output dll is working fine as theme. I want to add a messageBox as soon as this dll gets used, or whenever the application (which uses it) starts up. What would be the code? And where do I need to write it? Obviously, this DLL itself should have this code. Few more clarifications: I want standard message box to appear, as soon as any user runs the application with my theme dll. Something like 'This is unregistered version of the theme'. I want to know how and where can I write code for this, inside my class library project. Please answer as if you are answering to a newbie.
-
I have developed a theme in XAML. Then I built a class library project using that .xaml. The output dll is working fine as theme. I want to add a messageBox as soon as this dll gets used, or whenever the application (which uses it) starts up. What would be the code? And where do I need to write it? Obviously, this DLL itself should have this code. Few more clarifications: I want standard message box to appear, as soon as any user runs the application with my theme dll. Something like 'This is unregistered version of the theme'. I want to know how and where can I write code for this, inside my class library project. Please answer as if you are answering to a newbie.
-
I have developed a theme in XAML. Then I built a class library project using that .xaml. The output dll is working fine as theme. I want to add a messageBox as soon as this dll gets used, or whenever the application (which uses it) starts up. What would be the code? And where do I need to write it? Obviously, this DLL itself should have this code. Few more clarifications: I want standard message box to appear, as soon as any user runs the application with my theme dll. Something like 'This is unregistered version of the theme'. I want to know how and where can I write code for this, inside my class library project. Please answer as if you are answering to a newbie.
You cannot theme the standard Windows message box as this is a standard Windows chrome control. What you need to do is use a custom MessageBox implementation, which can be found in the WPF toolkit. You can then skin this to your hearts content. You can find the WPF toolkit here[^].
Forgive your enemies - it messes with their heads
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility
-
You cannot theme the standard Windows message box as this is a standard Windows chrome control. What you need to do is use a custom MessageBox implementation, which can be found in the WPF toolkit. You can then skin this to your hearts content. You can find the WPF toolkit here[^].
Forgive your enemies - it messes with their heads
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility
I am sorry if I was not clear enough. I don't want to change theme for messagebox. I want standard message box to appear, as soon as any user runs the application with my theme dll. Something like 'This is unregistered version of the theme'. I want to know how and where can I write code for this, inside my class library project.
-
you can check this article WPF Themes and Skins Engine[^] to get some tips...
- Regards -
J O N
A good thing is a bad thing if it keeps you from the best thing. - Dr. Adrian Rogers
Thanks for the reply, but that does not solve my purpose :(