public MaterialRadioButton() { SetStyle(ControlStyles.DoubleBuffer | ControlStyles.OptimizedDoubleBuffer, true); animationManager = new AnimationManager { AnimationType = AnimationType.EaseInOut, Increment = 0.06 }; rippleAnimationManager = new AnimationManager(false) { AnimationType = AnimationType.Linear, Increment = 0.10, SecondaryIncrement = 0.08 }; animationManager.OnAnimationProgress += sender => Invalidate(); rippleAnimationManager.OnAnimationProgress += sender => Invalidate(); CheckedChanged += (sender, args) => animationManager.StartNewAnimation(Checked ? AnimationDirection.In : AnimationDirection.Out); SizeChanged += OnSizeChanged; Ripple = true; MouseLocation = new Point(-1, -1); }
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); }
public MaterialCheckBox() { // DPI Adjustments Form tmp = new Form(); int dpiY = Utilities.DPIMath.ratioY(tmp); int dpiX = Utilities.DPIMath.ratioX(tmp); tmp.Dispose(); CHECKBOX_SIZE = CHECKBOX_SIZE * dpiX; CHECKBOX_SIZE_HALF = CHECKBOX_SIZE_HALF * dpiX; CHECKBOX_INNER_BOX_SIZE = CHECKBOX_INNER_BOX_SIZE * dpiX; animationManager = new AnimationManager { AnimationType = AnimationType.EaseInOut, Increment = 0.05 }; rippleAnimationManager = new AnimationManager(false) { AnimationType = AnimationType.Linear, Increment = 0.10, SecondaryIncrement = 0.08 }; animationManager.OnAnimationProgress += sender => Invalidate(); rippleAnimationManager.OnAnimationProgress += sender => Invalidate(); CheckedChanged += (sender, args) => { animationManager.StartNewAnimation(Checked ? AnimationDirection.In : AnimationDirection.Out); }; Ripple = true; MouseLocation = new Point(-1, -1); }
public MaterialRaisedButton() { animationManager = new AnimationManager(false) { Increment = 0.03, AnimationType = AnimationType.EaseOut }; animationManager.OnAnimationProgress += sender => Invalidate(); }
public MaterialTabSelector() { SetStyle(ControlStyles.DoubleBuffer | ControlStyles.OptimizedDoubleBuffer, true); Height = 48; animationManager = new AnimationManager { AnimationType = AnimationType.EaseOut, Increment = 0.04 }; animationManager.OnAnimationProgress += sender => Invalidate(); }
public MaterialRaisedButton() { Primary = true; animationManager = new AnimationManager(false) { Increment = 0.03, AnimationType = AnimationType.EaseOut }; animationManager.OnAnimationProgress += sender => Invalidate(); AutoSizeMode = AutoSizeMode.GrowAndShrink; AutoSize = true; }
public MaterialContextMenuStrip() { Renderer = new MaterialToolStripRender(); animationManager = new AnimationManager(false) { Increment = 0.07, AnimationType = AnimationType.EaseInOut }; animationManager.OnAnimationProgress += sender => Invalidate(); animationManager.OnAnimationFinished += sender => OnItemClicked(delayesArgs); BackColor = SkinManager.GetApplicationBackgroundColor(); }
public MaterialRaisedButton() { Primary = true; animationManager = new AnimationManager(false) { Increment = 0.03, AnimationType = AnimationType.EaseOut }; animationManager.OnAnimationProgress += sender => Invalidate(); //UNDONE : Remove this function and use Design view Properties AutoSizeMode = AutoSizeMode.GrowAndShrink; //AutoSize = true; }
public MaterialComboBox() { BackColor = SkinManager.GetApplicationBackgroundColor(); animationManager = new AnimationManager { Increment = 0.06, AnimationType = AnimationType.EaseInOut, InterruptAnimation = false }; this.GotFocus += (sender, args) => animationManager.StartNewAnimation(AnimationDirection.In); this.LostFocus += (sender, args) => animationManager.StartNewAnimation(AnimationDirection.Out); this.Font = SkinManager.ROBOTO_MEDIUM_10; this.ForeColor = SkinManager.GetPrimaryTextColor(); }
public MaterialSingleLineTextField() { SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.DoubleBuffer, true); animationManager = new AnimationManager { Increment = 0.06, AnimationType = AnimationType.EaseInOut, InterruptAnimation = false }; animationManager.OnAnimationProgress += sender => Invalidate(); baseTextBox = new BaseTextBox { BorderStyle = BorderStyle.None, Font = SkinManager.ROBOTO_REGULAR_11, ForeColor = SkinManager.GetPrimaryTextColor(), Location = new Point(0, 0), Width = Width, Height = Height - 5 }; if (!Controls.Contains(baseTextBox) && !DesignMode) { Controls.Add(baseTextBox); } baseTextBox.GotFocus += (sender, args) => animationManager.StartNewAnimation(AnimationDirection.In); baseTextBox.LostFocus += (sender, args) => animationManager.StartNewAnimation(AnimationDirection.Out); BackColorChanged += (sender, args) => { baseTextBox.BackColor = BackColor; baseTextBox.ForeColor = SkinManager.GetPrimaryTextColor(); }; //Fix for tabstop baseTextBox.TabStop = true; this.TabStop = false; }
public MaterialCheckBox() { animationManager = new AnimationManager { AnimationType = AnimationType.EaseInOut, Increment = 0.05 }; rippleAnimationManager = new AnimationManager(false) { AnimationType = AnimationType.Linear, Increment = 0.10, SecondaryIncrement = 0.08 }; animationManager.OnAnimationProgress += sender => Invalidate(); rippleAnimationManager.OnAnimationProgress += sender => Invalidate(); CheckedChanged += (sender, args) => { animationManager.StartNewAnimation(Checked ? AnimationDirection.In : AnimationDirection.Out); }; Ripple = true; MouseLocation = new Point(-1, -1); }
public MaterialFlatButton() { Primary = false; SetStyle(ControlStyles.SupportsTransparentBackColor, true); 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(); //UNDONE : Remove this function and use Design view Properties //AutoSizeMode = AutoSizeMode.GrowAndShrink; //AutoSize = true; //Margin = new Padding(4, 6, 4, 6); //Padding = new Padding(0); }