© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•12mo ago
Cyclomatic

WPF User control and updating binding

I've got a user control that has next and prev buttons. Clicking "next" sets a IsLoading = true, makes a request to get an image, and once complete sets IsLoading = false. IsLoading is bound to the IsEnabled property.

The user control also has an index, and Next increases the index, up until it hits it's maximum index. I'd like the IsEnabled property to be bound such that IsDisabled = IsLoading Index == MaxIndex.

IsLoading is a depedency property (lives in teh code behind) and so is Index. I guess I'd have to make IsNextDisabled also an dep prop and somehow NotifyPropertyChanged on that?

Note that I am not using a viewmodel, this is all code behind at the moment. I don't like how I have to create dp to bind the code behind to the xaml
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

WPF binding
C#CC# / help
13mo ago
Wpf binding failures
C#CC# / help
15mo ago
❔ WPF data binding
C#CC# / help
3y ago
❔ Binding WPF Combobox
C#CC# / help
3y ago