Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WPF Form based on XSD

I am new in WPF and want to create a UI using XSD that autogenerates the controls.

See screenshot

enter image description here

like image 713
Bharat Jangir Avatar asked Feb 19 '26 07:02

Bharat Jangir


2 Answers

Just write proper XSLT for your XSD.

XSD is valid XML so it can be parsed with XSLT to get any other document. Because XAML is valid XML it won't be so hard.

You can find examples of XLST transforming XML to HTML and start from them. It's easier and gives immediate feedback if your XSLT is good.

Here you can find whole project to convert XSD to HTML form.

EDIT: As it was suggested you can load your XAML in runtime but I think more convenient and handy will be generating it at build step. See this answer and documentation to get more details.

like image 133
janisz Avatar answered Feb 22 '26 02:02

janisz


Yes, XAML is valid XML and can be transform. But if You want transform and load in runtime You must read answer for this topic

like image 26
Andrey Ganin Avatar answered Feb 22 '26 00:02

Andrey Ganin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!