本文整理汇总了C#中Style.Create方法的典型用法代码示例。如果您正苦于以下问题:C# Style.Create方法的具体用法?C# Style.Create怎么用?C# Style.Create使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Style
的用法示例。
在下文中一共展示了Style.Create方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateTextbox
private Rdl.TextboxType CreateTextbox(string fieldName,bool hidden)
{
Textbox box = new Textbox();
var style = new Style
{
FontSize = "9pt",
FontWeight = "Bold",
FontFamily = "宋体"
};
box.Paragraphs = Common.Report.RdlGenerator.CreateParagraphs(fieldName, style.Create());
if (hidden)
{
box.Visibility = new Visibility() { Hidden = "true" }.Create();
}
box.Style = new Style
{
Border = new Border { Style = "Solid" }.Create()
}.Create();
box.CanGrow = true;
string name = "Header_" + Seed;
Seed++;
return box.Create(name);
}
示例2: CreateHeaderTableCellTextbox
private Rdl.TextboxType CreateHeaderTableCellTextbox(string fieldName)
{
Textbox box = new Textbox();
var style=new Style
{
FontSize = "9pt",
FontWeight = "Bold",
FontFamily="����"
};
box.Paragraphs = RdlGenerator.CreateParagraphs(fieldName, style.Create());
box.Style = new Style
{
Border = new Border { Style = "Solid" }.Create()
}.Create();
box.CanGrow = true;
return box.Create(m_fields[fieldName] + "_Header");
}
示例3: CreatPageFooter
//����ҳ��
private PageSectionType CreatPageFooter()
{
Style style = new Style();
Textbox ctb = new Textbox();
string height = "0.65cm";
string top = "0mm";
ArrayList Items = new ArrayList();
style.FontSize = "9pt";
style.TextAlign = "Left";
ctb.Width = ((A4Width - LeftMargin - RightMargin) / 2).ToString() + "mm";
ctb.Height = "0.63cm";
ctb.Paragraphs = CreateParagraphs(PageFooterLeftText,style.Create());
ctb.Style = style.Create();
ctb.CanGrow = true;
ctb.Left = LeftMargin.ToString() + "mm";
TextboxType headerLeftTextbox = ctb.Create("Page_FooterLeftText");
if (!string.IsNullOrEmpty(this.PageFooterLeftText))
{
Items.Add(headerLeftTextbox);
height = "1.1cm";
top = "0.6cm";
}
style.TextAlign = "Right";
ctb.Style = style.Create();
ctb.Left = ((A4Width) / 2).ToString() + "mm";
ctb.Paragraphs = CreateParagraphs(PageFooterRightText, style.Create());
TextboxType headerRightTextbox = ctb.Create("Page_FooterRightText");
if (!string.IsNullOrEmpty(this.PageFooterRightText))
{
Items.Add(headerRightTextbox);
height = "1.1cm";
top = "0.6cm";
}
style.TextAlign = "Center";
ctb = new Textbox
{
Top = top,
Height = "0.6cm",
Left = LeftMargin.ToString() + "mm",
Width = (A4Width - LeftMargin - RightMargin).ToString() + "mm",
Paragraphs = CreateParagraphs(string.Format("=" + pageFooterText, "Globals!PageNumber", "Globals!TotalPages"), style.Create()),
//Value = string.Format("=" + pageFooterText, "Globals!PageNumber", "Globals!TotalPages"),
Style = style.Create()
};
TextboxType headerTextbox = ctb.Create("Page_FooterText");
Items.Add(headerTextbox);
ReportItemsType reportItems = new ReportItemsType();
reportItems.Items = Items.ToArray();
PageSection header = new PageSection();
header.ReportItems = reportItems;
header.Height = height;
header.PrintOnFirstPage = true;
header.PrintOnLastPage = true;
return header.Create();
}
示例4: CreatPageFooter
//创建页脚
private PageSectionType CreatPageFooter()
{
string height = "0.65cm";
string top = "0mm";
var items = new ArrayList();
var style = new Style {FontSize = "9pt", TextAlign = "Left"};
var ctb = new Textbox
{
Width = ((A4Width - LeftMargin - RightMargin)/2) + "mm",
Height = "0.63cm",
Paragraphs = CreateParagraphs(PageFooterLeftText, style.Create()),
Style = style.Create(),
CanGrow = true,
Left = LeftMargin + "mm"
};
TextboxType headerLeftTextbox = ctb.Create("Page_FooterLeftText");
if (!string.IsNullOrEmpty(PageFooterLeftText))
{
items.Add(headerLeftTextbox);
height = "1.1cm";
top = "0.6cm";
}
style.TextAlign = "Right";
ctb.Style = style.Create();
ctb.Left = ((A4Width) / 2) + "mm";
ctb.Paragraphs = CreateParagraphs(PageFooterRightText, style.Create());
TextboxType headerRightTextbox = ctb.Create("Page_FooterRightText");
if (!string.IsNullOrEmpty(PageFooterRightText))
{
items.Add(headerRightTextbox);
height = "1.1cm";
top = "0.6cm";
}
style.TextAlign = "Center";
ctb = new Textbox
{
Top = top,
Height = "0.6cm",
//Left = LeftMargin + "mm",
Width = (A4Width - LeftMargin - RightMargin) + "mm",
Paragraphs = CreateParagraphs(string.Format("=" + _pageFooterText, "Globals!PageNumber", "Globals!TotalPages"), style.Create()),
//Value = string.Format("=" + pageFooterText, "Globals!PageNumber", "Globals!TotalPages"),
Style = style.Create()
};
TextboxType headerTextbox = ctb.Create("Page_FooterText");
items.Add(headerTextbox);
var reportItems = new ReportItemsType { Items = items.ToArray() };
var header = new PageSection
{
ReportItems = reportItems,
Height = height,
PrintOnFirstPage = true,
PrintOnLastPage = true
};
return header.Create();
}
示例5: createStyle
StyleType createStyle(string textAlign)
{
Style style = new Style
{
FontSize = "12pt",
FontWeight = "Bold",
TextAlign = "Center"
};
return style.Create();
}