Unchangeable Dependency Property That Supports Binding RRS feed

  • Question

  • Hi guys,

    I need to have an dependency property in my custom control which holds an action and that dependency property may not be changed but I may set binding on it, no matter if onewaytosource or twoway, the value of the dp which is a specific ation may not be change or better said the property itself shall only give the action to source/viewmodel but may never be change.

    that is how i wish to pass an action<t>() value from control to viewmodel

    it is really imporant that the dp on the custom control which holds that action may never be changed and that only passes the action to viewmodel

    as example the property shall be so strongly unchangeable that even when I set the binding manually in code binding in the middle of runtime the property shall not be changed

    to sum up.. the property value may not be change but value shall be passed through binding to viewmodel no matter if user sets binding mode to twoway or onewaytosource.

    please no workaround by creating some attached property that shall observer or whatever

    any ideas guy how to solve this, how to have a dp on a control and keep it unchangeable and letting that dp pass the value only in the direction to viewmodel?

    Wednesday, June 12, 2013 4:06 PM

All replies

  • Hi Techy,

    I am trying to involve people who have more experience on this topic. Please be patient, we will back to give you more information soon when get further process on it.
    Thanks for your understanding!


    Lisa Zhu [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, June 14, 2013 5:55 AM
  • Ok. Thanks Lisa. That would be really nice.
    Friday, June 14, 2013 7:14 AM
  • Hi there,

    from your description, in short, you want your ViewModel to keep an stable action forever, like no changes to the viewmodel? You may share more background of your app...



    Wednesday, July 3, 2013 9:17 AM