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 3636652
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T01:03:37+00:00 2026-05-19T01:03:37+00:00

I am an old time user of the Array of controls in VB back

  • 0

I am an old time user of the Array of controls in VB back in the days. It is gone now, so I am looking for a replacement.

I have created an User Control in C# for Silverlight. This control exposes a bool property IsChecked.

<ImageButton Name"imgbutton1" IsChecked="True"/>
<ImageButton Name"imgbutton2" IsChecked="False"/>
<ImageButton Name"imgbutton3" IsChecked="False"/>

In a Child Window, I populate a series of these controls and use them as an equivalent of RadioButtons, i.e., when I click one, any other that has an IsChecked = true will be set to false, for which I thought of doing something like:

List<ImageButton> imgButtons= new List<ImageButton>();
imgButtons.Add(imgbutton1);
imgButtons.Add(imgbutton2);
imgButtons.Add(imgbutton3);

Then, to clear all of their IsChecked but the one I need (pointed by some ‘index’ variable), I would do something like:

foreach (ImageButton imgbutton in imgButtons) imgbutton.IsChecked = false;
imgbuttons[index].IsChecked = true;

The problem I have is that List<ImageButton> is not compiling. I am very flaky at collections and can’t figure out what I am missing. I can do for standard controls but doesn’t allow me to get a user control in there.

Thanks!

PS: I have thought of just customizing a RadioButton control but don’t have Blend and I am using this image control for other types of controls. However, if you think there is a better way to implement this, please let me know.

EDIT: Compiler says “The type or namespace name ‘ImageButton’ could not be found (are you missing a using directive or an assembly reference?)’

  • 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-19T01:03:38+00:00Added an answer on May 19, 2026 at 1:03 am

    Ensure that you have a reference to your “ImageButton” control in your code (in the “using” part).

    To do that automatically you can just rightclick on your “ImageButton” in your code and click “Resolve”, it will automatically add the Reference

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am an old time Visual SourceSafe developer but now I want to change
Old Title: Prevent dynamically created control from retaining value Old Info: The reason I
I have an MDI form with a centered background image. Each time the user
I have some Zend Framework apps running and it's time to add user access
although I an an old time user of the Website, but managed to resolve
I have a table where new data gets filled each time a user clicks
I have a user model that has_one membership (active at a time). For auditing
Old setup (Liferay 5.2.3) login time was around 3-5 sec but for Liferay 6.0.0
Every time I rename a file in Perforce it actually deletes an old file
Long time listener, first time caller. I'm a 6 month old dev from Code

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.