In case the available height is too small to accommodate a
group of menu items, the group becomes scrollable. Each menu item has a DropDownHeight and VerticalScrollBarVisibility
properties. The DropDownHeight
property is used to restrict the displayed height of a group of menu items,
while the VerticalScrollBarVisibility
property defines whether the item allows vertical scrolling or not.
The following code example demonstrates how to create a scrollable
menu.
[XAML]
<viblend:Menu Name="Menu" Width="400" Height="20">
<viblend:MenuItem RootNormalForeBrush="Black" DropDownHeight="150" VerticalScrollBarVisibility="Visible" Text="File">
<viblend:MenuItem Text="Mail Message" ImageSource="images/mail.png"/>
<viblend:MenuItem Text="Note" ImageSource="images/Note.png"/>
<viblend:MenuItem Text="Contact" ImageSource="images/contact.png" />
<viblend:MenuItem Text="Appointment" ImageSource="images/Appointment.png"/>
<viblend:MenuItem Text="Task" ImageSource="images/Task.png" />
<viblend:MenuItem Text="Folder" ImageSource="images/folder.png"/>
</viblend:MenuItem>
</viblend:Menu>
VIBlend Menu for Silverlight is a free component that is part of the VIBlend Controls for Silverlight package.