本文整理汇总了C#中Padding类的典型用法代码示例。如果您正苦于以下问题:C# Padding类的具体用法?C# Padding怎么用?C# Padding使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Padding类属于命名空间,在下文中一共展示了Padding类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Value
public Value(GLib.GType gtype)
{
type = IntPtr.Zero;
pad1 = new Padding ();
pad2 = new Padding ();
g_value_init (ref this, gtype.Val);
}
开发者ID:saraa,项目名称:fishtastic,代码行数:7,代码来源:Value.cs
示例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;
}
开发者ID:alentor,项目名称:MeowChat,代码行数:27,代码来源:TabPagePrivateChatServer.cs
示例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) }
);
}
开发者ID:ccasalicchio,项目名称:Cassini-Original-Project,代码行数:7,代码来源:ThemedTextCreate.cs
示例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);
}
开发者ID:weitaoxiao,项目名称:ClientEngine,代码行数:7,代码来源:DoubleBitmapControl.cs
示例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();
}
开发者ID:svn2github,项目名称:fiddler-plus,代码行数:35,代码来源:ButtonBar.cs
示例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;
}
开发者ID:siegelpeter,项目名称:UAV-NET,代码行数:7,代码来源:DraggableUserControl.cs
示例8: DarkToolStrip
public DarkToolStrip()
{
Renderer = new DarkToolStripRenderer();
Padding = new Padding(5, 0, 1, 0);
AutoSize = false;
Size = new Size(1, 28);
}
开发者ID:ZANEKEVIN,项目名称:DarkUI,代码行数:7,代码来源:DarkToolStrip.cs
示例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);
}
开发者ID:Calvido,项目名称:MaterialSkin,代码行数:25,代码来源:MaterialFlatButton.cs
示例10: flatButton
public flatButton() {
Font = SystemFonts.MessageBoxFont;
Padding = new Padding(6);
_buttonState = buttonStates.Normal;
DoubleBuffered = true;
TextAlign = ContentAlignment.MiddleCenter;
}
开发者ID:Taipi88,项目名称:updateSystem.NET,代码行数:7,代码来源:flatButton.cs
示例11: CustomListItem
public CustomListItem(object tag, Font font, Color fore, Padding padding)
{
Tag = tag;
Font = font;
ForeColor = fore;
itemBorder = padding;
}
开发者ID:huizh,项目名称:xenadmin,代码行数:7,代码来源:CustomListItem.cs
示例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;
}
开发者ID:rsdn,项目名称:janus,代码行数:10,代码来源:Pane.cs
示例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;
}
开发者ID:superhandy333,项目名称:InputLine,代码行数:32,代码来源:bottombar.cs
示例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;
}
开发者ID:nijikilling,项目名称:ImaginationDatabase,代码行数:30,代码来源:FileBrowserItem.cs
示例16: CriteriaControls
public CriteriaControls()
{
toolTip = new ToolTip();
Height = 400;
Margin = new Padding(0);
}
开发者ID:kanastasov,项目名称:Forex-Strategy-Builder,代码行数:7,代码来源:CriteriaControls.cs
示例17: CategoryButton
internal bool m_Alt; // for alternate coloring
/// <summary>
/// Initializes a new instance of the <see cref="CategoryButton"/> class.
/// </summary>
/// <param name="parent">Parent control.</param>
public CategoryButton(Base parent) : base(parent)
{
Alignment = Pos.Left | Pos.CenterV;
m_Alt = false;
IsToggle = true;
TextPadding = new Padding(3, 0, 3, 0);
}
开发者ID:LawlietRyuuzaki,项目名称:gwen-dotnet,代码行数:13,代码来源:CategoryButton.cs
示例18: ControlPanel
public ControlPanel()
{
DoubleBuffered = true;
FlarePadding = 0;
Padding = new Padding(0);
Margin = new Padding(0);
}
开发者ID:dowlingw,项目名称:dasplayer,代码行数:7,代码来源:ControlPanel.cs
示例19: MonthView
public MonthView()
{
SetStyle(ControlStyles.Opaque, true);
DoubleBuffered = true;
_dayNamesFormat = "ddd";
_monthTitleFormat = "MMMM yyyy";
_selectionMode = MonthViewSelection.Manual;
_workWeekStart = DayOfWeek.Monday;
_workWeekEnd = DayOfWeek.Friday;
_weekStart = DayOfWeek.Sunday;
_dayNamesVisible = true;
_dayNamesLength = 2;
_viewStart = DateTime.Now;
_itemPadding = new Padding(2);
_monthTitleColor = SystemColors.ActiveCaption;
_monthTitleColorInactive = SystemColors.InactiveCaption;
_monthTitleTextColor = SystemColors.ActiveCaptionText;
_monthTitleTextColorInactive = SystemColors.InactiveCaptionText;
_dayBackgroundColor = Color.Empty;
_daySelectedBackgroundColor = SystemColors.Highlight;
_dayTextColor = SystemColors.WindowText;
_daySelectedTextColor = SystemColors.HighlightText;
_arrowsColor = SystemColors.Window;
_arrowsSelectedColor = Color.Gold;
_dayGrayedText = SystemColors.GrayText;
_todayBorderColor = Color.Maroon;
UpdateMonthSize();
UpdateMonths();
}
开发者ID:NiDaSilva,项目名称:PPE4-STARS-UP,代码行数:31,代码来源:MonthView.cs
示例20: MARGINS
public MARGINS(Padding t)
{
this.Left = (int)t.Left;
this.Right = (int)t.Right;
this.Top = (int)t.Top;
this.Bottom = (int)t.Bottom;
}
开发者ID:killbug2004,项目名称:WSProf,代码行数:7,代码来源:NativeMethods.cs
注:本文中的Padding类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论