Dynamic Dialog using from XAML in .net desktop application
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Dynamic Dialog using from XAML in .net desktop application

  1. #1
    Join Date
    Apr 2001
    Location
    CA , USA
    Posts
    83

    Question Dynamic Dialog using from XAML in .net desktop application

    Hello All,

    I am trying to rewrite a huge old MFC/C++ project using C# /WPF.

    In this project we support scripting language something that we developed here in C/C++

    The scripting(text files) allows the user to create a dialog with basic UI elements. Internally it creates a MFC Dialog.

    How can I do this using WPF and XAML ?

    It is simple to load a XAML Script that creates the dialog how ever say I want to carry out some processing using the values in the dialog.

    How can I achieve that.

    Say for instance I have a simple WPF application that loads a script. ( This is just an example)

    Job of the script is to show a simple dialog box with 2 float numbers in text boxes.

    Then I have 4 radio buttons that show the operation Add / Subtract / Multiply and Divide.

    And a Calculate button. When user presses the calculate button It should show the result in a message box carrying out the right operation between the numbers.

    All the above should be done through only script.

    And a OK button that closes the dialog, however when he closes the dialog I want to retain values from the dialog into some sort of Data Structure.

    Any help in this regard is greatly Appreciated.

    Thanks a bunch in Advance.


    Sahshi

  2. #2
    Arjay's Avatar
    Arjay is online now Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    11,480

    Re: Dynamic Dialog using from XAML in .net desktop application

    How did you do the dynamic UI in MFC? I imagine, you parsed the script, and turned the script items into MFC controls, right?

    Well, you would do the same for WPF - just parse the script and turn the script items into WPF controls.

    P.S. This is exactly what a xaml file is (perhaps it might be easier to translate your script file into a xaml file and then load the xaml file?).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center