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:
- Define your own
InputScopeProperty
on your customPasswordBox
. - Insert a
TextBox
into your custom control's control template. - Use a
TemplateBinding
to bind theTextBox
'sInputScope
to your customInputScope
.
What's preventing you from deriving from PasswordBox
? Your custom PasswordBox
should serve its single, specific purpose so this is something to consider.