示例#1
0
        public FixedSizeTests()
        {
            var themes = new ThemeCollection();

            themes["default"] = new Theme();

            styleConfigurator = new ThemeStyler(themes);

            contentLayoutEngine = new ContentLayoutEngineLogger(
                new ContentLayoutEngine(
                    CommonMocks.FontProvider().Object));
        }
示例#2
0
        public void ApplyDefaultTheme()
        {
            var             fontProvider = CommonMocks.FontProvider("default");
            ThemeCollection themes       = new ThemeCollection
            {
                ["default"] = Theme.CreateDefaultTheme(),
                ["xyz"]     = CreateTestTheme(),
            };

            ThemeStyler styler = new ThemeStyler(themes);

            (var widget, var element) = CommonMocks.Widget("widget");

            element.Object.Display.ParentFont = fontProvider.Object.Default;

            styler.Apply(element.Object, "xyz");

            element.Object.Style.Update();
            element.Object.Display.Style.Padding.Left.Should().Be(14);
            element.Object.Style.Font.Color.Should().Be(Color.Yellow);
        }
示例#3
0
        private void ChangeTheme(object sender)
        {
            ThemeStyler styler = new ThemeStyler();

            styler.Show();
        }