I'm working with a RadBreadcrumb control that's populated with a lot of items. The control lets you navigate by mouse or by typing in the text box. When you type in the box, an autocomplete scrolling list drops down. When you navigate by clicking the arrows in the control, the drop down list takes up the height of the page, and it does not have scrollbars.
Is there a way to limit the size of the drop down menu and the autocomplete menu?
Thanks in advance!
4 Answers, 1 is accepted
You can edit the default Style of RadBreadCrumb and play with the Width/Height of the "historySplitButton" RadSplitButton and "AutoCompleteListBox" ListBox from the Template. You can view the Style extracted from Blend in the attached sample. Please let us know if you need further assistance.
Greetings,Petar Mladenov
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>
You can add these lines at the end of the MainPageViewModel.LoadItems() to see how my scenario looks like:
for
(
int
i = 0; i < 1000; i++)
{
Root.Children.Insert(0,
new
ExplorerItem() { Header =
"Test"
});
}
If you want to set a max dropdown size to the RadSplitButtons inside the RadBreadcrumb you'll just have to set the SplitButtonStyle property of the RadBreadcrumb with something like this:
<
Style
TargetType
=
"telerik:RadSplitButton"
>
<
Setter
Property
=
"IsTabStop"
Value
=
"false"
/>
<
Setter
Property
=
"IsOpen"
Value
=
"false"
/>
<
Setter
Property
=
"BorderThickness"
Value
=
"1"
/>
<
Setter
Property
=
"BorderBrush"
Value
=
"Transparent"
/>
<
Setter
Property
=
"Background"
Value
=
"Transparent"
/>
<
Setter
Property
=
"DropDownMaxHeight"
Value
=
"400"
/>
<
Setter
Property
=
"HorizontalContentAlignment"
Value
=
"Center"
/>
<
Setter
Property
=
"VerticalContentAlignment"
Value
=
"Center"
/>
<
Setter
Property
=
"Padding"
Value
=
"3"
/>
<
Setter
Property
=
"TogglePartStyle"
Value
=
"{StaticResource toggleStyle}"
/>
</
Style
>
For further references could you please examine the attached project and if you have more questions feel free to ask.
All the best,
Zarko
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>
Thanks for your help!