开发者

create winform from xsd+ xml

is it possi开发者_如何学Goble to create winforms based on an xsd file and xml ? maybe by using something similar to xslt (webforms)?


I don't think, because web forms are basically HTML or Text files, so we can render using XML / XSLT. But in the case of WinForm, it is different and complex. Yes you can try around XML Serialize / Deserialization concepts. Or XAML in WPF.


Sounds like you want to create editors for dataset objects dynamically. If you take a look at the designer.cs file of a winform you'll notice that the form is actually created by creatign the controls and then setting their properties programatically. If this is what you want to do at runtime then you can use the structure of the XSD to create the controls and populate the form.

Can I ask what the purpose of this is? Sounds intersting.


I've seen people experiment with using the XAML parsing/loading for creating WinForms controls. Here's an old post I stumbled across: http://anoriginalidea.wordpress.com/2007/12/13/weird-science-defining-winforms-in-xaml/

And there has been a similar question asked at: Using XAML in WinForms.

Beyond that, I haven't see a robust or complete approach, but that's not to say it isn't possible.


A few month ago I create an application which Converts an XSD file in to an Xml sample then Generates a form based on the file.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