473,605 Members | 2,571 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Dynamic UI - Win Forms


Hi,
Sorry if this is a cross-post.

Wondering if there is any way to genrate Windows UI from an xml file just as
one would load a Web UI as HTML from an XML using XSLT. Please do let me
know if you have any ideas. Assume that the xml contains UI info (i.e.,
which is the control to display the info on etc). One obvious, but tedious
way is to manually parse the xml and generate controls using new() and fill
in data, but am looking for more structured ones.

TIA
Krishnan

Thanks
Krishnan
Nov 12 '05 #1
5 10964
Hi Krishnan,

Thanks for your post.

Based on my understanding, you want to dynamically serialize and
deserialize the winform controls from Xml file.

Microsoft has released a KB of a sample project, which demonstrate the
VS.net IDE design-time support. In this sample, we can serialize the
designer in 3 formats: VB.net files, C# files and Xml files. It also
implemented the function of deserialize the designer from Xml files. So
this function may meet your need.

Normally, internally, it just parse the xml file and use Reflection to
create each controls and initialize each properties. Link listed below:
"INFO: Code Sample That Demonstrates How to Create a Custom Form Designer
by Using Visual C# .NET"
http://support.microsoft.com/default...b;en-us;813808

Hope this helps

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 12 '05 #2
Hi,
Thanks for your reply.

I was more concerned about a dynamic UI. Foe e.g., if I have an xml file
that contains (among other things) data and the control through which I
should display data, I should be able to do it in Winforms. (In case of an
ASP .NEt application I can write xslt for a control matching the control
name!). I found that I can do reasonably well by creating a schema for my
xml, genrating a typed dataset to the schema, filling the dataset with my
xml data and attaching it to a datagrid with (dynamically) bound controls.

However I should say, in this process, I now have hit upon another issue.

I am trying to get a typed dataset from an xsd. However, the VS 2003
Enterprise Architect IDE says that "The same table (Table name) cannot be
the child table in two nested relations". I googled this and found that the
XML viewer sometimes throws up this message. But, in my case, I get this
message when I am trying to get a typed dataset from my xsd. I do have a
multpile reference to a child element, but I do not see how it violates any
of the W3C norms. Could you please help me out?

TIA
Krishnan

""Jeffrey Tan[MSFT]"" <v-*****@online.mi crosoft.com> wrote in message
news:oT******** ******@TK2MSFTN GXA01.phx.gbl.. .
Hi Krishnan,

Thanks for your post.

Based on my understanding, you want to dynamically serialize and
deserialize the winform controls from Xml file.

Microsoft has released a KB of a sample project, which demonstrate the
VS.net IDE design-time support. In this sample, we can serialize the
designer in 3 formats: VB.net files, C# files and Xml files. It also
implemented the function of deserialize the designer from Xml files. So
this function may meet your need.

Normally, internally, it just parse the xml file and use Reflection to
create each controls and initialize each properties. Link listed below:
"INFO: Code Sample That Demonstrates How to Create a Custom Form Designer
by Using Visual C# .NET"
http://support.microsoft.com/default...b;en-us;813808

Hope this helps

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 12 '05 #3
Hello!
I was more concerned about a dynamic UI. Foe e.g., if I have an xml file
that contains (among other things) data and the control through which I
should display data, I should be able to do it in Winforms.
I didn't look very closely at the sample but it looks like you should be
able to produce the XML wich is generated by the designer using XSLT
from your data and deserialize it dynamically to an UI...
(You could also directly create C#-Code from XSLT and compile it
dynamically)
Or you look at GTK#, wich afaik supports an XML-syntax for building
forms. #develop also has something with XML-forms, maybe Qt#... (it
would be easier than Windows.Forms because of automatic layout managers)

I am trying to get a typed dataset from an xsd. However, the VS 2003
Enterprise Architect IDE says that "The same table (Table name) cannot be
the child table in two nested relations". I googled this and found that the
XML viewer sometimes throws up this message. But, in my case, I get this
message when I am trying to get a typed dataset from my xsd. I do have a
multpile reference to a child element, but I do not see how it violates any
of the W3C norms. Could you please help me out?


How does the XSD look like?
IIRC the message occurs for something matching this:
<root>
<a>
<a>foo</a>
</a>
</root>
--
Pascal Schmitt
Nov 12 '05 #4
Hi,

