1

Resolved

Drag cannot initiated after async load, making submenus more accessible, adding horizontal gridsplitter

description

Steps to reproduce:
  1. Run attached solution
  2. Drag vertical gridsplitter down or up a bit.
Observed:

o1. Gridsplitter jumps to bottom. Dragging is no more possible.

o2. Only 7 icons are visible. Other buttons cannot selected.

Additional questions:
  1. Only first items in button submenu are visible if button is clicked.
How to force more submenu rows to be visible if button is opened ?
How to adjust button submenu area height according to items in submenu and add scrollbar to button submenu if there
are more items than fits to screen?
  1. How to add horizontal gridsplitter so that control width can changed incrementally ?

file attachments

comments

delordson wrote Aug 18, 2010 at 5:30 AM

Hi,

First you need to change this:

private void UserControl_Loaded(object sender, RoutedEventArgs e)
{
Dispatcher.BeginInvoke(LoadMenu);
}

to this:

private void UserControl_Loaded(object sender, RoutedEventArgs e)
{
//Dispatcher.BeginInvoke(LoadMenu);
LoadMenu();
}

Then make sure the Content of each OutlookBarButton is wrapped in a Scrollviewer. The OutlookBar will then work as expected.

For the 7 buttons question, this is how Microsoft Outlook itself works. You can only see as many buttons as the is space for. The only difference is that with Microsoft Outlook the buttons scroll across to the right so that the most recent button is always visible. I will mimic this behavior in the next update.

Thanks
Delordson

kobruleht wrote Aug 18, 2010 at 8:23 AM

If real applicaton OutlookBar is populated from results returned from web service . Testcase tries to mimic this by using Dispatcher.BeginInvoke.
Your fix which removes Dispatcher.BeginInvoke makes populate synchronous.

How to populate from results returned from web service if async populate cannot used ?

kobruleht wrote Aug 18, 2010 at 4:08 PM

This issue occurs if there are certain number of buttons. For some other number of buttons it does not occur.

kobruleht wrote Aug 18, 2010 at 5:08 PM

I "fixed" this by setting control to collapsed state in xaml:
   <my:OutlookBar Visibility="Collapsed" 
and making it visible after it is populated in async load event.