|
|
Do not hit 'reply' to this email: To reply, click here.
Gautier Boder has posted a new comment at "Article "WPF: If Heineken did MVVM Frameworks Part 6 of n"":
Hi,
We're trying to use yourTabControlExwithin our application in cohabitation with the MVVM pattern but instead of having it within aWindowelement we declared it within anUserControlelement. The result is that the first displayed tab (the one added on the application's startup) is selected but has no content shown.
If you look at the visual tree (using snoop) the ContentPresenter that should be showing the view matching the selected workspace viewmodel just doesn't exists at all. TheGridhas no children.
Digging further into the implementation of yourTabControlExwe've found that when you reside within aWindowfirst the data binding is done and the only the template is applied. Being within anUserControlworks exactly the opposite, first the template is applied and then only the DataBinding is done.
This cause the template to be applied with an empty Items collection at this point of time.
We don't know if this could cause the problem of my "empty" tab as when we're using the nativeTabControlcontrol directly also in combination with MVVM,DataTemplateandViewModelit works ... Weirdo isn't ? Do Microsoft have a really hidden logic within its control that isn't called just by calling the base constructor? Or is their some hidden events that we're not able to overload or handle when overwriting the control?
Any thoughts or digging way would be really appreciated.
Thanks to anyone who used this TabControlEx to post their feedback.
Gautier