Ejemplo n.º 1
0
        public SearchMenuView(IntPtr nativeCallerPointer) : base(nativeCallerPointer)
        {
            MainWindow mainWindow = (MainWindow)Application.Current.MainWindow;

            mainWindow.MainGrid.Children.Add(this);

            Loaded += MainWindow_Loaded;
            mainWindow.SizeChanged += PerformLayout;

            m_searchInFlight    = false;
            m_hasResults        = false;
            m_hasCategorySearch = false;
            m_touchHandler      = new WindowInteractionTouchHandler(this, true, false, true);

            MouseEnter += (o, e) =>
            {
                mainWindow.PopAllMouseEvents();
                mainWindow.DisableInput();
            };

            MouseLeave += (o, e) => { mainWindow.EnableInput(); };
        }