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. WPF, uncompiled XAML and scripting?

WPF, uncompiled XAML and scripting?

Scheduled Pinned Locked Moved WPF
csharpwpfquestiondesignbusiness
7 Posts 4 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.
  • A Offline
    A Offline
    Antonino Porcino
    wrote on last edited by
    #1

    I have to write a desktop business application with the required constraint that each function (page) of the app must be completely written in a scripted language. So my idea is to use uncompiled XAML for scripting the user interface in WPF, and CodeDOM+CSharpCompiler for the code behind, thus making C# a sort of scripted language. I know the WPF navigation model can't be used in uncompiled XAML so I'll have to write a Custom navigation implementation. My question is: is the above architecture a good choice (considering the constraint I am subject to)? Or it's just too crazy? Has any of you ever written something similar? Any suggestion will be greatly appreciated.

    A M L 3 Replies Last reply
    0
    • A Antonino Porcino

      I have to write a desktop business application with the required constraint that each function (page) of the app must be completely written in a scripted language. So my idea is to use uncompiled XAML for scripting the user interface in WPF, and CodeDOM+CSharpCompiler for the code behind, thus making C# a sort of scripted language. I know the WPF navigation model can't be used in uncompiled XAML so I'll have to write a Custom navigation implementation. My question is: is the above architecture a good choice (considering the constraint I am subject to)? Or it's just too crazy? Has any of you ever written something similar? Any suggestion will be greatly appreciated.

      A Offline
      A Offline
      Abhinav S
      wrote on last edited by
      #2

      I don't think I quite understand your problem correctly. If each page needs to be written in a scripting language, why use xaml in the first place? You could consider using JQuery + Html5.

      A 1 Reply Last reply
      0
      • A Abhinav S

        I don't think I quite understand your problem correctly. If each page needs to be written in a scripting language, why use xaml in the first place? You could consider using JQuery + Html5.

        A Offline
        A Offline
        Antonino Porcino
        wrote on last edited by
        #3

        it needs to be a standard desktop app (.exe that is, no browser). Unfortunately I can't change this choice of design.

        1 Reply Last reply
        0
        • A Antonino Porcino

          I have to write a desktop business application with the required constraint that each function (page) of the app must be completely written in a scripted language. So my idea is to use uncompiled XAML for scripting the user interface in WPF, and CodeDOM+CSharpCompiler for the code behind, thus making C# a sort of scripted language. I know the WPF navigation model can't be used in uncompiled XAML so I'll have to write a Custom navigation implementation. My question is: is the above architecture a good choice (considering the constraint I am subject to)? Or it's just too crazy? Has any of you ever written something similar? Any suggestion will be greatly appreciated.

          M Offline
          M Offline
          Mycroft Holmes
          wrote on last edited by
          #4

          Get another job/course whoever set the constraints does not live in the real world.

          Never underestimate the power of human stupidity RAH

          A 1 Reply Last reply
          0
          • M Mycroft Holmes

            Get another job/course whoever set the constraints does not live in the real world.

            Never underestimate the power of human stupidity RAH

            A Offline
            A Offline
            Antonino Porcino
            wrote on last edited by
            #5

            Yup, I tried to convince the people in charge to switch to another architecture but they insist it's a winning model because they are using it since the MS-DOS age. Currently the application runs under WinForms, it has a proprietary script language, proprietary virtual machine, proprietary component library, proprietary editor with syntax highlighting and proprietary "form" editor. But due to WinForms and limited component library the app isn'tt graphically attractive, so that's why a move to WPF was planned. And while we are moving, I would like to eliminate the virtual machine and embrace full .NET languages (via CodeDom/Reflection). But I'm not sure it's the right choice.

            1 Reply Last reply
            0
            • A Antonino Porcino

              I have to write a desktop business application with the required constraint that each function (page) of the app must be completely written in a scripted language. So my idea is to use uncompiled XAML for scripting the user interface in WPF, and CodeDOM+CSharpCompiler for the code behind, thus making C# a sort of scripted language. I know the WPF navigation model can't be used in uncompiled XAML so I'll have to write a Custom navigation implementation. My question is: is the above architecture a good choice (considering the constraint I am subject to)? Or it's just too crazy? Has any of you ever written something similar? Any suggestion will be greatly appreciated.

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              If you have a PHB insisting on this lunacy then you might check out this article, C# Script: The Missing Puzzle Piece[^] Maybe some help.

              Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Please stand in front of my pistol, smile and wait for the flash - JSOP 2012

              A 1 Reply Last reply
              0
              • L Lost User

                If you have a PHB insisting on this lunacy then you might check out this article, C# Script: The Missing Puzzle Piece[^] Maybe some help.

                Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Please stand in front of my pistol, smile and wait for the flash - JSOP 2012

                A Offline
                A Offline
                Antonino Porcino
                wrote on last edited by
                #7

                Thank you, it's more or less what I am trying to do, so it's going to be helpful. The only difference is that the result of my scripted "programs" would be web-like pages to be loaded in a navigational host application. Unfortunately it seems that the native WPF Navigation/Page model can't be used with uncompiled XAML.

                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