本文整理汇总了C#中UILabel.Apply方法的典型用法代码示例。如果您正苦于以下问题:C# UILabel.Apply方法的具体用法?C# UILabel.Apply怎么用?C# UILabel.Apply使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UILabel
的用法示例。
在下文中一共展示了UILabel.Apply方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ProjectReportCell
public ProjectReportCell (IntPtr handle) : base (handle)
{
SelectionStyle = UITableViewCellSelectionStyle.None;
projectTitleLabel = new UILabel ();
projectTitleLabel.Apply (Style.ReportsView.ProjectCellTitleLabel);
ContentView.Add (projectTitleLabel);
timeLabel = new UILabel ();
timeLabel.Apply (Style.ReportsView.ProjectCellTimeLabel);
ContentView.Add (timeLabel);
circleView = new UIView ();
ContentView.Add (circleView);
NormalSelectionMode = false;
}
示例2: ReloadTableViewFooter
public ReloadTableViewFooter()
{
errorLabel = new UILabel ();
errorLabel.Text = "FooterErrorLoadingLabel".Tr ();
errorLabel.Apply (Style.Log.ReloadTableViewFooterLabel);
syncButton = UIButton.FromType (UIButtonType.System);
syncButton.Apply (Style.Log.ReloadTableViewFooterButton);
syncButton.SetTitle ("FooterTryAgainLabel".Tr (), UIControlState.Normal);
syncButton.TouchUpInside += (sender, e) => {
if (SyncButtonPressedHandler != null) {
SyncButtonPressedHandler.Invoke ();
}
};
Add (errorLabel);
Add (syncButton);
}
示例3: BarChartView
public BarChartView ()
{
ActivityList = new List<ReportActivity> ();
titleTimeLabel = new UILabel ();
titleTimeLabel.Text = "ReportsTotalLabel".Tr ();
titleTimeLabel.Apply (Style.ReportsView.BarCharLabelTitle );
Add (titleTimeLabel);
totalTimeLabel = new UILabel ();
totalTimeLabel.Apply (Style.ReportsView.BarCharLabelValue);
Add (totalTimeLabel);
titleMoneyLabel = new UILabel ();
titleMoneyLabel.Apply (Style.ReportsView.BarCharLabelTitle);
titleMoneyLabel.Text = "ReportsBillableLabel".Tr ();
Add (titleMoneyLabel);
moneyLabel = new UILabel ();
moneyLabel.Apply (Style.ReportsView.BarCharLabelValue );
Add (moneyLabel);
barChart = new BarChart () {
DataSource = this
};
Add (barChart);
noProjectTitleLabel = new UILabel ();
noProjectTitleLabel.Center = new CGPoint (barChart.Center.X, barChart.Center.Y - 20);
noProjectTitleLabel.Apply (Style.ReportsView.NoProjectTitle);
noProjectTitleLabel.Text = "ReportsLoadingTitle".Tr ();
Add (noProjectTitleLabel);
noProjectTextLabel = new UILabel ();
noProjectTextLabel.Center = new CGPoint (barChart.Center.X, barChart.Center.Y + 5 );
noProjectTextLabel.Apply (Style.ReportsView.DonutMoneyLabel);
noProjectTextLabel.Lines = 2;
noProjectTextLabel.Text = "ReportsLoadingText".Tr ();
Add (noProjectTextLabel);
}
示例4: CellDurationLabel
public static void CellDurationLabel (UILabel v)
{
v.Apply (TimeEntryCell.DurationLabel);
}
示例5: CellTaskLabel
public static void CellTaskLabel (UILabel v)
{
v.Apply (TimeEntryCell.TaskLabel);
}
示例6: CellClientLabel
public static void CellClientLabel (UILabel v)
{
v.Apply (TimeEntryCell.ClientLabel);
}
示例7: CellProjectLabel
public static void CellProjectLabel (UILabel v)
{
v.Apply (TimeEntryCell.ProjectLabel);
}
示例8: DonutChartView
public DonutChartView ()
{
TableProjectList = new List<ReportProject> ();
DonutProjectList = new List<ReportProject> ();
grayCircle = new UIView ();
grayCircle.Layer.AddSublayer (new CAShapeLayer () { FillColor = Color.DonutInactiveGray.CGColor});
Add (grayCircle);
donutChart = new XYDonutChart () {
PieRadius = pieRadius,
DonutLineStroke = lineStroke,
DataSource = this,
UserInteractionEnabled = true,
SelectedSliceStroke = 0,
ShowPercentage = false,
StartPieAngle = (nfloat)Math.PI * 3/2,
ShowLabel = false,
AnimationSpeed = 1.0f,
SelectedSliceOffsetRadius = 15f
};
Add (donutChart);
donutChart.DidSelectSliceAtIndex += (sender, e) => {
NormalSelectionMode = true;
var selectedProject = DonutProjectList [e.Index];
var idx = TableProjectList.FindIndex (p => AreEquals ( p, selectedProject));
projectTableView.SelectRow (NSIndexPath.FromRowSection (idx, 0), true, UITableViewScrollPosition.Top);
((ProjectListSource)projectTableView.Source).LastSelectedIndex = idx;
SetProjectInfo (selectedProject);
};
donutChart.DidDeselectSliceAtIndex += (sender, e) => {
var selectedProject = DonutProjectList [e.Index];
var idx = TableProjectList.FindIndex (p => AreEquals ( p, selectedProject));
projectTableView.DeselectRow (NSIndexPath.FromRowSection (idx, 0), true);
};
donutChart.DidDeselectAllSlices += (sender, e) => DeselectAllProjects ();
projectTableView = new UITableView ();
projectTableView.RegisterClassForCellReuse (typeof (ProjectReportCell), ProjectReportCell.ProjectReportCellId);
projectTableView.Source = new ProjectListSource (this);
projectTableView.RowHeight = 40f;
projectTableView.TableFooterView = new UIView ();
var insets = projectTableView.ScrollIndicatorInsets;
insets.Right -= 3.0f;
projectTableView.ScrollIndicatorInsets = insets;
Add (projectTableView);
totalTimeLabel = new UILabel ();
totalTimeLabel.Apply (Style.ReportsView.DonutTimeLabel);
Add (totalTimeLabel);
moneyLabel = new UILabel ();
moneyLabel.Apply (Style.ReportsView.DonutMoneyLabel);
Add (moneyLabel);
noProjectTitleLabel = new UILabel ();
noProjectTitleLabel.Apply (Style.ReportsView.NoProjectTitle);
noProjectTitleLabel.Text = "ReportsLoadingTitle".Tr ();
Add (noProjectTitleLabel);
noProjectTextLabel = new UILabel ();
noProjectTextLabel.Apply (Style.ReportsView.DonutMoneyLabel);
noProjectTextLabel.Lines = 2;
noProjectTextLabel.Text = "ReportsLoadingText".Tr ();
Add (noProjectTextLabel);
topBoder = new UIView ();
bottomBoder = new UIView ();
Add (topBoder);
Add (bottomBoder);
projectTableView.Alpha = 0;
moneyLabel.Alpha = 0;
totalTimeLabel.Alpha = 0;
}