コード例 #1
0
ファイル: DrawingVisual.cs プロジェクト: beda2280/wpf-1
        /// <summary>
        /// GetDrawing - Returns the drawing content of this Visual.
        /// </summary>
        /// <remarks>
        /// Changes to this DrawingGroup will not be propagated to the Visual's content.
        /// This method is called by both the Drawing property, and VisualTreeHelper.GetDrawing()
        /// </remarks>
        internal override DrawingGroup GetDrawing()
        {
            // Need to determine if Visual.Drawing should return mutable content

            VerifyAPIReadOnly();

            DrawingGroup drawingGroupContent = null;

            // Convert our content to a DrawingGroup, if content exists
            if (_content != null)
            {
                drawingGroupContent = DrawingServices.DrawingGroupFromRenderData((RenderData)_content);
            }

            return(drawingGroupContent);
        }
コード例 #2
0
        /// <summary>
        /// GetDrawing - Returns the drawing content of this Visual.
        /// </summary>
        /// <remarks>
        /// Changes to this DrawingGroup will not be propagated to the Visual's content.
        /// This method is called by both the Drawing property, and VisualTreeHelper.GetDrawing()
        /// </remarks>
        internal override DrawingGroup GetDrawing()
        {
            //


            VerifyAPIReadOnly();

            DrawingGroup drawingGroupContent = null;

            // Convert our content to a DrawingGroup, if content exists
            if (_content != null)
            {
                drawingGroupContent = DrawingServices.DrawingGroupFromRenderData((RenderData)_content);
            }

            return(drawingGroupContent);
        }