Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Access the UWP control from a XAML island
private void OnHostChildChanged(object sender, EventArgs e)
{
if (sender is WindowsXamlHost host && host.Child is UWPControls.Button button)
{
button.Content = "My UWP Button";
button.Click += (sender1, e1) =>
{
MessageBox.Show("UWP button clicked");
};
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.