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 5988249
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:55:56+00:00 2026-05-22T22:55:56+00:00

I have an Address object in my model which has 6 address lines as

  • 0

I have an Address object in my model which has 6 address lines as separate properties. In my Silverlight view I want this to be displayed in a multiline text box and to be updated using databinding.

The View is linked to a ViewModel which has an Address property which is always set. My first thought was to use a ValueConverter which was initially fine as it could take an Address object and pass back a string which is displayed.

My problem arises when I want to ConvertBack the string. I wish to update the existing Address object but cannot find a way to do this. I think you can pass back a new Address object but this is not what I want to happen.

I am on the right track here or is there a better method than using a ValueConverter.

  • 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-22T22:55:57+00:00Added an answer on May 22, 2026 at 10:55 pm

    You are almost on the right track here! You are right in your observation that the ConvertBack method would need to create a new Address instance. You cannot obtain a reference back to the original address in your converter, the binding framework does not permit this kind of tight coupling.

    How about using MVVM? create a ViewModel that exposes / adapts your Address as a string, basically performing the role of your value converter. When the TwoWay binding updates this string property, your ViewModel can then update the Address that it adapts.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an Address Model which has a ForeignKey to a Contact Model: class
I have a business model called Customer which has many required properties (via DataAnnotations)
I have a model like this: Client - which has many Locations - which
So I have a model object, which is a named 'location' which has a
Problem: I have an address field from an Access database which has been converted
Using Rails 3, I have an account model which has_many addresses. In the address
I have model Person or say Profile and this class Person has a genericRelationship
I have a model called MessagePerson which has the fields of details which depict
I have a WCF Service operation which takes an object as a parameter. This
I have an object Proposal which has a property called CurrentAgency of Agency which

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.