I have a listbox with a style that has rounded corners. I'd like to add a toolbar inside the listbox that pertains to that specific list box. Currently, if I add a toolbar inside the grid that contains a listbox, it will overlap the last item in the row (depending on the height of the toolbar). Does anyone have any ideas on the best way to implement this? I know I could create a border control that matches the look of the listbox edges and then place a listbox that has a style without borders inside the main border stacked with the toolbar at the bottom, but I'm hoping there is a better way to keep my current listbox style and just place a toolbar inside the bottom of the listbox that doesn't hide any listbox items.
Thanks,
John
Best Answer
Not sure I follow entirely, but I think you have a couple of options:
ToolBar
into theListBox
template, probably by writing a control that extendsListBox
and adds a property to set theToolBar
items.Border
on theListBox
and stick your ownBorder
around it that also encompasses theToolBar
.2 is a little easier and is probably what you want.
Example of 1
(I didn't bother subclassing ListBox here - I just hard-coded some ToolBar items instead)
Example of 2
In both cases, the result looks similar:
alt text http://img42.imageshack.us/img42/372/screenshotof.png