© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•8mo ago•
3 replies
Fuxsy foxシ

How to run tweak methods dynamically from JSON with parameters?

I'm building a WPF app that applies Windows tweaks like dark mode etc.

I've got a C# class
EssentialTweaks
EssentialTweaks
, with public methods that return bool. Most are parameterless, some take enums like
public enum StorageSenseAction
{
    Disable,
    Enable
}
public enum StorageSenseAction
{
    Disable,
    Enable
}
.
Errors go to Console.WriteLine.

I want the UI to show all tweaks grouped by class (as categories), let users check what they want, and then apply them one by one even if some fail.

The goal is to define all tweaks in a JSON file with the name, description, class/method, and optional enum param — so the UI builds dynamically and I don’t have to hardcode anything. For things like PS5 vs PS7, each should be a separate entry in the list.

Here’s the repo: https://github.com/PUXSY/WinRep-Code
What’s the cleanest way to structure this? Ideally no crazy reflection or 100 buttons.
Any ideas appreciated 🙏

sorry if this looks AI generated, I just didn't know how to write it, not like a damass
GitHub
GitHub - PUXSY/WinRep-Code
Contribute to PUXSY/WinRep-Code development by creating an account on GitHub.
GitHub - PUXSY/WinRep-Code
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Declaring methods with `in` parameters
C#CC# / help
14mo ago
❔ ✅ Need help with methods and parameters
C#CC# / help
3y ago
✅ I need to create methods dynamically
C#CC# / help
2y ago