Ticket T290680
Visible to All Users

Problem with BackstageViewControl and MVVM

created 9 years ago

Hello,

I'm using BackstageViewControl with MVVM.
First problem is when data is loaded to model I see selected but not opened tab (Image 01). After loading data I set SelectedTab to null and IsOpen to false. For me will be good that this tab is not selected.

Second problem is when I clear data model and set SelectedTab to null and IsOpen to false, control pane area is not cleared (Image 03).
On Image 02 is visible what is control pane show when is selected first tab.

Here is code how I bind BackstageViewControl to model

XAML
<dxr:BackstageViewControl x:Name="menuControl" IsOpen="{Binding IsOpen, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" RibbonStyle="Office2010" SelectedTab="{Binding SelectedMenuItem, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" TabPaneMinWidth="200"> <dxr:BackstageTabItem x:Name="btiMonitoring" Content="{x:Static pres:Resources.mainMenuMonitoring}" Visibility="{Binding MenuList_Monitoring_IsVisible, Converter={StaticResource boolToVisibilityConverter}}"> <dxr:BackstageTabItem.ControlPane> <dxlc:TileLayoutControl ItemTemplate="{StaticResource MenuTileTemplate}" ItemsSource="{Binding MenuList_Monitoring}" Style="{StaticResource MainMenuTileStyle}" /> </dxr:BackstageTabItem.ControlPane> </dxr:BackstageTabItem> ...

Regards

Answers approved by DevExpress Support

created 9 years ago (modified 9 years ago)

Hello Krunoslav,
Thanks for the provided code snippet. By design, when you open the application menu, the BackstageView is loaded and the first item is selected. If you need to show the BackstageView without selecting any item, set the SelectedTab to null, as you are doing now.
I have attached a simple sample based on your code snippet to show how it works.
As for the second issue, it seems that this behavior is unexpected. I have created a separate ticket on your behalf and passed it to our developers for further research: The ControlPane’s content isn’t cleared when the BackstageTabItem’s Visibility is set to Collapsed.
Thanks,
Nadya

    Show previous comments (3)
    Kirill (DevExpress Support) 9 years ago

      OK Krunoslav, we will wait for your sample project.

      KK KK
      Krunoslav Kanjuh 9 years ago

        Hi Kirill,
        I make sample project and now everything work fine. Only different between sample project and my project is that in my project I use Galasoft MVVM and in sample project I use Devexpress MVVM.
        I will investigate this.
        Thank you for help.
        Regards,
        Krunoslav

        Kirill (DevExpress Support) 9 years ago

          You are welcome!

          Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

          Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.