I have a custom control is named WatermarkPasswordBox and I want to add InputScope property for using numeric virtual keyboard in WinRT, Win8. But it's base class is not Textbox, it's base class is Control. How can I do it?
Thanks.
In WPF you could add an owner to the InputScopeProperty
. But, of course, we're not using WPF here. Even if that were available, I'm not sure it alone would solve your problem anyway.
To answer your question:
InputScopeProperty
on your custom PasswordBox
.TextBox
into your custom control's control template.TemplateBinding
to bind the TextBox
's InputScope
to your custom InputScope
.What's preventing you from deriving from PasswordBox
? Your custom PasswordBox
should serve its single, specific purpose so this is something to consider.