Hello,
In a RadTreeview I want to display an optional Textbox in each item.
I used a HierarchicalDataTemplate attached to the RadTreeview.
Now the width of the TextBox is equal to the width of the (header)text shown in the TextBlock.
I want to stretch the width of the TextBox to fill up the width of the whole item in the Treeview.
HorizontalAlignment= "Stretch" in the HierarchicalDataTemplate does not work.
Has anyone an idea to fix this?
<
telerik:HierarchicalDataTemplate
x:Key
=
"ItemTemplate"
ItemsSource
=
"{Binding Converter={StaticResource HierarchyConverter}}"
telerik:ContainerBinding.ContainerBindings
=
"{StaticResource BindingsCollection}"
>
<
Grid
x:Name
=
"HeaderRow"
Width
=
"Auto"
HorizontalAlignment
=
"Stretch"
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"*"
/>
</
Grid.RowDefinitions
>
<
TextBox
Text
=
"{Binding OmsText, Mode=TwoWay}"
Visibility
=
"{Binding OmsVisiblity, Mode=TwoWay}"
HorizontalAlignment
=
"Stretch"
Height
=
"Auto"
TextWrapping
=
"Wrap"
Grid.Row
=
"1"
/>
<
TextBlock
Text
=
"{Binding Text, Mode=TwoWay}"
HorizontalAlignment
=
"Stretch"
/>
</
Grid
>
</
telerik:HierarchicalDataTemplate
>