The XSD has to obey not only the W3C norms, but also the DataSet schema
norm. This issue occurs because of the xsd is invalid. You can also check
the following KB article for more information.

http://support.microsoft.com/default...b;en-us;325696

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 12 '05 #5
Thanks Kevin

"Kevin Yu [MSFT]" <v-****@online.mic rosoft.com> wrote in message
news:Ca******** ******@TK2MSFTN GXA02.phx.gbl.. .
Hi,

The XSD has to obey not only the W3C norms, but also the DataSet schema
norm. This issue occurs because of the xsd is invalid. You can also check
the following KB article for more information.

http://support.microsoft.com/default...b;en-us;325696

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 12 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
3513
by: Bil Muh | last post by:
Esteemede Developers, I would like to Thank All of You in advance for your sincere guidances. I am developing a software using Visual C++ .NET Standard Edition with Windows Form (.NET) template. Briefly -------------------------------------------------------------------------------------------- I need to create dynamically some controls on the forms, and display these
1
17655
by: Nathan Bloomfield | last post by:
Does anyone know if there is any documentation which relates to Access2k + ? or can anyone help adjust the code? I am having trouble converting the DAO references. TITLE :INF: How to Create a Dynamic Crosstab Report PRODUCT :Microsoft Access PROD/VER:1.00 1.10 OPER/SYS:WINDOWS
1
4088
by: mtech1 | last post by:
Access 2002 I am trying to create a dynamic crosstab report that parameters come from 3 different forms. I get runtime error 3070 - The Microsoft Jet database engine does not recognize 'Forms!frmDefaults!ProviderID' as a valid field name or expression, and debug takes me to line 60 below. Any Suggestions Would Be Truly Appreciated!
3
6816
by: MikeY | last post by:
Hi Everyone, I am working in C#, windows forms.My question is this. All my button dynamic controls properties are present and accounted for except for the"FlatStyle" properties. I can't seem to figure out, if there is a way of using polymorphic way (if that is a word) of doing this particular property. A sample of my code is as follows: DynamicControls.ButtonControl(this,btnSearchByName, new Point(5, 75), new Size(95, 20),...
7
2011
by: AdeelAlvi | last post by:
iam working on a project called service desk that automates the departmental services online .one major component i have to create is that to convert paper based forms into dynamic webforms . i want to design a module that will create dynamic web forms that will convert paper based forms into webforms. help required ... thankx in advance -- Regards Adeel Alvi
2
2930
by: deejayquai | last post by:
Hi I'm trying to produce a report based on a dynamic crosstab. Ultimately i'd like the report to actually become a sub report within a student end of year record of achievement. The dynamic sub-report will capture what grades the student has achieved in a list of different subjects and the reason I need it to be dynamic is that students take different subjects. Basically I've been trying to doctor the KB article on dynamic
3
4778
by: RahimAsif | last post by:
I am writing an application that requires the a portion of the main menu to be dynamic. The menu has file, panels, view files and help across the top. The view files sub menu needs to be dynamically generated, and the dynamic generation needs to occur right when the user selects this menu item (that is on the Popup event handler). However, everytime I put following code on the Popup event handler (of the View Files menuitem) to dynamically...
5
2540
by: matt | last post by:
hello, i am on an interesting project. in this project, i have to create dynamic data-entry forms for offline-users to fill out, save locally, and eventually postback to our app (when back online). data validation is required on the form. i had looked at using PDF-forms for this.. Adobe's "LifeCyle Forms" would work perfectly. with it one can pass in xml to their webservice & get back PDF-form binaries. however, Adobe's pricing is...
0
2715
by: JamesOo | last post by:
I have the code below, but I need to make it searchable in query table, below code only allowed seach the table which in show mdb only. (i.e. have 3 table, but only can search either one only, cannot serch by combine 3 table) Example I have the query table below, how do I make the code to seach based on the query from this: SELECT Product.ID, Product.Description, Quantity.Quantity, Quantity.SeialNo, Quantity.SupplierID,...
2
3321
by: yomadhu | last post by:
I created a dynamic form in javascript. Am unable to get those values in to php to display. I need all details. If i add 10 rows the i need to display those all values. Can any one help me for that code. <HTML> <HEAD> <TITLE> Add/Remove dynamic rows in HTML table </TITLE> <script type="text/javascript" src="script.js"> // JavaScript Document var c=0;
0
7931
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8423
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8411
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8281
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
5885
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5444
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3911
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
1530
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1270
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.