Checking search buttons on click
Create a method:

private void DisplayError(String errorMessage) 
{
    // display any errors in the error window
    Error errorWindow = new Error();
    errorWindow.Show();
    errorWindow.errorMessage.Text = errorMessage;
}


Then you can do

private void searchButton_Click(object sender, RoutedEventArgs e)
{
    searchCriteria.Clear();
    searchCriteria.Add(townSearchTextbox.Text);
    searchCriteria.Add(countySearchTextbox.Text);
    searchCriteria.Add(postcodeSearchTextbox.Text);

    if (isValidSearchCriteria(searchCriteria))
    {
        formatSearchCriteria(searchCriteria);
        set.updateWOEID(searchCriteria);
        if (set.WOEID.Length &gt; 0)
        {
            // continue
        }
        else
        {
            DisplayError("Error: Could not retrieve WOEID, please try again.");
        }
    }
    else
    {
        DisplayError("Error: Please provide one or more search criteria.");
    }
}


Of course, the next step if you need it would be to use Exceptions instead.  Yes, I know this is for Java, but it shows why.