© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
14 replies
lucy

❔ wpf styling/templating with custom dependency properties?

is there a way to use custom dependency properties with styles and templates?

for example

if I want a property, MiddleColour, on a template for a slider, that changes the background colour of the middle bit of the slider
and I want to be able to change that colour using a style.
Is that possible?

Continuing on,
would it also be possible to pass a property to the style, eg GradientColour, which is then used and passed to the MiddleColour in the template?

Thanks
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

❔ User Control with custom dependency properties
C#CC# / help
3y ago
WPF Submenu Styling
C#CC# / help
17mo ago
Wpf RichTextBox styling
C#CC# / help
3y ago