WinFx: WPF Dynamically build UI

L

LOBOMINATOR

Hello EveryOne,

I'm currently playing a little bit with the new wpf in Visual Studio 2005. I
was pretty excited about the posssibilities you have with XAML. I was
wondering if it would be possible to dynamically build up a client's UI?
Meaning like providing just a dumb application who load the necessary UI
over the Web (for instance). Most of the "logic" should be remote.

Has anyone an idea how to build something like this?

Thanks
 
M

Miha Markic [MVP C#]

Why not? You are talking about some sort of plugin application which can be
already done.
 
L

LOBOMINATOR

Hello Miha,

No I was talking about some sort of server that handles the control for the
gui. I was wondering if there is a simpler solution to provide GUIs over the
net. I mean XAML is a nice way to describe a GUI. Why not building up on a
server dynamically a GUI Definition in XAML and then send it back to the
client. Also the clients events would be handled from this server. Do you
understand what I mean?

Thanks

Miha Markic said:
Why not? You are talking about some sort of plugin application which can
be already done.

--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

LOBOMINATOR said:
Hello EveryOne,

I'm currently playing a little bit with the new wpf in Visual Studio
2005. I was pretty excited about the posssibilities you have with XAML. I
was wondering if it would be possible to dynamically build up a client's
UI? Meaning like providing just a dumb application who load the necessary
UI over the Web (for instance). Most of the "logic" should be remote.

Has anyone an idea how to build something like this?

Thanks
 
M

Miha Markic [MVP C#]

LOBOMINATOR said:
Hello Miha,

No I was talking about some sort of server that handles the control for
the gui. I was wondering if there is a simpler solution to provide GUIs
over the net. I mean XAML is a nice way to describe a GUI. Why not
building up on a server dynamically a GUI Definition in XAML and then send
it back to the client. Also the clients events would be handled from this
server. Do you understand what I mean?

Sort of. But then, roundtrips/would kill your performance, won't they?
 
L

LOBOMINATOR

Possible. That would be an other problem to struggle with. What I don't
understand is the fact that with XAML we have a nice way of describing a
GUI. But I found no way to build up the XAML Markup dynamically and the
transform it the a remote client and there parse the content of the XAML
stream. Or do you think I'm on the wron track?

Thanks for your help
 
C

Carl Daniel [VC++ MVP]

LOBOMINATOR said:
Possible. That would be an other problem to struggle with. What I
don't understand is the fact that with XAML we have a nice way of
describing a GUI. But I found no way to build up the XAML Markup
dynamically and the transform it the a remote client and there parse
the content of the XAML stream. Or do you think I'm on the wron track?

There's a class called XamlReader that can parse XAML and create the object
(form, control, etc) that it describes. Once you have that object, you
could connect event handlers to it's events that forward the events back to
a server. You'd have to know in advance which events to hook, I think,
since there will be literally hundreds of possible events from a form of any
complexity.

On the server side, I'm not aware of a XamlWriter class, but then I don't
have access to the docs right now (they're on a different machine). In any
case, you can always build an XmlDocument with the approrpiate XAML code and
then serialize it to a string for transmissions to the remote client.

-cd
 
L

LOBOMINATOR

Hello Peter,



Vista Smalltalk sounds fantastic. But it would be nice if we could achieve
this with C#. With System.Windows.Markup.XamlReader and XamlWriter class I
was able to load XAML Markup during runtime. The problem is actually the
eventhandler. I was wondering if it would be possible for example to do a
remote databinding and also to attachement events dynamically during runtime
without using smalltalk (no disrespect)



Thanks for your Help
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top