123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- using System.Windows;
- using System.Windows.Forms;
- namespace FastReport.Design.RibbonDesigner
- {
- internal class RibbonGroupCaption : Label
- {
- public override bool Visible
- {
- get => base.Visible;
- set
- {
- base.Visible = value;
- control.Visibility = value ? Visibility.Visible : Visibility.Collapsed;
- }
- }
- public RibbonGroupCaption()
- {
- AutoSize = true;
- control.Height = 15;
- control.FontSize = 11;
- control.HorizontalAlignment = System.Windows.HorizontalAlignment.Center;
- control.VerticalAlignment = System.Windows.VerticalAlignment.Bottom;
- control.VerticalContentAlignment = VerticalAlignment.Bottom;
- control.Margin = new Thickness(0, 0, 0, 1);
- }
- }
- internal class ToolbarLayoutDropDownButton : ToolStripDropDownButton, IToolbarItem
- {
- public bool BeginGroup { get; set; }
- public ToolbarLayoutDropDownButton()
- {
- DropDown = new ToolStripDropDown();
- DropDown.Opened += (s, e) =>
- {
- OnDropDownOpened(e);
- IsDropDownOpen = true;
- };
- DropDown.Closed += (s, e) =>
- {
- OnDropDownClosed(e);
- IsDropDownOpen = false;
- };
- DropDown.Opening += (s, e) => OnDropDownOpening(e);
- }
- }
- internal class ToolbarLabel : Label, IToolbarItem
- {
- public bool BeginGroup { get; set; }
- public ToolbarLabel()
- {
- AutoSize = true;
- control.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;
- control.HorizontalContentAlignment = System.Windows.HorizontalAlignment.Center;
- }
- }
- }
|