private async void Flyout_Opened(object sender, object e) { t_ipinput.Text = ""; b_connectflyout.IsEnabled = false; DataPackageView dataPackageView = Clipboard.GetContent(); b_pasteflyout.IsEnabled = dataPackageView.Contains(StandardDataFormats.Text) && HostNameProvider.IsIPv4(await dataPackageView.GetTextAsync()); }
private void t_ipinput_TextChanged(object sender, TextChangedEventArgs e) { if (HostNameProvider.IsIPv4(t_ipinput.Text)) { b_connectflyout.IsEnabled = true; } else { b_connectflyout.IsEnabled = false; } }