How do I make my controls inside a UserControl private?

You can use the x:FieldModifier attribute on your controls, thusly:

<TextBox x:Name="textBox1" x:FieldModifier="private" />

Interestingly the MSDN page for x:FieldModifier doesn’t give “private” as a valid value for the attribute, but I’ve tested it and it works.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)