public FixedSizeTests() { var themes = new ThemeCollection(); themes["default"] = new Theme(); styleConfigurator = new ThemeStyler(themes); contentLayoutEngine = new ContentLayoutEngineLogger( new ContentLayoutEngine( CommonMocks.FontProvider().Object)); }
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); }
private void ChangeTheme(object sender) { ThemeStyler styler = new ThemeStyler(); styler.Show(); }