Button myButton = new Button(); myButton.SetValue(Button.ContentProperty, "Click Me");
TextBox myTextBox = new TextBox(); myTextBox.SetValue(TextBox.TextProperty, "Hello World");In this example, we create a new TextBox object and set its Text property value using the SetValue method. Package library: This method is a built-in part of the Windows Runtime and does not require any external package or library.