/// <summary>
        /// Prints the selection.
        /// </summary>
        public virtual void Print()
        {
            ILayoutControllerView ControllerView = StateView.ControllerView;

            Debug.Assert(ControllerView.PrintContext != null);
            ControllerView.UpdateLayout();

            Debug.Assert(RegionHelper.IsValid(StateView.ActualCellSize));

            ILayoutTemplateSet TemplateSet = ControllerView.TemplateSet;
            IList <IFocusFrameSelectorList> SelectorStack = StateView.GetSelectorStack();
            ILayoutDiscreteFrame            Frame         = (ILayoutDiscreteFrame)TemplateSet.PropertyToFrame(StateView.State, PropertyName, SelectorStack);

            Debug.Assert(Frame != null);

            int Value = NodeTreeHelper.GetEnumValue(StateView.State.Node, PropertyName);

            Frame.Print(ControllerView.PrintContext, Value, Point.Origin);
        }
Exemple #2
0
        /// <summary>
        /// Prints the cell.
        /// </summary>
        /// <param name="origin">The origin from where to start printing.</param>
        public virtual void Print(Point origin)
        {
            Debug.Assert(StateView != null);
            Debug.Assert(StateView.ControllerView != null);

            ILayoutPrintContext PrintContext = StateView.ControllerView.PrintContext;

            Debug.Assert(PrintContext != null);

            ILayoutDiscreteFrame AsDiscreteFrame = KeywordFrame.ParentFrame as ILayoutDiscreteFrame;

            Debug.Assert(AsDiscreteFrame != null);

            Debug.Assert(RegionHelper.IsValid(ActualCellSize));

            origin = origin.Moved(CellOrigin.X, CellOrigin.Y);

            CollectionWithSeparator.PrintBeforeItem(PrintContext, ReferenceContainer, origin, ActualCellSize, CellPadding);
            AsDiscreteFrame.Print(PrintContext, this, origin, ActualCellSize, CellPadding);
            CollectionWithSeparator.PrintAfterItem(PrintContext, ReferenceContainer, origin, ActualCellSize, CellPadding);
        }