Here we have a `Grid` with a `Button`. When the user clicks the button, a method in a Utility class is executed which forces the application to receive a click on Grid. The code flow must stop here and not continue until the user has clicked on the `Grid`.

I have had a similar question before here:

[Wait till user click C# WPF](https://stackoverflow.com/questions/60132125/wait-till-user-click-c-sharp-wpf)

In that question, I got an answer using async/await which works, but since I am going to use it as part of an API, I do not want to use async/await, since the consumers will have then to mark their methods with async which I do not want.

How do I write `Utility.PickPoint(Grid grid)` method to achieve this goal?

I saw this which may help but did not fully understood it to apply here to be honest:

[Blocking until an event completes](https://stackoverflow.com/questions/1523148/blocking-until-an-event-completes)

*Consider it as something like Console.ReadKey() method in a Console application. When we call this method, the code flow stops until we enter some value. The debugger does not continue until we enter something. I want the exact behavior for PickPoint() method. The code flow will stop until the user clicks on the Grid.*

```
<Window x:Class="WpfApp1.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:WpfApp1"
        mc:Ignorable="d"
        Title="MainWindow" Height="450" Width="800">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="3*"/>
            <RowDefinition Height="1*"/>
        </Grid.RowDefinitions>

        <Grid x:Name="View" Background="Green"/>
        <Button Grid.Row="1" Content="Pick" Click="ButtonBase_OnClick"/>
    </Grid>
</Window>

public partial class MainWindow : Window
{
    public MainWindow()
    {
        InitializeComponent();
    }

    private void ButtonBase_OnClick(object sender, RoutedEventArgs e)
    {
        // do not continue the code flow until the user has clicked on the grid. 
        // so when we debug, the code flow will literally stop here.
        var point = Utility.PickPoint(View);

        MessageBox.Show(point.ToString());
    }
}

public static class Utility
{
    public static Point PickPoint(Grid grid)
    {

    }
}

```