public MaterialForm() { DrawerWidth = 200; DrawerIsOpen = false; DrawerShowIconsWhenHidden = false; DrawerAutoHide = true; DrawerAutoShow = false; DrawerIndicatorWidth = 0; DrawerHighlightWithAccent = true; DrawerBackgroundWithAccent = false; FormBorderStyle = FormBorderStyle.None; Sizable = true; DoubleBuffered = true; SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer | ControlStyles.ResizeRedraw, true); FormStyle = FormStyles.ActionBar_40; Padding = new Padding(3, STATUS_BAR_HEIGHT + ACTION_BAR_HEIGHT, 3, 3); //Keep space for resize by mouse // This enables the form to trigger the MouseMove event even when mouse is over another control //Application.AddMessageFilter(new MouseMessageFilter()); //MouseMessageFilter.MouseMove += OnGlobalMouseMove; _clickAnimManager = new AnimationManager() { AnimationType = AnimationType.EaseOut, Increment = 0.04 }; _clickAnimManager.OnAnimationProgress += sender => Invalidate(); // Drawer Shown += (sender, e) => { if (DesignMode || IsDisposed) { return; } AddDrawerOverlayForm(); }; }
public MaterialForm() { MaximizedBounds = Screen.FromControl(this).WorkingArea; DrawerWidth = 200; DrawerIsOpen = false; DrawerShowIconsWhenHidden = false; DrawerAutoHide = true; DrawerAutoShow = false; DrawerIndicatorWidth = 0; DrawerHighlightWithAccent = true; DrawerBackgroundWithAccent = false; FormBorderStyle = FormBorderStyle.None; Sizable = true; DoubleBuffered = true; SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer | ControlStyles.ResizeRedraw, true); FormStyle = FormStyles.ActionBar_40; Padding = new Padding(PADDING_MINIMUM, STATUS_BAR_HEIGHT + ACTION_BAR_HEIGHT, PADDING_MINIMUM, PADDING_MINIMUM); //Keep space for resize by mouse _clickAnimManager = new AnimationManager() { AnimationType = AnimationType.EaseOut, Increment = 0.04 }; _clickAnimManager.OnAnimationProgress += sender => Invalidate(); // Drawer Shown += (sender, e) => { if (DesignMode || IsDisposed) { return; } AddDrawerOverlayForm(); }; }
public static void Init() { ButtonStyles.Init(); FormStyles.Init(); }