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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T03:13:36+00:00 2026-06-04T03:13:36+00:00

I am trying to bind to a property while inside a XAML ‘property setter’.

  • 0

I am trying to bind to a property while inside a XAML ‘property setter’. Binding at this location does not seem to happen in the same hierarchy as binding at a ‘normal’ place. Does anyone know how to bind something there?

I’ve also tried using RelativeSource to get the parent (which is better, since that’s what I actually want to do, not duplicate it) but no dice.

<loc:MyType Target="{Binding ElementName=Editor, Path=TextArea, Converter={loc:EditorAdapterConverter}}">
    <loc:MyType.PopupActions>
        <loc:BackspaceHideAction Target="{Binding ElementName=Editor, Path=TextArea, Converter={loc:EditorAdapterConverter}}" /> //Binding doesn't work
        <loc:KeyAction Action="Show" Key="Space" Modifiers="LeftCtrl" />
        <loc:KeyAction Action="Hide" Key="Escape" />
    </loc:MyType.PopupActions>
</loc:MyType>

Relevant information: BackspaceHideAction inherits from FrameworkElement and has a dependency property called Target (actually same as MyType). I need to access this Target also in BackspaceHideAction – it doesn’t really have to be a DP property there as well.

MyType.PopupActions is a dependency property on MyType declared as a PopupActionList : List<PopupAction>.

I am currently assuming that the reason I can’t bind is that I am nested inside a property instantiation. Similar binding have worked elsewhere (just the line above) so the type of binding shouldn’t be the problem. Just the context.

  • 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-06-04T03:13:37+00:00Added an answer on June 4, 2026 at 3:13 am

    Doing a little further testing, I’ve discovered why it didn’t work.

    The dependency property PopupActions on MyType was declared as a PopupActionList – nothing fancy. But properties aren’t automatically entered into the ‘DOM’-like structure of WPF elements, which isn’t that surprising (after you figure it out, as always).

    However, with some added code to call MyType.AddLogicalChild with each individual PopupAction as the item, everything works fine! (so far)

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

Sidebar

Related Questions

I'm trying to bind element's Height value to Checkbox.IsChecked property. Why that's not working?
I am trying to bind a property ObservableCollection<ObservableCollection<Location>> to a ListBox with ItemTemplate of
I'm trying to bind a Dependency Property from my UserControl to my MainViewModel. This
I'm trying to bind to a property of a container from inside a DataTemplate.
I'm confused while trying to bind some properties housed inside a collection rather than
I am trying to bind a Dictionary property stored in a EffectViewModel inside an
I am trying to bind programmatically the Content property of my WPF Button to
I have been trying to bind the StringFormat of the Text property of a
I'm trying to bind a simple one-line string to a textbox's text property but
I'm trying to bind System.Windows.SystemParameters.PrimaryScreenWidth to a ColumnDefinition's (From within a 'Grid') Width property,

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.