Skip to content

Commit

Permalink
fix example form (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
wolframhaussig authored Feb 27, 2024
1 parent 098c0a8 commit 5c7f8ac
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 14 deletions.
10 changes: 5 additions & 5 deletions WinFormsThemes/WinFormsThemes.Example/FrmDefault.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions WinFormsThemes/WinFormsThemes.Example/FrmDefault.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@ public partial class FrmDefault : Form
public FrmDefault()
{
InitializeComponent();
//ThemeRegistryHolder.ThemeRegistry.Current.Apply(this);
ThemeRegistryHolder.ThemeRegistry.Get(ThemeCapabilities.HighContrast).Apply(this);
ThemeRegistryHolder.ThemeRegistry!.GetTheme(ThemeCapabilities.HighContrast)?.Apply(this);
}

private void stylableListView1_SelectedIndexChanged(object sender, EventArgs e)
{

}
}
}
}
4 changes: 2 additions & 2 deletions WinFormsThemes/WinFormsThemes.Example/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ internal static void Main()
// To customize application configuration such as set high DPI settings or default font,
// see https://aka.ms/applicationconfiguration.
ApplicationConfiguration.Initialize();

ThemeRegistryHolder.ThemeRegistry = ThemeRegistryHolder.GetBuilder().WithCurrentThemeSelector((selector) => ThemeRegistryHolder.ThemeRegistry.Get()).Build();
StylableWinFormsControls.StylableWinFormsControlsSettings.DEFAULT.ErrorHandling = StylableWinFormsControls.ErrorHandling.Continue;
ThemeRegistryHolder.ThemeRegistry = ThemeRegistryHolder.GetBuilder().WithCurrentThemeSelector((selector) => ThemeRegistryHolder.ThemeRegistry!.GetTheme()).Build();

Application.Run(new FrmDefault());
}
Expand Down
10 changes: 6 additions & 4 deletions WinFormsThemes/WinFormsThemes.sln
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Projektmappenelemente", "Pr
..\stryker-config.json = ..\stryker-config.json
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WinFormsThemes.Example", "WinFormsThemes.Example\WinFormsThemes.Example.csproj", "{BA51ADEB-B00C-4D39-9A0D-364362227427}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -26,10 +28,10 @@ Global
{27D57027-C5FC-478D-A873-DD11CACEE584}.Debug|Any CPU.Build.0 = Debug|Any CPU
{27D57027-C5FC-478D-A873-DD11CACEE584}.Release|Any CPU.ActiveCfg = Release|Any CPU
{27D57027-C5FC-478D-A873-DD11CACEE584}.Release|Any CPU.Build.0 = Release|Any CPU
{7EDF3D57-1142-466C-AE79-823DB3B691F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7EDF3D57-1142-466C-AE79-823DB3B691F0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7EDF3D57-1142-466C-AE79-823DB3B691F0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7EDF3D57-1142-466C-AE79-823DB3B691F0}.Release|Any CPU.Build.0 = Release|Any CPU
{BA51ADEB-B00C-4D39-9A0D-364362227427}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BA51ADEB-B00C-4D39-9A0D-364362227427}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BA51ADEB-B00C-4D39-9A0D-364362227427}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BA51ADEB-B00C-4D39-9A0D-364362227427}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down

0 comments on commit 5c7f8ac

Please sign in to comment.