This repository was archived by the owner on Oct 16, 2020. It is now read-only.
File tree Expand file tree Collapse file tree
src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Wpf/Visitor Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -75,15 +75,16 @@ public static FormattedText CreateFormattedText(ExportText exportText)
7575
7676 formattedText . MaxTextWidth = exportText . DesiredSize . Width ;
7777 formattedText . TextAlignment = exportText . TextAlignment ;
78-
78+ // var s = formattedText.Height;
7979 if ( ! exportText . CanGrow ) {
8080 formattedText . MaxTextHeight = exportText . Size . Height ;
81- } else {
82- formattedText . MaxTextHeight = ExtensionMethodes . ToPoints ( exportText . DesiredSize . Height ) ;
83- }
81+ }
82+ //
83+ // else {
84+ //// formattedText.MaxTextHeight = ExtensionMethodes.ToPoints(exportText.DesiredSize.Height );
85+ // }
8486
8587 ApplyPrintStyles ( formattedText , exportText ) ;
86-
8788 return formattedText ;
8889 }
8990
Original file line number Diff line number Diff line change @@ -118,15 +118,17 @@ Canvas RenderGraphicsContainer(IExportColumn column){
118118// http://stackoverflow.com/questions/25308612/vertical-alignment-with-drawingcontext-drawtext
119119
120120 public override void Visit ( ExportText exportColumn ) {
121-
121+ if ( exportColumn . Text . Equals ( "BaseTextItem2147483637" ) ) {
122+ Console . WriteLine ( "stop" ) ;
123+ }
122124 var formattedText = FixedDocumentCreator . CreateFormattedText ( ( ExportText ) exportColumn ) ;
123-
124125 var location = new Point ( exportColumn . Location . X , exportColumn . Location . Y ) ;
125-
126126 var visual = new DrawingVisual ( ) ;
127+
127128 using ( var drawingContext = visual . RenderOpen ( ) ) {
128- var bachgroundRect = new Rect ( location , new Size ( exportColumn . DesiredSize . Width , formattedText . MaxTextHeight ) ) ;
129+ // var bachgroundRect = new Rect(location,new Size(exportColumn.DesiredSize.Width,formattedText.Height ));
129130 if ( ShouldSetBackcolor ( exportColumn ) ) {
131+ var bachgroundRect = new Rect ( location , new Size ( exportColumn . DesiredSize . Width , formattedText . Height ) ) ;
130132 drawingContext . DrawRectangle ( FixedDocumentCreator . ConvertBrush ( exportColumn . BackColor ) , null , bachgroundRect ) ;
131133 }
132134
You can’t perform that action at this time.
0 commit comments