Dependency Property Refactor

4 posts, 0 answers
  1. MiddleTommy
    MiddleTommy avatar
    163 posts
    Member since:
    Nov 2009

    Posted 04 Sep 2010 Link to this post

    Hey I just thought of a cool refactor
    I hate writing dependency properties. I always have to copy an existing on and make changes
    It would be nice if I could just write a regular property and then have a refactor to upgrade the property to a dependency property (if it is in a dependency object).

    or there is probably a code snippet out there somewhere I could use. but then I would have to remember what the snippet shortcut is. (man I am lazy with what I keep in my brain's cache)
  2. Ivo Bratoev
    Admin
    Ivo Bratoev avatar
    107 posts

    Posted 10 Sep 2010 Link to this post

    Hello Tommy,

    Thanks for your valuable feedback. Your suggestion makes a lot of sense and we added it to our product backlog. I also created a PITS issue for it where you can vote and follow its progress.
    Your help is much appreciated. I added 800 Telerik points to your account.

    Best wishes,
    Ivo Bratoev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft banner
  4. MiddleTommy
    MiddleTommy avatar
    163 posts
    Member since:
    Nov 2009

    Posted 27 Jun 2011 Link to this post

    This feature is the best. I love it.
    First
    It would be nice to have another refactor called "convert to dependency property with callback"
    And use the overload that uses the callback and default value. 
    Like:
    new PropertyMetadata(null,new PropertyChangedCallback(MyProperty_Changed))
    And also generate the XX_Changed method.
    Hey I am lazy.. I mean I could be more productive if you implemented this.

    Second
    When you are using this refactor on a double property it puts the default value of the dependency property to "0"
    The auto default should be "default(double)" or "0.0". The default() method should be called by the refactor or just put in the code.
    This will clear up any runtime errors caused by a default value that is not the correct type.
  5. Stefan Avramov
    Admin
    Stefan Avramov avatar
    41 posts

    Posted 30 Jun 2011 Link to this post

    Hello Middletommy,

     Thanks for the feedback. We logged your feature request. Also added a PITS item for your here. As for the issue you're having, we fixed that immediately since it is a small change and it will be included in our next major release. You also receive some Telerik Points.

    All the best,
    Stefan Avramov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top