protected static bool HasFrame(ExportColumn exportColummn)
 {
     return exportColummn.DrawBorder;
 }
 protected static bool ShouldSetBackcolor(ExportColumn exportColumn)
 {
     return exportColumn.BackColor != Color.White;
 }
		void CreateUnderline(TextBlock textBlock,ExportColumn exportColumn)
		{
			var underLine = new TextDecoration();
			Pen p = CreateWpfPen(exportColumn);
			underLine.Pen = p ;
			underLine.PenThicknessUnit = TextDecorationUnit.FontRecommended;
			textBlock.TextDecorations.Add(underLine);
		}
		Pen CreateWpfPen(ExportColumn exportColumn)
		{
			var myPen = new Pen();
			myPen.Brush = ConvertBrush(exportColumn.ForeColor);
			myPen.Thickness = 1.5;
			return myPen;
		}
		static void SetPosition (FrameworkElement element,ExportColumn exportColumn) {
			FixedPage.SetLeft(element,exportColumn.Location.X );
			FixedPage.SetTop(element,exportColumn.Location.Y);
		}
		void CreateStrikeout (TextBlock textBlock,ExportColumn exportColumn )
		{
			var strikeOut = new TextDecoration();
			strikeOut.Location = TextDecorationLocation.Strikethrough;

			Pen p = CreateWpfPen(exportColumn);
			strikeOut.Pen = p ;
			strikeOut.PenThicknessUnit = TextDecorationUnit.FontRecommended;
			textBlock.TextDecorations.Add(strikeOut);
		}
		static void SetDimension (FrameworkElement element,ExportColumn exportColumn)
		{
			element.Width = exportColumn.DesiredSize.Width;
			element.Height = exportColumn.DesiredSize.Height;
		}
 static void SetPositionAndSize(FrameworkElement element,ExportColumn column)
 {
     if (column == null)
         throw new ArgumentNullException("column");
     SetPosition(element,column);
     SetDimension(element,column);
 }
		public abstract void Visit(ExportColumn exportColumn);
Exemple #10
0
		public override void Visit(ExportColumn exportColumn)
		{
//			Console.WriteLine("Wpf-Visit ExportColumn {0} - {1} - {2}", exportColumn.Name,exportColumn.Size,exportColumn.Location);
		}
Exemple #11
0
		public static Point LocationRelToParent (ExportColumn column) {
			return new Point(column.Parent.Location.X + column.Location.X,
			                 column.Parent.Location.Y + column.Location.Y);
		}