A customizable WPF ToggleButton-based control for day and night theme switching with engaging animations
ThemeSwitch is a CustomControl built on top of the WPF ToggleButton, designed to provide an engaging visual element for theme switching in WPF applications. It features smooth animations for transitioning between day and night themes, demonstrating advanced WPF techniques and custom control development.
- Extension of WPF ToggleButton for specialized functionality
- Implementation of complex UI elements using XAML
- Three types of animations: ValueItem (DoubleAnimation), ThickItem (ThicknessAnimation), ColorItem (ColorAnimation)
- Smooth transitions between day and night themes
- Creation of complex shapes (sun, clouds, moon, stars) using pure XAML
- Utilization of opacity and positioning for realistic effects
- Efficient rendering using clipping and layout techniques
- Smooth animations without external dependencies
- Support for various .NET frameworks through multi-targeting
- WPF (Windows Presentation Foundation)
- .NET (Multi-targeting support)
- C#
- Visual Studio 2022 or later
- .NET SDK (version depending on your project)
git clone https://github.com/vickyqu115/themeswitch.git
- Visual Studio
- Visual Studio Code
- JetBrains Rider
- Set the startup project
- Press F5 or click the Run button
- Windows 11 recommended
- Detailed Article on Implementation (jamesnet.dev)
- YouTube Tutorial (English)
- BiliBili Tutorial (Chinese)
- CodeProject Article
Contributions to ThemeSwitch are welcome! Feel free to submit issues, create pull requests, or suggest improvements.
This project is licensed under the MIT License - see the LICENSE file for details.
- Website: https://jamesnet.dev
- Email: vickyqu115@hotmail.com, james@jamesnet.dev
Enhance your WPF applications with the engaging ThemeSwitch control!