469,962 Members | 2,353 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,962 developers. It's quick & easy.

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<ComboBox>
<Label<Label<ComboBox>
<Label<Label<TextBox>
<Label<Label<CheckBox>
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
Apr 3 '08 #1
3 1769
On Apr 3, 9:15*am, onno.will...@gmail.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<ComboBox>
<Label<Label<ComboBox>
<Label<Label<TextBox>
<Label<Label<CheckBox>
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
Apr 5 '08 #2
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
Apr 6 '08 #3
On Apr 6, 4:16*am, Onno <onno.will...@gmail.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:
http://www.microsoft.com/downloads/d...displaylang=en

--
Tom Shelton
Apr 6 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by A_StClaire_ | last post: by
19 posts views Thread by J. J. Farrell | last post: by
14 posts views Thread by Carramba | last post: by
15 posts views Thread by mdh | last post: by
7 posts views Thread by sh.vipin | last post: by
1 post views Thread by rainxy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.