Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WPF
  4. MessageBox - when application loads a WPF theme DLL

MessageBox - when application loads a WPF theme DLL

Scheduled Pinned Locked Moved WPF
wpfcsharpquestionannouncement
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Prasoon Chaudhary
    wrote on last edited by
    #1

    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.

    J P 2 Replies Last reply
    0
    • P Prasoon Chaudhary

      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.

      J Offline
      J Offline
      John ph
      wrote on last edited by
      #2

      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


      P 1 Reply Last reply
      0
      • P Prasoon Chaudhary

        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.

        P Offline
        P Offline
        Pete OHanlon
        wrote on last edited by
        #3

        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

        P 1 Reply Last reply
        0
        • P Pete OHanlon

          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

          P Offline
          P Offline
          Prasoon Chaudhary
          wrote on last edited by
          #4

          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.

          1 Reply Last reply
          0
          • J John ph

            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


            P Offline
            P Offline
            Prasoon Chaudhary
            wrote on last edited by
            #5

            Thanks for the reply, but that does not solve my purpose :(

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups