Click here to Skip to main content
15,896,269 members
Home / Discussions / WPF
   

WPF

 
QuestionWPF PopUp control Pin
Rahul Chitte14-Apr-11 1:59
Rahul Chitte14-Apr-11 1:59 
AnswerRe: WPF PopUp control Pin
Pete O'Hanlon14-Apr-11 2:20
mvePete O'Hanlon14-Apr-11 2:20 
AnswerRe: WPF PopUp control Pin
Ian Shlasko14-Apr-11 3:19
Ian Shlasko14-Apr-11 3:19 
AnswerRe: WPF PopUp control Pin
Abhinav S14-Apr-11 3:32
Abhinav S14-Apr-11 3:32 
GeneralRe: WPF PopUp control Pin
Tarun.K.S14-Apr-11 3:50
Tarun.K.S14-Apr-11 3:50 
GeneralRe: WPF PopUp control Pin
Abhinav S14-Apr-11 4:05
Abhinav S14-Apr-11 4:05 
QuestionAnother Dummies question (sorry) Pin
Johnny J.14-Apr-11 0:53
professionalJohnny J.14-Apr-11 0:53 
AnswerRe: Another Dummies question (sorry) Pin
Pete O'Hanlon14-Apr-11 1:33
mvePete O'Hanlon14-Apr-11 1:33 
Do you know how WCF works? I'm not being funny, I'm just trying to find a common basepoint here. If you have your Silverlight app needing to know about Ado types, then you have just put a hard dependency in which means that your service could not be consumed by other types of systems (such as Java ones) that have no knowledge of the Ado types.

You create your model as a DataContract. Here's an example:
C#
namespace WcfServer
{
    using System;
    using System.Runtime.Serialization;

    /// <summary>
    /// The contract that defines the customer structure.
    /// </summary>
    [DataContract]
    public class Customer
    {
        /// <summary>
        /// Gets or sets the customer forename.
        /// </summary>
        [DataMember]
        public string Forename { get; set; }

        /// <summary>
        /// Gets or sets the customer surname.
        /// </summary>
        [DataMember]
        public string Surname { get; set; }

        /// <summary>
        /// Gets or sets the date of birth of the customer
        /// </summary>
        [DataMember]
        public DateTime DateOfBirth { get; set; }

        /// <summary>
        /// Gets the Id of the customer.
        /// </summary>
        [DataMember]
        public int Id { get; internal set; }
    }
}
As you can see, it's POCO. Now, the point here is that you don't add this as a class library into your Silverlight application. What you do, is import the service reference into your Silverlight application, so it gets access to the contract (and all the other gubbins it needs, such as the OperationContract). You now have a nice separation in place which means that you can leverage things such as web farms to manage scalability of your service.

As you are new at this, I would recommend buying a book and reading up on this. There's a lot to it, and it's well worth the investment. The book I usually recommend for Silverlight is Silverlight 4 Unleashed[^] by MVP and Mix speaker, Laurent Bugnion.

I'm not a stalker, I just know things. Oh by the way, you're out of milk.

Forgive your enemies - it messes with their heads


My blog | My articles | MoXAML PowerToys | Onyx


GeneralRe: Another Dummies question (sorry) Pin
Johnny J.14-Apr-11 2:26
professionalJohnny J.14-Apr-11 2:26 
GeneralRe: Another Dummies question (sorry) Pin
Pete O'Hanlon14-Apr-11 2:52
mvePete O'Hanlon14-Apr-11 2:52 
GeneralRe: Another Dummies question (sorry) Pin
Johnny J.14-Apr-11 2:55
professionalJohnny J.14-Apr-11 2:55 
GeneralRe: Another Dummies question (sorry) Pin
Pete O'Hanlon14-Apr-11 3:19
mvePete O'Hanlon14-Apr-11 3:19 
GeneralRe: Another Dummies question (sorry) Pin
Mycroft Holmes15-Apr-11 0:24
professionalMycroft Holmes15-Apr-11 0:24 
GeneralRe: Another Dummies question (sorry) Pin
Johnny J.15-Apr-11 0:26
professionalJohnny J.15-Apr-11 0:26 
GeneralRe: Another Dummies question (sorry) Pin
Pete O'Hanlon15-Apr-11 0:56
mvePete O'Hanlon15-Apr-11 0:56 
GeneralRe: Another Dummies question (sorry) Pin
Mycroft Holmes15-Apr-11 2:15
professionalMycroft Holmes15-Apr-11 2:15 
QuestionHow to read data from databinding controls(listbox in my code) [modified] Pin
Rocky2313-Apr-11 23:51
Rocky2313-Apr-11 23:51 
AnswerRe: How to read data from databinding controls(listbox in my code) Pin
Tarun.K.S14-Apr-11 0:07
Tarun.K.S14-Apr-11 0:07 
QuestionMoving multiple Shapes in Canvas Pin
Member 773700213-Apr-11 22:15
Member 773700213-Apr-11 22:15 
AnswerRe: Moving multiple Shapes in Canvas Pin
SledgeHammer0114-Apr-11 6:33
SledgeHammer0114-Apr-11 6:33 
GeneralRe: Moving multiple Shapes in Canvas Pin
Member 773700215-Apr-11 10:00
Member 773700215-Apr-11 10:00 
QuestionThe problem with listview and timer [modified] Pin
Tesic Goran13-Apr-11 19:33
professionalTesic Goran13-Apr-11 19:33 
QuestionWPF virtualizingstackpanel vs Grid or StackPanel Pin
devvvy13-Apr-11 18:52
devvvy13-Apr-11 18:52 
AnswerRe: WPF virtualizingstackpanel vs Grid or StackPanel [modified] Pin
Tarun.K.S13-Apr-11 21:18
Tarun.K.S13-Apr-11 21:18 
GeneralRe: WPF virtualizingstackpanel vs Grid or StackPanel Pin
SledgeHammer0114-Apr-11 6:24
SledgeHammer0114-Apr-11 6:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.