Question

I am currently having an issue regarding this component. This is the xaml usage of it in my app:

<telerikPrimitives:RadPickerBox x:Name="box_change" Width="0">
    <StackPanel Background="White">
            <StackPanel Height="618">
                    <PasswordBox Name="NewPassword1" Padding="2,8,2,8" Margin="10,0,10,0" Style="{StaticResource PasswordBoxStyle}" />
        </StackPanel>
    </StackPanel>
</telerikPrimitives:RadPickerBox>

I am currently in need of retrieving, from my C# code, the value "password" of the field "NewPassword1", still I am unable to do that. I already tried retrieving it with something like this:

box_change.NewPassword1.Password

but, of course, else I wouldn't be asking this question right now, this way doesn't work.

What would you suggest to retrieve the value?

Thanks in advance,

Guido

Was it helpful?

Solution

this.NewPassword1.Password

Glad to help!

OTHER TIPS

Have you considered using Telerik's RadPasswordBox for WP8? It's optimized for passwords with masking characters and other features (and easily provides you with the password):

var userEnteredPassword = myPasswordBox.Password;

That being said, even though your PasswordBox is the child of two StackPanels, you can access the Password box in the same scope via NewPassword1. If you have more complex controls see the control's documentation on how to get the value of a child element.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top