本文整理汇总了C#中Padding类的典型用法代码示例。如果您正苦于以下问题:C# Padding类的具体用法?C# Padding怎么用?C# Padding使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Padding类属于命名空间,在下文中一共展示了Padding类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Value
public Value(GLib.GType gtype)
{
type = IntPtr.Zero;
pad1 = new Padding ();
pad2 = new Padding ();
g_value_init (ref this, gtype.Val);
}
示例2: TabPagePrivateChatServer
//Constactor
public TabPagePrivateChatServer(string clientName, string clientNamePrivate)
{
ClientName = clientName;
ClientNamePrivate = clientNamePrivate;
// RchTxtPrivChat
_RichTextPrivChtServer.BackColor = Color.White;
_RichTextPrivChtServer.ForeColor = Color.Black;
_RichTextPrivChtServer.Location = new Point(0, 3);
_RichTextPrivChtServer.Name = clientName + " - " + clientNamePrivate + "TabPagePrivateChatServer";
_RichTextPrivChtServer.ReadOnly = true;
_RichTextPrivChtServer.ScrollBars = RichTextBoxScrollBars.Vertical;
_RichTextPrivChtServer.Size = new Size(541, 312);
_RichTextPrivChtServer.TabIndex = 12;
_RichTextPrivChtServer.Text = "";
_RichTextPrivChtServer.TextChanged += RichTextPrivChtServerTextChanged;
// TabPagePrivateChat
Controls.Add(_RichTextPrivChtServer);
Location = new Point(4, 28);
Name = ClientName + " - " + ClientNamePrivate;
Padding = new Padding(3);
Size = new Size(541, 402);
//this.TabIndex = 1;//mke it more accurate
Text = ClientName + " - " + ClientNamePrivate;
UseVisualStyleBackColor = true;
//PrivateReceivedMessageEvent += TabPagePrivateReceivedReceivedMessage;
}
示例3: CreateWithGlow
public static ThemedText CreateWithGlow(Graphics g, string text, Font font, Padding internalBounds,
Rectangle bounds, Color color, TextFormatFlags formatFlags, int glowSize) {
return Create(g, text, font, internalBounds, bounds, color, formatFlags,
new IThemeTextOption[] { new GlowOption(glowSize) }
);
}
示例4: InitParent
public void InitParent(Control control, Padding padding)
{
base.Parent = control.Parent;
int childIndex = control.Parent.Controls.GetChildIndex(control);
control.Parent.Controls.SetChildIndex(this, childIndex);
base.Bounds = new Rectangle(control.Left - padding.Left, control.Top - padding.Top, (control.Size.Width + padding.Left) + padding.Right, (control.Size.Height + padding.Top) + padding.Bottom);
}
示例5: ButtonBar
/// <summary>
/// Initializes a new instance of the <see cref="ButtonBar"/> class.
/// </summary>
public ButtonBar()
{
TabStop = true;
Padding = new Padding(3, 3, 3, 3);
SetStyle(ControlStyles.AllPaintingInWmPaint, true);
SetStyle(ControlStyles.UserPaint, true);
SetStyle(ControlStyles.DoubleBuffer, true);
SetStyle(ControlStyles.ResizeRedraw, true);
SetStyle(ControlStyles.Selectable, true);
SetStyle(ControlStyles.SupportsTransparentBackColor, true);
BackColor = Color.Transparent;
items = new GenericCollection<BarItem>();
items.Inserted += OnItemsInserted;
items.Removed += OnItemsRemoved;
items.Changed += OnItemsChanged;
items.Inserting += OnItemsInserting;
items.Changing += OnItemsChanging;
items.Removing += OnItemsRemoving;
items.Clearing += OnItemsClearing;
toolTip = new ToolTip();
appearance = new Appearance();
appearance.AppearanceChanged += OnAppearanceChanged;
currentAppearance = new Appearance();
themeProperty = new ThemeProperty();
themeProperty.ThemeChanged += OnAppearanceChanged;
showScroll = false;
useMnemonic = true;
showBorders = true;
Height = 200;
InitializeDefaultScheme();
SetThemeDefaults();
}
示例6: restoreMaxiState
public void restoreMaxiState()
{
mini = false;
// Maxi form settings
Padding = new Padding(2, 24, 2, 2);
if (GPMBrowser != null)
{
GPMBrowser.SetZoomLevel(0);
}
FormBorderStyle = FormBorderStyle.Sizable;
MaximumSize = new Size();
// Force it to be always bigger than the mini player
MinimumSize = new Size(301, 301);
MaximizeBox = true;
handleZoom = false;
// Restore Maxi size and pos
Size savedSize = Properties.Settings.Default.MaxiSize;
Point savedPoint = Properties.Settings.Default.MaxiPoint;
if (savedSize.Height == -1 && savedSize.Width == -1)
{
savedSize = new Size(1080, 720);
}
savedPoint = (onScreen(savedPoint) ? savedPoint : new Point(-1, -1));
if (savedPoint.X == -1 && savedPoint.Y == -1)
{
savedPoint = topLeft(savedSize);
}
Location = savedPoint;
FormBorderStyle = FormBorderStyle.None;
Size = savedSize;
FormBorderStyle = FormBorderStyle.Sizable;
}
开发者ID:hexlator,项目名称:Google-Play-Music-Desktop-Player-UNOFFICIAL-,代码行数:33,代码来源:CoreMusicApp.States.cs
示例7: DraggableUserControl
public DraggableUserControl()
{
//Font = new Font("Arial", 10);
this.InitializeComponent();
Margin = new Padding(0);
AllowDrag = true;
}
示例8: DarkToolStrip
public DarkToolStrip()
{
Renderer = new DarkToolStripRenderer();
Padding = new Padding(5, 0, 1, 0);
AutoSize = false;
Size = new Size(1, 28);
}
示例9: MaterialFlatButton
public MaterialFlatButton()
{
Primary = false;
animationManager = new AnimationManager(false)
{
Increment = 0.03,
AnimationType = AnimationType.EaseOut
};
hoverAnimationManager = new AnimationManager
{
Increment = 0.07,
AnimationType = AnimationType.Linear
};
hoverAnimationManager.OnAnimationProgress += sender => Invalidate();
animationManager.OnAnimationProgress += sender => Invalidate();
AutoSizeMode = AutoSizeMode.GrowAndShrink;
AutoSize = true;
UseActive = true;
Active = false;
Margin = new Padding(4, 6, 4, 6);
Padding = new Padding(0);
}
示例10: flatButton
public flatButton() {
Font = SystemFonts.MessageBoxFont;
Padding = new Padding(6);
_buttonState = buttonStates.Normal;
DoubleBuffered = true;
TextAlign = ContentAlignment.MiddleCenter;
}
示例11: CustomListItem
public CustomListItem(object tag, Font font, Color fore, Padding padding)
{
Tag = tag;
Font = font;
ForeColor = fore;
itemBorder = padding;
}
示例12: OnLayout
/// <summary>
/// See <see cref="Control.OnLayout"/>
/// </summary>
protected override void OnLayout(LayoutEventArgs e)
{
base.OnLayout(e);
_caption.Width = Width - 2;
Padding = new Padding(1, _caption.Height + 2, 1, 1);
_caption.Top = 1;
}
示例13: restoreMiniState
public void restoreMiniState()
{
int ratioX = MaterialSkin.Utilities.DPIMath.ratioX(this);
int ratioY = MaterialSkin.Utilities.DPIMath.ratioY(this);
mini = true;
// Mini form settings
Padding = new Padding(2 * ratioX, 2 * ratioY, 2 * ratioX, 2 * ratioY);
ClientSize = new Size(300 * ratioX, 300 * ratioY);
MaximizeBox = false;
MaximumSize = new Size(300 * ratioX, 300 * ratioY);
MinimumSize = new Size(100 * ratioX, 100 * ratioY);
handleZoom = true;
FormBorderStyle = FormBorderStyle.None;
// Restore Mini size and pos
Size savedSize = Properties.Settings.Default.MiniSize;
Point savedPoint = Properties.Settings.Default.MiniPoint;
savedPoint = (onScreen(savedPoint) ? savedPoint : new Point(-1, -1));
if (savedSize.Height == -1 && savedSize.Width == -1)
{
savedSize = new Size(300 * ratioX, 300 * ratioY);
}
if (savedPoint.X == -1 && savedPoint.Y == -1)
{
savedPoint = topLeft(savedSize);
}
Location = savedPoint;
Size = savedSize;
setZoomRatio();
TopMost = Properties.Settings.Default.MiniAlwaysOnTop;
}
开发者ID:ananthonline,项目名称:Google-Play-Music-Desktop-Player-UNOFFICIAL-,代码行数:32,代码来源:CoreMusicApp.States.cs
示例14: BottomBar
public BottomBar()
{
Button1 = new Button();
Button1.Click += Button1_Click;
Button1.TabIndex = 1;
Controls.Add(Button1);
Button2 = new Button();
Button2.Click += Button2_Click;
Button2.TabIndex = 2;
Controls.Add(Button2);
Button3 = new Button();
Button3.Click += Button3_Click;
Button3.TabIndex = 3;
Controls.Add(Button3);
Button4 = new Button();
Button4.Click += Button4_Click;
Button4.TabIndex = 4;
Controls.Add(Button4);
SizeChanged += OnSizeChanged;
MarginChanged += OnMarginChanged;
Dock = DockStyle.Bottom;
BackColor = Color.AliceBlue;
Margin = new Padding(10);
Font = new Font("Verdana", 9F, FontStyle.Regular);
ButtonBarButtons = BottomBarButtons.UserDefined;
ButtonWidth = 90;
ButtonHeight = 25;
}
示例15: FileBrowserItem
public FileBrowserItem(ItemType tp, string path, Bitmap img, FileBrowser parent)
{
Type = tp;
FullPath = path;
Owner = parent;
Margin = new Padding(0);
FullImage = img; // FullImage - contains image in natural size.
BackgroundImageLayout = ImageLayout.None;
Click += ClickEvent;
MouseEnter += OnMouseEnter;
MouseLeave += OnMouseLeave;
Text = new Label
{
Parent = this,
AutoSize = false,
AutoEllipsis = true
};
SetVariables(img, parent);
Text.BackColor = Color.Transparent;
if (Type == ItemType.Folder || Type == ItemType.File)
Text.Text = Path.GetFileName(path);
if (Type == ItemType.Drive)
Text.Text = FullPath;
Text.BringToFront();
Text.Click += ClickEvent;
Text.MouseEnter += OnMouseEnter;
Text.MouseLeave += OnMouseLeave;
}