Good morning,
I'm having trouble with the RadListBox Template. For some reason if I insert a grid into a listbox template its formatting is not preserved.
Here's my code:
Template:
RadListBox
You will notice that in my template I have grid where I'm trying to force the last column over to the far right of the ListBoxItem. For some reason this isn't working with both columns aligning to the left. If I build the grid not within a ListBox template then it works.
I'm trying to make the last grid items align no matter the length of the content in the column before it.
Could the cause be that I'm using the Office_BlueTheme()?
****** EDIT ********
I tried removing the theme but it doesn't make a difference.
Thank you for your time.
Rob
I'm having trouble with the RadListBox Template. For some reason if I insert a grid into a listbox template its formatting is not preserved.
Here's my code:
Template:
<
DataTemplate
x:Key
=
"AutoCompleteListBoxTemplate"
>
<
Grid
Width
=
"{Binding ElementName=radListBox, Path=Width}"
>
<
Grid.ColumnDefinitions
>
<
ColumnDefinition
/>
<
ColumnDefinition
/>
</
Grid.ColumnDefinitions
>
<
TextBlock
Text
=
"{Binding Name}"
Grid.Column
=
"0"
HorizontalAlignment
=
"Stretch"
/>
<
TextBlock
Text=">>" Grid.Column="1" HorizontalAlignment="Right" Margin="5,0,5,0" />
</
Grid
>
</
DataTemplate
>
RadListBox
<
telerik:RadListBox
MinWidth
=
"100"
MaxHeight
=
"250"
x:Name
=
"radListBox"
Grid.ColumnSpan
=
"2"
Visibility
=
"Collapsed"
HorizontalAlignment
=
"Left"
VerticalAlignment
=
"Top"
ItemTemplate
=
"{StaticResource AutoCompleteListBoxTemplate}"
PreviewKeyDown
=
"radListBox_PreviewKeyDown"
>
<
telerik:RadListBox.Effect
>
<
DropShadowEffect
ShadowDepth
=
"10"
Color
=
"Gray"
Opacity
=
".4"
Direction
=
"320"
RenderingBias
=
"Performance"
/>
</
telerik:RadListBox.Effect
>
</
telerik:RadListBox
>
You will notice that in my template I have grid where I'm trying to force the last column over to the far right of the ListBoxItem. For some reason this isn't working with both columns aligning to the left. If I build the grid not within a ListBox template then it works.
I'm trying to make the last grid items align no matter the length of the content in the column before it.
Could the cause be that I'm using the Office_BlueTheme()?
****** EDIT ********
I tried removing the theme but it doesn't make a difference.
Thank you for your time.
Rob