public CssBoxShadow(CssNumericValue hshadow, CssNumericValue vshadow, CssNumericValue blur = null, CssNumericValue spread = null, CssColor color = null, bool inset = false) { HShadow = hshadow; VShadow = vshadow; Blur = blur; Spread = spread; Color = color; Inset = inset ? CssInset.Instance : null; }
public Image(string defaultSource, string highlightedSource, CssColor highlightColor) { Source = defaultSource; MouseEntered += () => { Source = highlightedSource; Style.BackgroundColor = highlightColor; }; MouseExited += () => { Source = defaultSource; Style.BackgroundColor = CssColor.Inherit; }; }
public AnimatedImage(string[] defaultSource, string[] highlightedSource, int? width = null, int? height = null, CssColor highlightColor = null, bool isAutomaticHighlighting = false) { if (defaultSource.Length != highlightedSource.Length) throw new Exception("The number of frames must be equal between the default and highlighted frames."); this.highlightColor = highlightColor; if (isAutomaticHighlighting) { MouseEntered += Highlight; MouseExited += Unhighlight; } PreloadFrames(defaultSource, highlightedSource, width, height); SetSource(sourceFrames.First()); }
public CssBorder(CssNumericValue width, CssBorderStyle style, CssColor color) { Width = width; Style = style; Color = color; }