Q:

How to make touch detect while excluding some area?

I want to detect touch in the screen, and then trigger some actions. But I need to exclude some area, e,g. a flipview window. That means inside of the flipview window, no touch detect, only flip action works.
With below code, it will detect the touch action in the whole screen. But this is not what I want.
Windows.UI.Input.GestureRecognizer gr = new Windows.UI.Input.GestureRecognizer();
this.PointerPressed += MainPage_PointerPressed;

        void MainPage_PointerPressed(object sender, PointerRoutedEventArgs e)
        {
            var ps = e.GetIntermediatePoints(null);
            if (ps != null && ps.Count > 0)
            {
                gr.ProcessDownEvent(ps[0]);
                e.Handled = true;
            }

            my_action();
        }

A:

How to make touch detect while excluding some area?

The PointerPressed event will bubble down through the FlipView to Page. If you don't handle this event in FlipView, and the page will catch PointerPressed finally. For your requirement, you need to handle FlipView PointerPressed before bubbling.
public TestPage()
{
    this.InitializeComponent();
    this.PointerPressed += TestPage_PointerPressed;
    FFlipView.PointerPressed += FFlipView_PointerPressed;
}

private void FFlipView_PointerPressed(object sender, PointerRoutedEventArgs e)
{
    e.Handled = true;
}

private void TestPage_PointerPressed(object sender, PointerRoutedEventArgs e)
{

}

