Esempio n. 1
0
 protected static bool HasFrame(ExportColumn exportColummn)
 {
     return exportColummn.DrawBorder;
 }
Esempio n. 2
0
 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);
 }
Esempio n. 9
0
		public abstract void Visit(ExportColumn exportColumn);
Esempio n. 10
0
		public override void Visit(ExportColumn exportColumn)
		{
//			Console.WriteLine("Wpf-Visit ExportColumn {0} - {1} - {2}", exportColumn.Name,exportColumn.Size,exportColumn.Location);
		}
Esempio n. 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);
		}