Beispiel #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;
 }
Beispiel #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;
     };
 }
Beispiel #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());
        }
Beispiel #4
0
 public CssBorder(CssNumericValue width, CssBorderStyle style, CssColor color)
 {
     Width = width;
     Style = style;
     Color = color;
 }
Beispiel #5
0
 public CssBorder(CssNumericValue width, CssBorderStyle style, CssColor color)
 {
     Width = width;
     Style = style;
     Color = color;
 }