简体   繁体   中英

WP8 - C# - Getting object value from Telerik RadPickerBox

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

this.NewPassword1.Password

乐意效劳!

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM