Пример #1
0
        public void GoBackward(bool dialogReturnValue)
        {
            InternalWindow iw = null;

            foreach (ToolWindow window in this.content.OpenedWindows)
            {
                if (window.IsActive)
                {
                    iw = (InternalWindow)window;
                }
            }
            if (iw != null)
            {
                iw.GridContent.Children.RemoveAt(iw.GridContent.Children.Count - 1);
            }
            UIElement element = (UIElement)iw.GridContent.Children[iw.GridContent.Children.Count - 1];

            element.IsEnabled = true;

            BackNavigationEventHandler handler = backFunctions.Pop();

            if (handler != null)
            {
                handler(dialogReturnValue);
            }
        }
        void IModalService.NavigateTo(UserControl uc, BackNavigationEventHandler backFromDialog)
        {
            foreach (UIElement item in BaseModalGrid.Children)
            {
                item.IsEnabled = false;
            }
            BaseModalGrid.Children.Add(uc);

            _backFunctions.Push(backFromDialog);
        }
Пример #3
0
        void IModalService.NavigateTo(UserControl uc, BackNavigationEventHandler backFromDialog)
        {
            foreach (UIElement item in modalGrid.Children)
            {
                item.IsEnabled  = false;
                item.Visibility = System.Windows.Visibility.Collapsed;
            }
            modalGrid.Children.Add(uc);

            _backFunctions.Push(backFromDialog);
        }
        void IModalService.GoBackward(bool dialogReturnValue)
        {
            BaseModalGrid.Children.RemoveAt(BaseModalGrid.Children.Count - 1);

            UIElement element = BaseModalGrid.Children[BaseModalGrid.Children.Count - 1];

            element.IsEnabled = true;

            BackNavigationEventHandler handler = _backFunctions.Pop();

            if (handler != null)
            {
                handler(dialogReturnValue);
            }
        }
Пример #5
0
        void IModalService.GoBackward(bool dialogReturnValue)
        {
            DoubleAnimation da = new DoubleAnimation(1, TimeSpan.FromMilliseconds(400).Duration());

            LayoutRoot.BeginAnimation(Grid.OpacityProperty, da);
            LayoutRoot.IsHitTestVisible = true;
            //            modalGrid.Children.RemoveAt(modalGrid.Children.Count - 1);

            //UIElement element = modalGrid.Children[modalGrid.Children.Count - 1];
            //element.IsEnabled = true;

            BackNavigationEventHandler handler = _backFunctions.Pop();

            if (handler != null)
            {
                handler(dialogReturnValue);
            }
        }
Пример #6
0
        private void NavigateModal(UserControl uc, string title, BackNavigationEventHandler backFromDialog, bool allowClose)
        {
            DoubleAnimation da = new DoubleAnimation(0.5, TimeSpan.FromMilliseconds(400).Duration());

            da.BeginTime = TimeSpan.FromMilliseconds(400);
            LayoutRoot.BeginAnimation(Grid.OpacityProperty, da);
            LayoutRoot.IsHitTestVisible = false;

            SimulatedWindow sw = new SimulatedWindow();

            sw.HorizontalAlignment = System.Windows.HorizontalAlignment.Center;
            sw.VerticalAlignment   = System.Windows.VerticalAlignment.Center;
            sw.Title      = title;
            sw.AllowClose = allowClose;

            sw.WindowContent = uc;
            modalGrid.Children.Clear();
            modalGrid.Children.Add(sw);

            _backFunctions.Push(backFromDialog);
        }
Пример #7
0
        public void NavigateTo(object useCase, BackNavigationEventHandler backFromDialog)
        {
            InternalWindow iw = null;

            foreach (ToolWindow window in this.content.OpenedWindows)
            {
                if (window.IsActive)
                {
                    iw = (InternalWindow)window;
                }
            }
            if (iw != null)
            {
                foreach (UIElement item in iw.GridContent.Children)
                {
                    item.IsEnabled = false;
                }
            }

            iw.GridContent.Children.Add((UserControlBase)useCase);
            backFunctions.Push(backFromDialog);
        }
Пример #8
0
 void IModalService.NavigateTo(Window uc, BackNavigationEventHandler backFromDialog)
 {
 }
Пример #9
0
 void IModalService.NavigateTo(UserControl uc, BackNavigationEventHandler backFromDialog)
 {
 }
Пример #10
0
 void IModalService.NavigateTo(UserControl uc, BackNavigationEventHandler backFromDialog)
 {
     throw new NotImplementedException();
 }
Пример #11
0
        public void NavigateTo(object useCase, BackNavigationEventHandler backFromDialog)
        {
            InternalWindow iw = null;
            foreach (ToolWindow window in this.content.OpenedWindows)
            {
                if (window.IsActive)
                    iw = (InternalWindow)window;
            }
            if (iw != null)
            {
                foreach (UIElement item in iw.GridContent.Children)
                {
                    item.IsEnabled = false;
                }
            }

            iw.GridContent.Children.Add((UserControlBase)useCase);
            backFunctions.Push(backFromDialog);
        }
Пример #12
0
 public void NavigateTo(UserControl uc, BackNavigationEventHandler backFromDialog)
 {
     throw new NotImplementedException();
 }
Пример #13
0
 void IModalService.NavigateTo(UserControl uc, string title, BackNavigationEventHandler backFromDialog, bool allowClose)
 {
     NavigateModal(uc, title, backFromDialog, allowClose);
 }