HiI wish to use either xamOutlook bar or xamRibbon in combination with TabControl. A master detail implementation. Is it possible to hide the actual tabs themselves. Or is there better control to use other than the xamTabControl? Hope that makes sense. To further explain. I wish to have the behavior of having the detail panels change depending on what the user is trying to do.
Thanks
Hello cjacobs11 ,
Are you thinking of driving the current (selected) tab with an item from the OutlookBar or the Ribbon?
If so, you could override the control template to hide the tab items. You could also bind the SelectedIndex in a XamTabControl to the ListBox SelectedIndex to drive selection. I've attached a simple WPF VS2008 sample to illustrate how to do this.
Let me know if you need further assistance.
Hi Curtis,
I am caught up with a very weired when using tab control along with XamOutlookBar. I want ot create a tab control with Xamoutlookbar as the UI for each TabItem and maintain selection of the outlookbargroup across TabItems.
What i am looking at is creating a tab control with ItemsSource as my list of CustomObject(MyDepartment). Each of these CustomObjects have a list of Custom objects(MyEmployee) in turn. Now the DataTemplate for the MyDepartment object is a XamOutlookBar hence each tabitem will be represnted by a XamOutloookBar. Each MyEmployee object represents a OutlookBarGroup.
Now say i have 2 tabs and in tab 1's XamOutlookBar i have selected group 2(in all 3 groups) and i navigate to tab item 2. A new UI is rendered using the same XamOutlookBar due to UI virtulization and here i selected XamOutlookBar's group1(in all 3 group). Now when i switch back to TabItem 1 should still be able to see group 2 as selected.
I have created all the bindings, converters,corresponding custom objects, and built he logic to maintain he selection etc but am facing an issue.
When i have a single tabitem all is fine and i can easily navigate between Groups with no issue. But as soon as I add more than one TabItem and then when i switch between 1->2->1 and then try to navigate between groups the SelectedGroup becomes Null :(. I am really caught up with this one and see no way out of this. On Navigating to other group the convertor's ConvertBack for the SelectedGroup is fired first and then it in turn calls the setter of the Vm.SelectedGroup properrty. All is well and the value is correct, now i the PropertyChange event is fired from the setter and all hell breaks loose as somehow the converter's ConvertBack is called again and and this time the value is null for the selected group.
I need help badly on this on
Hi,
Is this something you can replicate with a simplified sample project? If yes, please attach the project and I will look into this ASAP. I can help determine what the nature of the problem is and how to fix it.
If this is something that you do not have time to try to replicate, I suggest you open a developer support case with Infragistics. This way a support engineer can work with you to try to replicate the issue. They would also determine if you have uncovered a bug with the product.
To submit a case with support, please go to the following website:http://ko.infragistics.com/support/submitrequest.aspx
Thank you,
Thanks for the quick reply. Please find attached the sample project.
Prayag
Hello Prayag,
For some odd reason only one XamOutlookBar is being generated and appears to be applied to both TabItems even though the correct data for each tab is being applied to the OutlookBar on switching tabs. This might be the source of the problem. The ItemsContainer style and the DataTemplate looks fine. Also, I can replicate the problem of only one element being generated with any element I add to the TabItem DataTemplate, so this appears to possibly be a XAML syntax problem or bug and not specific to the XamOutlookBar. However, I have asked the lead engineer for the XamOutlookBar to look into this to see if he sees why this problem would be occurring.
I will get back to you as soon as I hear back from him. Thank you for the sample project, it has helped us see the problem perfectly!
Sincerely,
As you mentioned indeed only one XamOutlookBar is being instantiated for any number of tabitems. What i would like to add into this is it is not an issue with the xaml but virtue of the UI Virtulization feature. So for all datatemplates this happens but if you add tabitems statically in teh markup instead of supplying ItemsSource then each tabitem will use different instance.
Now to the real issue, even though the same instance is being used across tabteims, on datacontext change one expects that all data and bindings should be reinitailized and which happens as noted by you and appearent in the sample. But to me the issue is selected group being set to null upon switching between tabitems. It looks like somewhere the binding arenot getting cleared or the property chagne evetn is not being handled correctly or some misunderstanding on my part.
In any case i greatly appriciate your help and quick response, hoping to hear about some resolution on this from you soon.
Sorry for bugging you but this has become a critical issue for us. Any updates on this one?
Until support can get back to you next week, I found the following webpage that talks about how the WPF TabControl actually re-uses the same elements instantiated by a DataTemplate for each TabItem.
http://stackoverflow.com/questions/1965355/how-to-add-new-user-control-in-tabcontrol-contenttemplate
I had not heard of that behavior. This is going to be a problem for the XamOutlookBar as I do not think it is expecting to be re-initialized when the selected tab changes. When support comes through you can explain that the XamOutlookBar not supporting this WPF fearure could be considered the bug.
This means to get this to work you need to have two XamOutlookBar elements instantiated for the two TabItems. If there is a way to turn off the virtualization of the TabControl, that might be the solution. However, you may need to programmatically instantiate two TabItems with two XamOutlookBar elements and then assign the appropriate binding expressions.
Once support gets a hold of you you can explore further ideas. However, since you said this was critical, I suggest the above example as it will ensure that you have two XamOutlookBar elements that stay around in memory when the user switches tabs.
So far I have not been able to figure out what is going on. I have created a developer support case for you so that a support engineer might help you explore this issue further.
The case numner is CAS-51708-321BM1