Home All Groups Group Topic Archive Search About

WinFx: WPF Dynamically build UI

Author
9 Aug 2006 11:35 AM
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

Author
9 Aug 2006 12:10 PM
Miha Markic [MVP C#]
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/

Show quote
"LOBOMINATOR" <lobomina***@gmx.ch> wrote in message
news:%23Xzcgf6uGHA.4748@TK2MSFTNGP03.phx.gbl...
> 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
>
Author
10 Aug 2006 8:44 AM
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

Show quote
"Miha Markic [MVP C#]" <miha at rthand com> schrieb im Newsbeitrag
news:O4I8Sz6uGHA.4748@TK2MSFTNGP03.phx.gbl...
> 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" <lobomina***@gmx.ch> wrote in message
> news:%23Xzcgf6uGHA.4748@TK2MSFTNGP03.phx.gbl...
>> 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
>>
>
>
Author
10 Aug 2006 9:01 AM
Miha Markic [MVP C#]
"LOBOMINATOR" <lobomina***@gmx.ch> wrote in message
news:OjJP3kFvGHA.4968@TK2MSFTNGP03.phx.gbl...
> 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?

--
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/
Author
10 Aug 2006 9:20 AM
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

Show quote
"Miha Markic [MVP C#]" <miha at rthand com> schrieb im Newsbeitrag
news:%23xnfHuFvGHA.1288@TK2MSFTNGP02.phx.gbl...
>
> "LOBOMINATOR" <lobomina***@gmx.ch> wrote in message
> news:OjJP3kFvGHA.4968@TK2MSFTNGP03.phx.gbl...
>> 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?
>
> --
> 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/
>
Author
10 Aug 2006 2:52 PM
Carl Daniel [VC++ MVP]
LOBOMINATOR wrote:
> 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
Author
13 Aug 2006 9:44 PM
peter.fisk
Hi,

Yes it is possible.
Check out the Vista Smalltalk web site for some examples.
http://vistascript.net

Also, you can load "loose" XAML and add callbacks at runtime.

-- Peter Fisk


LOBOMINATOR wrote:
Show quote
> 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
Author
14 Aug 2006 12:22 PM
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



<peter.f***@gmail.com> schrieb im Newsbeitrag
Show quote
news:1155505484.594803.213010@b28g2000cwb.googlegroups.com...
> Hi,
>
> Yes it is possible.
> Check out the Vista Smalltalk web site for some examples.
> http://vistascript.net
>
> Also, you can load "loose" XAML and add callbacks at runtime.
>
> -- Peter Fisk
>
>
> LOBOMINATOR wrote:
>> 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
>
Author
9 Nov 2006 7:43 AM
Solveigh
Hi,

once one knows how it is quite easy to implement the event routing in C# for
several controls. Have a look at this thread:
http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.windows.developer.winfx.avalon&tid=c7606f01-a6ac-4f94-8b2e-a40dffd586c4&cat=en_US_d02fc761-3f6b-402c-82f6-ba1a8875c1a7&lang=en&cr=&sloc=en-us&m=1&p=1.


Show quote
"LOBOMINATOR" wrote:

> 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
>
>
>
> <peter.f***@gmail.com> schrieb im Newsbeitrag
> news:1155505484.594803.213010@b28g2000cwb.googlegroups.com...
> > Hi,
> >
> > Yes it is possible.
> > Check out the Vista Smalltalk web site for some examples.
> > http://vistascript.net
> >
> > Also, you can load "loose" XAML and add callbacks at runtime.
> >
> > -- Peter Fisk
> >
> >
> > LOBOMINATOR wrote:
> >> 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
> >
>
>
>

AddThis Social Bookmark Button