-
-
Save christiannagel/cfddfe878c9e24ceefdc8b95ebe2fd5d to your computer and use it in GitHub Desktop.
Access the UWP control from a XAML island
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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