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

  • SEARCH
  • Home
  • 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 7435455
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:04:40+00:00 2026-05-29T10:04:40+00:00

First, please forgive (and correct!) any misconceptions – I’m brand new to anything .NET.

  • 0

First, please forgive (and correct!) any misconceptions – I’m brand new to anything .NET.

Me and my team are building an application in Silverlight, using the MVVM pattern. Right now, we a viewmodel for an object with various properties (e.g. its background color). The VM implements INotifyPropertyChanged so that when those properties are updated, listeners are notified.

The problem is that these are drag-and-drop objects on a canvas, and we want to run some logic every time the position on the canvas is changed. However, my understanding is that because Canvas.Left and Canvas.Top are attached properties I can’t treat them the same way as I did the properties native to the object.

Is there any way to make these attached properties work with INotifyPropertyChanged? If not, what’s the best way to react to changes in the Canvas.Left and Canvas.Top properties.

Thank you very much!

  • 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-29T10:04:40+00:00Added an answer on May 29, 2026 at 10:04 am

    Two things:

    (1) To keep with the MVVM pattern, I would suggest using style triggers for these attached properties and leave them out of your View Model altogether.

    (2) Along those same lines, I wouldn’t have your view models know about concepts like “background color” that are purely view concerns. If there is something in your business logic/VM that keys a view concern like color, you can use value converters to translate from what the view model knows about to what the view needs to do.

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

Sidebar

Related Questions

First, a caveat: I'm brand new to C#, so please forgive me, if this
I am a brand new programming student, so please forgive my ignorance. My assignment
(Please forgive me in advance for any formatting errors, as this is the first
First off, I am not a Unix expert by any stretch, so please forgive
First, please forgive my bad english ;) I want to use the windows function
First, please forgive and point out if I am to use some other protocol
This is my first post, and first please forgive me for my poor english.
[please forgive formatting errors-- first post here and I tried earnestly to do it
This is my first post, so please forgive me if this question has been
I am very new to programming, so please forgive me if this question seems

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.