Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / November 2006

Tip: Looking for answers? Try searching our database.

WinFx: WPF Dynamically build UI

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
LOBOMINATOR - 09 Aug 2006 12:35 GMT
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
Miha Markic [MVP C#] - 09 Aug 2006 13:10 GMT
Why not? You are talking about some sort of plugin application which can be
already done.

Signature

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/

> Hello EveryOne,
>
[quoted text clipped - 7 lines]
>
> Thanks
LOBOMINATOR - 10 Aug 2006 09:44 GMT
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

> Why not? You are talking about some sort of plugin application which can
> be already done.
[quoted text clipped - 10 lines]
>>
>> Thanks
Miha Markic [MVP C#] - 10 Aug 2006 10:01 GMT
> Hello Miha,
>
[quoted text clipped - 4 lines]
> 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?

Signature

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 - 10 Aug 2006 10:20 GMT
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

>> Hello Miha,
>>
[quoted text clipped - 6 lines]
>
> Sort of. But then, roundtrips/would kill your performance, won't they?
Carl Daniel [VC++ MVP] - 10 Aug 2006 15:52 GMT
> 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
peter.fisk@gmail.com - 13 Aug 2006 22:44 GMT
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

> Hello EveryOne,
>
[quoted text clipped - 7 lines]
>
> Thanks
LOBOMINATOR - 14 Aug 2006 13:22 GMT
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

> Hi,
>
[quoted text clipped - 18 lines]
>>
>> Thanks
Solveigh - 09 Nov 2006 07:43 GMT
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&c
at=en_US_d02fc761-3f6b-402c-82f6-ba1a8875c1a7&lang=en&cr=&sloc=en-us&m=1&p=1
.

> Hello Peter,
>
[quoted text clipped - 29 lines]
> >>
> >> Thanks

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.