silverlight - WCF RIA Services - loading data and binding -


I want to stay around with the new WCF RIA service beta for Silverlight this evening. So far it looks good, but I have come to some obstacles in trying to recover the data and uncover the UI through binding.

First of all, how am I able to get an integer or string value from my service? Say I have this method on my domains service:

Public Intimate Counselor (). (Return this. }

How do I call it and bind the result, a text block?

Also, is there a way to create custom layout for binding data? I think LISTBOX, DATAGREED, and such a small "limited" how is it possible, that is, build a grid inside the stackpanel and textboxes showing some outstanding data? If it is possible with the WCF RIA services :)

thanks much earlier than

You can name your class with the schema classname.shared.cs and this code will also be available in the Silverlight application.

Using Silverlight / WPF database engineering, you can create any fancy layout using the DataGrade / List Box container and regular text box / label like control and its own style / Can apply skin.

Edit

There may not be any databases related to the shared code, only a few simple calculations if you want to get this value from the server , Then you need to call the WCF method.

You create a DomainService implementation on the server service: [EnableClientAccess ()] Public class HelloWorld: Domain service {public string sahlo () {Return "" Test "; }}

Then you can use it on the customer:

  HelloWald Reference = New hello (); Reference. Saffella (x = & gt; context containing hallo (x), faucet); Zero context_SayHello complete (System.Windows.Ria.InvokeOperation & lt; string> session) {HelloTextBlock.Text = op.Value; }  

All the filthy work done by the visual studio is available with the HelloWold Class available on the Silverlight client, see the hidden code code.

[Attacks] Specialty is obsolete in the latest release of RIA services.


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

jquery - SimpleModal Confirm fails to submit form -

php - Multiple Select with Explode: only returns the word "Array" -