Exemplo n.º 1
0
        private void OnAnimCompleted(object sender, EventArgs e)
        {
            m_isAnimating = false;

            if (m_openState == MENU_CLOSING)
            {
                m_closeMenuIconAnim.Completed -= OnAnimCompleted;
                m_openState = MENU_CLOSED;

                MenuViewCLIMethods.ViewCloseCompleted(m_nativeCallerPointer);
                m_mainWindow.EnableInput();

                m_isOffScreen = false;
            }
            else if (m_openState == MENU_OPENING)
            {
                m_openSearchIconAnim.Completed -= OnAnimCompleted;
                m_openState = MENU_OPEN;

                MenuViewCLIMethods.ViewOpenCompleted(m_nativeCallerPointer);

                m_isOffScreen = false;
            }
            else if (m_openState == MENU_OFFSCREENING)
            {
                m_openState   = MENU_OFFSCREEN;
                m_isOffScreen = true;
            }

            if (m_animationCompleteCallback != null)
            {
                m_animationCompleteCallback(sender, e);
            }
        }
Exemplo n.º 2
0
        protected void OnDragTabMouseClick(object sender, MouseButtonEventArgs e)
        {
            if (IsAnimating())
            {
                return;
            }

            MenuViewCLIMethods.ViewClicked(m_nativeCallerPointer);
        }
        private void OnSelectionChanged(object sender, MouseEventArgs e)
        {
            if (IsAnimating() || m_adapter.IsAnimating())
            {
                (sender as ListBox).SelectedItem = null;
                return;
            }

            var item = m_list.SelectedItem as MenuListItem;

            if (item != null)
            {
                var sectionChildIndices = m_adapter.GetSectionAndChildIndicesFromSelection(m_list.SelectedIndex);
                MenuViewCLIMethods.SelectedItem(m_nativeCallerPointer, sectionChildIndices.Item1, sectionChildIndices.Item2);
            }
        }
Exemplo n.º 4
0
        private void OnMenuListItemSelected(object sender, MouseEventArgs e)
        {
            if (m_searchInFlight || IsAnimating() || m_adapter.IsAnimating())
            {
                (sender as ListBox).SelectedItem = null;
                return;
            }

            var item = m_list.SelectedItem as MenuListItem;

            if (item != null)
            {
                var sectionChildIndices = m_adapter.GetSectionAndChildIndicesFromSelection(m_list.SelectedIndex);

                if (item.IsExpandable)
                {
                    SearchMenuViewCLIMethods.OnSearchCleared(m_nativeCallerPointer);
                }

                MenuViewCLIMethods.SelectedItem(m_nativeCallerPointer, sectionChildIndices.Item1, sectionChildIndices.Item2);
            }
        }
 private void OnIconClick(object sender, RoutedEventArgs e)
 {
     MenuViewCLIMethods.ViewClicked(m_nativeCallerPointer);
 }