Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 744997
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T09:02:34+00:00 2026-05-14T09:02:34+00:00

Setup: I have a combo-box, it’s itemsource bound to an ObservableCollection<T> of a custom

  • 0

Setup:

I have a combo-box, it’s itemsource bound to an ObservableCollection<T> of a custom class, one property is a List<myenum>.

I have an itemscontrol which is databound to the combo-box’s selected item List<myenum> property.

The itemscontrol datatemplate creates a list of radiobuttons, each representing the individual enum values in the list.

The Desire:

When I change the value in the combo-box the itemscontrol source is updated. What I want to occur, is if a radio button in the new itemscontrol source is the same as the selected radiobuton in the previous list (before it was updated), this to be checked.

Current Idea:

Assign a Checked event to the radio buttons, which maintains a myenum property in the window class which can be compared against. Make the IsChecked property of the radiobox bind to a converter and compare against the myenum property. To achieve this, I have made the window class extend from IValueConverter, this way the converter function has access to the myenum property.

Issue:

I don’t know how to get the IsChecked binding to use the window as the converter. I have tried using relative source in the converter part of the binding, but that doesn’t work
IsChecked="{Binding Converter={RelativeSource={RelativeSource Self}}}"

Preferred Answers:

Assistance on correcting the binding syntax if it’s possible this way.

Ideas of a more appropriate way of achieving what I’d like.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T09:02:35+00:00Added an answer on May 14, 2026 at 9:02 am

    I also do not know how to use the window as a value converter in xaml. Instead create a standalone value converter class with a public property for the enum type. Next, in the constructor of the window, get a reference to the instance of the value converter and store it in a private member.

    XAML:

    <local:MyValueConverter x:Key="ConvertSomething" />
    

    Code behind:

    private MyValueConverter _myValueConverter;
    
    public Window1()
    {
      InitializeComponent();
    
      _myValueConverter = FindResource("ConvertSomething") as MyValueConverter;
    }
    
    private void RadioButton_Checked(object sender, RoutedEventArgs e)
    {
        // You can access _myValueConverter here and set its public enum property.    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have setup a property and implement INotifyPropertyChanged like so... public event PropertyChangedEventHandler PropertyChanged;
At the moment I have setup a custom ok cancel dialog with a drop
I have 2 silverlight controls on a form; datagrid which is bound to list
Setup Have you ever had the experience of going into a piece of code
Setup I have a website that draws RSS feeds and displays them on the
Setup: I have an HTML page with a fieldset element. The background color of
Setup I have a VBScript for driving the stress testing of a web service.
I have setup web dav on windows server 2008. It seems to work fine
Here's the setup I have in a vs2008 solution: Data layer in a project
I've created some MbUnit Test Fixtures that have SetUp methods marked with the SetUp

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.