Example #1
0
 /// <summary>
 /// Call to indicate document request.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 public void InvokeDocumentRequest(object sender, DocumentRequestEventArgs e)
 {
     if (OnDocumentRequestEvent != null)
     {
         OnDocumentRequestEvent(sender, e);
     }
 }
        public PrintControl(DocumentRequestEventArgs args)
        {
            InitializeComponent();

            _args = args;

            PopulatePaperSizes();
            PopulateMargins();
            orientationCombo.SelectedIndex   = Settings.PrintOrientation;
            collationCombo.SelectedIndex     = Settings.PrintCollation;
            pagesPerSheetCombo.SelectedIndex = Settings.PrintPagesPerSheet;

            Loaded   += PrintControl_Loaded;
            Unloaded += PrintControl_Unloaded;
        }
Example #3
0
        private void Backstage_Loaded(object sender, RoutedEventArgs e)
        {
            _previouslyFocused = Keyboard.FocusedElement;
            Keyboard.ClearFocus();

            InputManager.Current.PreProcessInput += Current_PreProcessInput;
            infoButton.IsChecked = true;

            BackstageEvents.StaticUpdater.OnForceUpdateEvent += StaticUpdater_OnForceUpdateEvent;

            if (ActualWidth >= 550)
            {
                IsBgVisible = true;
                UpdateBackground(false);
            }
            else
            {
                IsBgVisible = false;
            }

            if (Settings.AnimationsEnabled)
            {
                clientGrid.IsHitTestVisible = false;

                DoubleAnimation clientGridTranslateAnim = new DoubleAnimation(-PART_ItemsStackPanel.ActualWidth, 0, AnimationHelpers.AnimationDuration, FillBehavior.Stop);
                clientGridTranslateAnim.EasingFunction = AnimationHelpers.EasingFunction;
                clientGridTranslateAnim.Completed     += (anim, args) =>
                {
                    clientGrid.IsHitTestVisible      = true;
                    PART_ScrollViewer.LayoutUpdated += PART_ScrollViewer_LayoutUpdated;
                };
                clientGridTranslate.BeginAnimation(TranslateTransform.XProperty, clientGridTranslateAnim);
            }
            else
            {
                PART_ScrollViewer.LayoutUpdated += PART_ScrollViewer_LayoutUpdated;
            }

            DocumentRequestEventArgs docArgs = new DocumentRequestEventArgs();

            BackstageEvents.StaticUpdater.InvokeDocumentRequest(this, docArgs);
            printButton.IsEnabled = docArgs.DatabaseObject != null;

            _docArgs = docArgs;
        }