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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:23:10+00:00 2026-05-28T00:23:10+00:00

I have a hierarcial class like this Part SubPart SubSubPart1 SubSubPart2 I have a

  • 0

I have a hierarcial class like this

Part
  SubPart
     SubSubPart1
     SubSubPart2

I have a control that is populated by SubSubPart and in that control i want to show information about the parent SubPart and Part. I want to use normal binding in xaml to display information about parent part.

Each part has a unique ObjectId as a property, each part has multiple properties that i want to display.

The control only knows about one subsubpart.

I realize that i can write a converter

    public object Convert(object value, System.Type targetType, object parameter, CultureInfo culture)
    {

        if (DesignerProperties.GetIsInDesignMode(new DependencyObject()))

        { return "Design Part"; }
        else
        {

            IDataService applicationService = ServiceLocator.Current.GetInstance<IDataService>();
            IPartItem partItem = applicationService.GetEquipmentFromComponent(value.ToString());

            return partItem.PartData.Name;
        }
    }

and apply it like this

<TextBlock Grid.Row="0" Grid.Column="1"
Text="{Binding Path=ObjectId,Converter={StaticResource partConverter}}" Margin="0,0,10,0">
</TextBlock>

But then i need to write a converter for every property of the parent parts. Any solutions out there.

  • 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-28T00:23:11+00:00Added an answer on May 28, 2026 at 12:23 am

    Bind the DataContext of your control using the converter and update your converter to just return the parent part

    <TextBlock Grid.Row="0" Grid.Column="1" Text="{Binding ObjectId}" DataContext="{Binding Converter={StaticResource partConverter}}" Margin="0,0,10,0" /> 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a model in Django that looks like this: class Project(models.Model): name =
I have a data structure that looks like this: public class Node { public
I have a hierarchical structure like this: class Node { Node Parent; string Name;
I have a hierarchical JPA mapping that is several Classes deep. Something like this
I have an hierarchical structure of classes like this public class Class1 { internal
I have a hierarchical class structure like this: Category -> Template -> Instance A
I have a hierarchical data structure (using Entity beans)like say a Book Class which
I'm working on a project where I have some hierarchical data that I want
I have a user form that has dropdown boxes which i have populated using
I have a deep structure that I would like to display as a tree

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.