This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Yo
I need to hide one or more outlook bar items depending on who is logged in to our app. Is this possible? There doesnt seem to be any properties on the OutlookBarItem I can use.
Merry Christmas :) |
|
|
Merry Christmas Jonesie Just to clarify, by 'hiding' and item, you wish to make it become invisible and not just programatically collapse it into the icon tray correct? - Jason |
|
|
Yup, exactly, I want it gone completely for some users.
|
|
|
One possibly way of achieving this effect is to add or remove items from the OutlookBar. Here is one approach to doing this: In xaml, load the OutlookBar with all the different items. Then find a place in the code behind that will be called after the OutlookBar has been populated with items. The constructor of a Window or Page that hosts the OutlookBar would be good for this. Next, iterate through the OutlookBar.Items collection and store each one in a list. This list will act as an items-store which you can use to add items back in if they have been removed from the OutlookBar. Based on who is logged in, you can remove items from the OutlookBar.Items collection. If a different person logs in, you can add items back to the OutlookBar from the items-store if necessary. Let me know if this is not ideal for your application and I will implement some kind of visibility property on the OutlookBarItems. - Jason |
|
|
Hi That sounds reasonable - I'll do that for now - but a visibility property would be a lot easier... then I could just bind this to the view model. Cheers |
|
|
Great, I'll start implementing this now and let you know how it goes. - Jason |
|
|
Hello I have put a property called Visibility on the OutlookBarItem class. The type of this property is the standard WPF Visibility enum. Setting this property to Visibility.Collapsed will achieve the effect your looking for. If you collapse the selected item, the next visible item will automatically be selected. And I've also made sure that collapsed items can not be programatically selected. Changing an item to use Visibility.Visible will dynamically display it again in its original position. This update is available through the nightly builds from tomorrow the 18th of December. Let me know if you run into any troubles. Regards |
|
|
Sweet! The usual awesome rockage from you guys.
Cheers |
|