Hi,
1) ) When I use a stack panel to include a picture in the header contents, the contents are displayed as expected in the group header. However, when the group is selected, the selected group header at the top of the outlook bar displays the class name rather than the contents.
var pnl = new StackPanel { Orientation = Orientation.Horizontal };
using ( var resource = some image resource) )
if ( resource != null ) {
var src = new BitmapImage();
src.SetSource(resource);
pnl.Children.Add(
new Image {Source = src});
}
grp.Header = pnl;
2) Tooltip do not show when I hover over the group headers.
grp.ToolTip = "some text";
In the examples "grp" is of the type OutlookBarGroup. Could you kindly inform me why these are so?
Thanks
The behavior in both cases is by design:
1) If you would like to have the stack panel in the Selected Header area, you would need to use the HeaderTemplate property of the OutlookBarGroup. Try replacing the usage of the Header property with the HeaderTemplate.
2) The Tooltips of the Groups are only being displayed when XWOB is minimized, or the Group is in the Overflow Area.
HTH,
The workaround for header text display is to define a define a custom stack class derived from the stack controll and override the ToString method to return just the text value.
Regards
Babu