本文整理汇总了C#中System.Drawing.RectangleF.Integral方法的典型用法代码示例。如果您正苦于以下问题:C# RectangleF.Integral方法的具体用法?C# RectangleF.Integral怎么用?C# RectangleF.Integral使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Drawing.RectangleF
的用法示例。
在下文中一共展示了RectangleF.Integral方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HelpView
public HelpView (RectangleF frame): base(frame)
{
BackgroundColor = UIColor.Clear;
Layer.CornerRadius = 8;
var closeFrame = new RectangleF (20, frame.Size.Height - 140, 80, 80);
var closeView = new SymbolMarkView (closeFrame);
closeView.TouchUpInside += async (s, e) => await Hide ();
AddSubview (closeView);
closeView.Symbol = "X";
closeView.AccessibilityLabel = "Close";
var label = new UILabel (new RectangleF (0, 20, frame.Size.Width, 40));
label.Font = UIFont.FromName ("HelveticaNeue-Italic", 82);
label.Text = "NSZombieApocalypse";
label.BackgroundColor = UIColor.Clear;
label.TextAlignment = UITextAlignment.Center;
label.SizeToFit ();
var labelFrame = label.Frame;
labelFrame.X = (frame.Size.Width - labelFrame.Size.Width) / 2;
label.Frame = labelFrame;
AddSubview (label);
label.AccessibilityTraits = UIAccessibilityTrait.Header;
var nextFrame = new RectangleF (frame.Size.Width - 100, frame.Size.Height - 140, 80, 80);
nextButton = new SymbolMarkView (nextFrame);
nextButton.TouchUpInside += (s, e) => NextSlide ();
AddSubview (nextButton);
nextButton.Symbol = "->";
nextButton.AccessibilityLabel = "Next";
float width = frame.Size.Width * 0.6f;
var textViewFrame = new RectangleF (
200 + ((frame.Size.Width - 200) - width) / 2,
label.Frame.GetMaxY () + 30,
width,
frame.Size.Height * 0.6f
);
textView = new UITextView (textViewFrame.Integral ());
AddSubview (textView);
textView.Editable = false;
textView.Font = UIFont.FromName ("HelveticaNeue", 36);
textView.Text = NSBundle.MainBundle.LocalizedString ("helpText1", null, "Strings");
var imageView = new UIImageView (UIImage.FromBundle ("smaller-zombie1.png"));
var imageFrame = new RectangleF (label.Frame.X - 20, textViewFrame.Y, imageView.Frame.Width, imageView.Frame.Height);
imageView.Frame = imageFrame;
AddSubview (imageView);
imageView.IsAccessibilityElement = true;
imageView.AccessibilityLabel = "Poorly drawn, yet oddly menancing, zombie";
}
示例2: LayoutSubviews
public override void LayoutSubviews ()
{
RectangleF frame = Bounds;
var newFrame = new RectangleF (Bounds.X, frame.Size.Height - 20, Bounds.Width, 20);
labelView.Frame = newFrame.Integral ();
RectangleF imageFrame = imageView.Frame;
imageFrame.X = (newFrame.Size.Width - imageFrame.Size.Width) / 2;
imageView.Frame = imageFrame.Integral ();
}
示例3: LayoutSubviews
public override void LayoutSubviews ()
{
UIView[] subviews = this.Subviews;
int count = 0;
RectangleF bounds = Bounds;
SizeF buttonSize = ButtonView.ButtonSize;
float xPad = (bounds.Size.Width - (buttonSize.Width * 3)) / 4;
float yPad = (bounds.Size.Height - (buttonSize.Height * 2)) / 3;
float x = xPad, y = 5;
foreach (var subview in subviews) {
if (count > 0 && count % 3 == 0) {
x = xPad;
y += buttonSize.Height + yPad;
}
count++;
var frame = new RectangleF (x, y, buttonSize.Width, buttonSize.Height);
subview.Frame = frame.Integral ();
x += buttonSize.Width + xPad;
}
}