Пример #1
0
        private void updateWidgetFont()
        {
            var fs = widgetFontSize;

            if (fs < 1.00)
            {
                fs = 1.00;
            }
            this.FontSize = (double)fs;
            if (widgetFontFamily != null)
            {
                this.FontFamily = new Windows.UI.Xaml.Media.FontFamily(widgetFontFamily);
            }
            else
            {
                this.FontFamily = Windows.UI.Xaml.Media.FontFamily.XamlAutoFontFamily;
            }
            if (widgetFontBold)
            {
                this.FontWeight = Windows.UI.Text.FontWeights.Bold;
            }
            else
            {
                this.FontWeight = Windows.UI.Text.FontWeights.Normal;
            }
            if (widgetTextColor != null)
            {
                this.Foreground = widgetTextColor.toBrush();
            }
            else
            {
                this.Foreground = null;
            }
            cave.ui.Widget.onChanged((Windows.UI.Xaml.UIElement) this);
        }
Пример #2
0
 public void setWidgetColor(cave.Color color)
 {
     widgetColor    = color;
     rectangle.Fill = color.toBrush();
 }