GUI definition in external file

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • onno.willems@gmail.com

    GUI definition in external file

    Hi,

    A little part of my (.NET 2.0) WinForm GUI need to be configurable by
    a user. The user can specify a variable number of items which should
    appear on a form like this:
    <Label<Label<Co mboBox>
    <Label<Label<Co mboBox>
    <Label<Label<Te xtBox>
    <Label<Label<Ch eckBox>
    etc
    I want to store the (user changeable) definition for this in an
    external XML file. My 1st thought was reading the XML file and filling
    a DataGridView, but you can't seem to mix Edit/Text/Checkboxes in a
    single grid because you set the type by column. Ow well, I think I can
    generate the GUI dynamically placing the controls in a panel with
    AutoScroll set to True.

    But the user needs to be able to add a little dynamic behavior too.
    For example, if combobox1 has value "SomeValue1 " and CheckBox2 is
    checked, TextBox1 should be disabled.

    Any thoughts on how I can achieve this?

    Thanks,
    Onno
  • Tom Shelton

    #2
    Re: GUI definition in external file

    On Apr 3, 9:15 am, onno.will...@gm ail.com wrote:
    Hi,
    >
    A little part of my (.NET 2.0) WinForm GUI need to be configurable by
    a user. The user can specify a variable number of items which should
    appear on a form like this:
    <Label<Label<Co mboBox>
    <Label<Label<Co mboBox>
    <Label<Label<Te xtBox>
    <Label<Label<Ch eckBox>
    etc
    I want to store the (user changeable) definition for this in an
    external XML file. My 1st thought was reading the XML file and filling
    a DataGridView, but you can't seem to mix Edit/Text/Checkboxes in a
    single grid because you set the type by column. Ow well, I think I can
    generate the GUI dynamically placing the controls in a panel with
    AutoScroll set to True.
    >
    But the user needs to be able to add a little dynamic behavior too.
    For example, if combobox1 has value "SomeValue1 " and CheckBox2 is
    checked, TextBox1 should be disabled.
    >
    Any thoughts on how I can achieve this?
    >
    Thanks,
    Onno
    Hmmm... maybe using xaml and wpf? I haven't played a lot with the
    loading of external xaml, but it should be doable. I think you may
    even be able to do some of the stuff your trying to do using xaml
    databinding and triggers....

    --
    Tom Shelton

    Comment

    • Onno

      #3
      Re: GUI definition in external file

      Hmmm...  maybe using xaml and wpf?  I haven't played a lot with the
      loading of external xaml, but it should be doable.  I think you may
      even be able to do some of the stuff your trying to do using xaml
      databinding and triggers....
      Thanks! But wpf is not part of .NET 2.0 (or can it be done?) And can
      you mix wpf with a WinForm app (have one part of a form be filled in
      by WPF?)

      Regards,
      Onno

      Comment

      • Tom Shelton

        #4
        Re: GUI definition in external file

        On Apr 6, 4:16 am, Onno <onno.will...@g mail.comwrote:
        Hmmm...  maybe using xaml and wpf?  I haven't played a lot with the
        loading of external xaml, but it should be doable.  I think you may
        even be able to do some of the stuff your trying to do using xaml
        databinding and triggers....
        >
        Thanks! But wpf is not part of .NET 2.0 (or can it be done?) And can
        you mix wpf with a WinForm app (have one part of a form be filled in
        by WPF?)
        >
        Regards,
        Onno
        It's part of 3.0 - which is the 2.0 runtime with extra libraries.
        And, there is an addin for vs2005 for wpf. And yes, you can mix and
        match winforms and wpf (even on the same form).

        VS2005 Addin:


        --
        Tom Shelton

        Comment

        Working...