HI,
I have attached code. from this code..
When select item from combobox respection object should bind to slider and Text..
If adjust slider should update binding object ..
Thank you.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Sandhiya PriyaRank #26 · 43.2K reputationPosted Jan 2, 2026, 6:25 AM EST
Yes — this is fully supported in WPF using two-way data binding.
You bind:
ComboBox ? Enum
Slider + TextBox ? selected object property
All update automatically
1. Enum
public enum VolumeLevel { Low, Medium, High }2. ViewModel (INotifyPropertyChanged)
public class SettingsViewModel : INotifyPropertyChanged { private VolumeLevel _selectedLevel; private double _volume; public Array VolumeLevels => Enum.GetValues(typeof(VolumeLevel)); public VolumeLevel SelectedLevel { get => _selectedLevel; set { _selectedLevel = value; Volume = value switch { VolumeLevel.Low => 20, VolumeLevel.Medium => 50, VolumeLevel.High => 80, _ => Volume }; OnPropertyChanged(nameof(SelectedLevel)); } } public double Volume { get => _volume; set { _volume = value; OnPropertyChanged(nameof(Volume)); } } public event PropertyChangedEventHandler PropertyChanged; void OnPropertyChanged(string name) => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name)); }3. XAML (Two-way binding)
What happens automatically
Selecting ComboBox item updates Slider & Text
Moving Slider updates bound object
TextBox editing updates Slider
All synced via TwoWay binding
Note
Use INotifyPropertyChanged
Use TwoWay binding
No code-behind needed
This is MVVM-correct
Summary
ComboBox binds to enum
Slider & Text bind to object property
Changes propagate both directions automatically
This is the cleanest and correct WPF solution.