Use SecureString as PropertyType

3 posts, 1 answers
  1. Richard
    Richard avatar
    9 posts
    Member since:
    Aug 2012

    Posted 16 Sep 2015 Link to this post

    Hi,

    I must use a SecureString as a property type. Is it possible to edit the value in the PropertyGrid? How can I achieve this?

    I already tried to get the value in the EditEnded event and tried to convert it on my own, but I do not get the value, it is null.

    Thanks for your replies.

  2. Answer
    Stefan X1
    Admin
    Stefan X1 avatar
    521 posts

    Posted 18 Sep 2015 Link to this post

    Hi Richard,

    In order to fire EditEnded event of RadPropertyGrid and get the edited value, you need to set the EditMode of the control to single. PropertyGridEditEndedEventArgs expose a NewValue property which you can use to get the new input from the user. However, this property is read only so you will not be able to modify its value.

    For this case, I suggest you applying IValueConverter to the Binding of the needed PropertyDefinition and modify the user input in the ConvertBack method.

    Does this approach fit your requirements?

    Regards,
    Stefan X1
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
  3. UI for WPF is Visual Studio 2017 Ready
  4. Richard
    Richard avatar
    9 posts
    Member since:
    Aug 2012

    Posted 06 Nov 2015 in reply to Stefan X1 Link to this post

    Yes, I did it with an IValueConverter.

    Thank you.

Back to Top