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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T21:29:19+00:00 2026-05-28T21:29:19+00:00

I have a TreeView showing an object’s properties. One of the properties is a

  • 0

I have a TreeView showing an object’s properties. One of the properties is a large byte array.

TreeView’s ItemsSource obviously treats this as a collection of child nodes, but what I actually want is ONE child node showing the entire array that can still be expanded/collapsed.

eg currently

- MyObject
    Prop1
    Prop2
  - PropWithBytes
      1
      2
      3
      etc

What I want:

- MyObject
    Prop1
    Prop2
  - PropWithBytes
      1, 2, 3  etc

Is there any way to tell the Tree to treat the collection as a single node?

If I didn’t want the actual data to still be a separate node I could easily write a DataTemplate (as opposed HierarchicalDataTemplate) to to display it in place. I can also use a DataTemplate that uses an Expander instead to hide the data which works fine, but looks ugly.

  • 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-28T21:29:20+00:00Added an answer on May 28, 2026 at 9:29 pm

    If I understand your question correctly – try to use ValueConverter which will check if passed value is byte array or not (in case of byte array – returns it’s string representation).

    public class ByteArrayValueConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value != null && value is IEnumerable<byte>)
                return string.Join(", ", (IEnumerable<byte>)value);
            return value;
        }
    
        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotSupportedException();
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a TreeView databound to a CollectionViewSource Groups collection. This is so that
I have a treeview that is bound to a collection and each item in
I have treeview and a context menu that is shown for every node. One
I have a treeview showing Categories and subcategories. I need to Right Click Option
I have a TreeView with nodes, so when I click on one of the
I have a treeview with checkboxes for each item using a DataTemplate. <TreeView ItemsSource={Binding}>
I have a TreeView Control (that should look like this) But I don't know
I have a TreeView with binded ItemsSource. I want to select my root(first) node.
I have a TreeView control showing multiple TreeNodes in an organised heirarchy. I want
I have a Treeview showing Xml data where each element is wrapped in a

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.