Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3354178
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T02:14:27+00:00 2026-05-18T02:14:27+00:00

I am developing an Windows phone7 application, I have a .NET webservice that returns

  • 0

I am developing an Windows phone7 application, I have a .NET webservice that returns a List. This list should be bound to a ListBox.

Product is a class defined in the server and Visual Studio gets its definition from WSDL and creates a stub in my windows phone application.

What happens is that the list calls the “toString()” method in order to show the items in the GUI, so I have a strange string on my list. I would like to change to a user friendly string (Name – Quantity).
To do that, I want to override the toString() method, but changing it in the server definition doesn’t help because methods are not exposed in the WSDL.
Changing the stub myself would cause me to lose the data when I refresh or change the reference.

I think it is a very often case, so there should be a solution, which I am missing. So please, how can I define the method ToString() in the windows phone7 to this object so I can bind it to the list?

Thank you,
Oscar

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T02:14:28+00:00Added an answer on May 18, 2026 at 2:14 am

    The correct approach is to take the raw data coming in from the WS and translate it to a representative model, in adherence to the MVVM guidelines and seperating yourself from concerns on the server side. Creating a proxy essentially between you and the WS.

    Furthermore, once you have done this you could simply create a property on that model which you can then bind to and could return the data as you need, making use of the DisplayMemberPath property.

    <ListBox ItemsSource="{Binding}"
             DisplayMemberPath="Title">
    

    Your model could then be something like…

    public String Title
    {
        get
        {
             return Name + Quantity;
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing a Windows Phone application . I have defined this on App.xaml: <nav:UriMapping
I'm developing a Windows Phone application. I have defined a ListBox.ItemTemplate's DataTemplate as follows:
I am developing a Windows .NET application (WinForms) and I need to simulate a
I'm developing an Windows Forms application that requires me to call a separate program
I have been developing a C# windows form application in XP. It all works
I have an urgent problem..I am developing a windows mobile 6.0 application and the
I'm developing a Windows Phone application with C#. I have an ObservableCollection defined as
I am developing windows mobile application. I have added the SQLite database file in
I'm developing my first Windows Phone 7 application and I have to add an
I am developing a Windows Phone 7 Silverlight application that currently displays a map

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.