0

I am developing a web browser using C# and XAML.

I want to make system that when users enter texts or numbers other than the URL in a URL display form, the screen display remains the same, but only the inside of the form is automatically blanked out and ready to be reentered. I know that I need to add something to the code below, but I don't know how. Please help.

private void txtUrl_KeyUp(object sender, KeyEventArgs e)
    {
        if (e.Key == Key.Enter)
            wbSample.Navigate(txtUrl.Text);

    }
  • 2
    Be careful when selecting tags! Don't just type one letter and press enter, actually *check* what tags are selected. That way you won't use the C language tag by mistake, instead of the proper C# language tag. Please [edit] your question to fix it. – Some programmer dude Dec 14 '21 at 13:37
  • Does this answer help? https://stackoverflow.com/a/37051246/13515911 – Saplu Dec 14 '21 at 19:04

0 Answers0