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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T19:14:06+00:00 2026-06-11T19:14:06+00:00

I have a problem with layout. At initial window everything is as expected. When

  • 0

I have a problem with layout.

At initial window everything is as expected.

Initial window

When one of the parent or child items is clicked, everything is aligned to the right. I don’t want that such situation. Here is screenshots:

Parent item is clicked

Child item is clicked

Could anybody help me?

XAML layout template:

‘textBlock’ style

 <Style x:Key="textBlock" TargetType="{x:Type TextBlock}">

            <Setter Property="FontFamily" Value="Verdana"></Setter>
            <Setter Property="FontSize" Value="12"></Setter>
        </Style>   

Items layout:

<HierarchicalDataTemplate 
                        DataType="{x:Type models:EntityViewModel}" ItemsSource="{Binding Children}" >
                        <Grid Margin="0,0,3,0">
                            <TextBlock Style="{StaticResource textBlock}" TextWrapping="Wrap" Width="{Binding ActualWidth, ElementName=EntityTree}">
                                <Hyperlink NavigateUri="{Binding Url}" RequestNavigate="Hyperlink_RequestNavigate">
                                    <TextBlock Text="{Binding ID}"></TextBlock>
                                </Hyperlink>
                                <TextBlock Text="{Binding TypeName}"></TextBlock>
                                <TextBlock Text="{Binding Explanation}"></TextBlock>
                            </TextBlock>
                        </Grid>
                    </HierarchicalDataTemplate>

Parent layout:

 <HierarchicalDataTemplate 
                    DataType="{x:Type models:ParentViewModel}" ItemsSource="{Binding Children}">
                    <Grid Margin="0,0,3,0">
                    <TextBlock Style="{StaticResource textBlock}" TextWrapping="Wrap" Width="{Binding ActualWidth, ElementName=EntityTree}" >
                            <TextBlock Text="{Binding ParentName}"/>
                            <Run Text=" kategorisinde toplam "></Run>
                            <TextBlock Text="{Binding ItemsCount}"></TextBlock>
                            <Run Text=" adet kayıt"></Run>
                        </TextBlock>
                        </Grid>
                </HierarchicalDataTemplate>
  • 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-11T19:14:07+00:00Added an answer on June 11, 2026 at 7:14 pm

    Probably this is due too the Binding for the Width of the TextBlock in your EntityViewModel DataTemplate. I assume, that EntityTree is the name of the entire TreeView. You force the TextBlock’s width to be larger than your entire TreeView, since it is indented on the second level, this causes the TreeView to try to make the whole Textblock Visible and enforce the scrolling to the right. Try to set a fixed width in a first approach, which is less or equal to the width available

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

Sidebar

Related Questions

I have a strange problem. I am using the null layout for a window
I have problem in this layout that : it doesn't show any child after
I have a problem with layout iPhone web page , My background image does
I have a problem with layout. Look at the picture: as you can see
I have to make a simple layout in android but have problem with the
I have a reasonably complex layout problem: I would like to have a main
I have the age-old problem of a div wrapping a two-column layout. My sidebar
I have problems getting some of my views aligned in a relative layout that
I have problem with http://abfoodpolicy.com/ . In IE 8 and 9 the right sidebar
I have list with items having two textview and one imageview.I inflate the list

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.