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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T05:45:15+00:00 2026-05-13T05:45:15+00:00

I have a control derived from ComboBox , I want to use the ComboBox

  • 0

I have a control derived from ComboBox, I want to use the ComboBox ControlTemplate, and just set a few values on it in xaml, namely the ItemContainerStyle. The code below doesn’t work, the last setter, which im intending to apply the base ComboBox control template to this one, doesn’t do anything.

   <Style
      TargetType="{x:Type local:EditingFilteringComboBox}"
      BasedOn="{StaticResource {x:Type ComboBox}}">
      <Setter
         Property="IsEditable"
         Value="False" />
      <Setter
         Property="DisplayMemberPath"
         Value="DisplayValue" />
      <Setter
         Property="ItemContainerStyle"
         Value="{StaticResource editingFilteringComboBoxListBoxItem}" />
      <Setter
         Property="Template"
         Value="{StaticResource {x:Type ComboBox}}" />
   </Style>

I want to derive from ComboBox but I dont want to include the whole control template for it. I dont even want to touch the control template. I do want to change the ItemContainerStyle, which I could do from code, but much nicer if i dont have to.

The other reason why I want this here is because to want access to the internal members of the ComboBox‘s control template, namely the TextBox and the Popup. Usually I access members like this in the override of OnApplyTemplate.

I feel like im travelling the wrong path, enlighten me sensei.

  • 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-13T05:45:15+00:00Added an answer on May 13, 2026 at 5:45 am

    false alarm,

    i wasnt including a link to this file in my generic.xaml

    oh and i didnt have to set the Template value

       <Style
          TargetType="{x:Type local:EditingFilteringComboBox}"
          BasedOn="{StaticResource {x:Type ComboBox}}">
          <Setter
             Property="IsEditable"
             Value="False" />
          <Setter
             Property="DisplayMemberPath"
             Value="DisplayValue" />
          <Setter
             Property="ItemContainerStyle"
             Value="{StaticResource editingFilteringComboBoxListBoxItem}" />
       </Style>
    

    the style will only set properties that are different from the base style. so as i dont want to change the control template i simply dont set it. OnApplyTemplate is called, and i can access the internals of the ComboBox’s control template.

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

Sidebar

Related Questions

I have a wpf cusotm control derived from combobox System.Windows.Controls.ComboBox the control template is
I have a Silverlight control derived from ContentControl. I use it in following way
I want to create a Custom Control derived from ComboBox , however if I
I have a custom control that is derived from TabItem , and I want
I have typed in the following text in a control derived from Richtextbox The
I have my own control, derived from TCustomPanel . It has a child (
I want to read UTF-8 strings from a server that I have control of,
I have a control derived from System.Windows.Forms.UserControl which is placed in a customized grid.
I have my own control derived from Windows.Forms.Control and I am checking the Parent.BackColor
I have C# control derived from UserControl. When I close the design view of

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.