Example #1
0
 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;
 }
Example #2
0
 public Image(string defaultSource, string highlightedSource, CssColor highlightColor)
 {
     Source = defaultSource;
     MouseEntered += () =>
     {
         Source = highlightedSource;
         Style.BackgroundColor = highlightColor;
     };
     MouseExited += () =>
     {
         Source = defaultSource;
         Style.BackgroundColor = CssColor.Inherit;
     };
 }
Example #3
0
        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());
        }
Example #4
0
 public CssBorder(CssNumericValue width, CssBorderStyle style, CssColor color)
 {
     Width = width;
     Style = style;
     Color = color;
 }
Example #5
0
 public CssBorder(CssNumericValue width, CssBorderStyle style, CssColor color)
 {
     Width = width;
     Style = style;
     Color = color;
 }