Skip to content
This repository was archived by the owner on Oct 16, 2020. It is now read-only.

Commit c7c4344

Browse files
Wpf Border
1 parent 8a9884a commit c7c4344

2 files changed

Lines changed: 10 additions & 6 deletions

File tree

src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/DataManager/Listhandling/CollectionDataSource.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ string ReadValueFromProperty (string columnName) {
198198
var val = propertyPath.Evaluate(Current);
199199
return val.ToString();
200200
} catch (Exception e) {
201-
Console.WriteLine(" Cant' find <{0}",columnName);
201+
Console.WriteLine(" Cant' find <{0}>",columnName);
202202
// throw e;
203203
}
204204
return String.Empty;

src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Wpf/Visitor/WpfVisitor.cs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -176,13 +176,17 @@ static BitmapSource ToBitmapSource(System.Drawing.Image source){
176176

177177

178178
public override void Visit(ExportRectangle exportRectangle){
179-
Canvas containerCanvas = FixedDocumentCreator.CreateContainer(exportRectangle);
180-
Canvas elementCanvas = null;
179+
180+
var containerCanvas = FixedDocumentCreator.CreateContainer(exportRectangle);
181+
// leads to a small gap from Border to canvas
182+
containerCanvas.Width = containerCanvas.Width - ( 3 * exportRectangle.Thickness);
183+
containerCanvas.Height = containerCanvas.Height - (3 * exportRectangle.Thickness);
184+
181185
var border = CreateBorder(exportRectangle);
182186
border.CornerRadius = new CornerRadius(Convert.ToDouble(exportRectangle.CornerRadius));
183-
184187
CanvasHelper.SetPosition(border, new Point(0,0));
185188

189+
Canvas elementCanvas = null;
186190
foreach (var element in exportRectangle.ExportedItems) {
187191
if (IsGraphicsContainer(element)) {
188192
elementCanvas = RenderGraphicsContainer(element);
@@ -253,8 +257,8 @@ static Border CreateBorder(IExportColumn exportColumn){
253257
border.BorderThickness = Thickness(exportColumn);
254258
border.BorderBrush = FixedDocumentCreator.ConvertBrush(exportColumn.ForeColor);
255259
border.Background = FixedDocumentCreator.ConvertBrush(exportColumn.BackColor);
256-
border.Width = exportColumn.Size.Width + 2;
257-
border.Height = exportColumn.Size.Height + 2;
260+
border.Width = exportColumn.Size.Width;
261+
border.Height = exportColumn.Size.Height;
258262
return border;
259263
}
260264

0 commit comments

Comments
 (0)