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

  • Home
  • SEARCH
  • 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 5936315
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T15:22:55+00:00 2026-05-22T15:22:55+00:00

If you look at Selector and TabItem classes they apparently both own the IsSelectedProperty

  • 0

If you look at Selector and TabItem classes they apparently both own the IsSelectedProperty.

static Selector()
{
    ...
    IsSelectedProperty = DependencyProperty.RegisterAttached("IsSelected", typeof(bool), typeof(Selector), ...);
    ...
}

static TabItem()
{
    IsSelectedProperty = Selector.IsSelectedProperty.AddOwner(typeof(TabItem), ...);
    ...
}

So I guess my question is… since the Tabitem contains the actual propertychanged logic, what is the point of the IsSelectedProperty even residing in the Selector class?

  • 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-22T15:22:55+00:00Added an answer on May 22, 2026 at 3:22 pm

    In this specific case, Selector has the IsSelected DP because there are a number of controls that derive from it whose items can be selected (ComboBox, ListBox, ListView, TabControl, DataGrid). They all need an ability to mark an item with IsSelected, therefore that DP is declared in their common base class. Like Tim said, DRY.

    Another reason that TabItem adds itself as an owner is that in the Selector class, IsSelected is an attached property because you can have just about anything as an item in a Selector. Attached properties are pretty mobile that way.

    However, TabItem adds itself as an owner such that it is not an attached property on TabItem. It also registers a callback method to be called when the value changes so that it can do a few things when selected or unselected.

    And yes, it is easier to type <TabItem and see IsSelected in Intellisense rather than going, “But how the heck do I make one selected?” and have to hunt around and find that you need to use an attached property from some other class.

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

Sidebar

Related Questions

How would I write a selector that would look through say a div of
I'd like to change the look of the controls for this rotating banner. They
Take a look at this method: [textButton addTarget:self action:@selector(articleModalWillAppear:) forControlEvents:UIControlEventTouchDown]; When the button is
I'm looking to override the base jQuery selector so that all CSS classes (
getRowData function in jqgird ,I notice that there is a selector look like $(td,
Please look to the following code, outputConsole is UITextView. - (IBAction)buttonBuildDown { [self performSelectorInBackground:@selector(processBuildDown)
I'm currently writing a CSS selector engine for server-side JS ( have a look
I am developing my own template selector for CSS templates. At the moment, it
I'm trying to use a selector to grab an element, then look through the
Look at the function below. I want to pass a vector of factors and

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.