I am developing an application with the use of dragablz, MahApps and MaterialDesign. However, I have broken down the problem to the dragablz and MahApps extension.
I create two tab items (extract from demo code):
<controls:MetroWindow x:Class="MahMaterialDragablzMashUp.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:dragablz="clr-namespace:Dragablz;assembly=Dragablz"
xmlns:mahMaterialDragablzMashUp="clr-namespace:MahMaterialDragablzMashUp"
xmlns:dockablz="clr-namespace:Dragablz.Dockablz;assembly=Dragablz"
xmlns:wpf="http://materialdesigninxaml.net/winfx/xaml/themes"
WindowTransitionsEnabled="False"
TextElement.Foreground="{DynamicResource MaterialDesignBody}"
Background="{DynamicResource MaterialDesignPaper}"
GlowBrush="{DynamicResource AccentColorBrush}"
FontFamily="{StaticResource DefaultFont}"
Title="Material-MahApps-Dragablz Mash Up" Height="640" Width="800">
<dockablz:Layout>
<dragablz:TabablzControl BorderThickness="0"
Margin="0,-1,0,1">
<dragablz:TabablzControl.InterTabController>
<dragablz:InterTabController />
</dragablz:TabablzControl.InterTabController>
<TabItem Header="DIALOGS">
<mahMaterialDragablzMashUp:Mah Margin="16" />
</TabItem>
<TabItem Header="MAHAPPS">
<mahMaterialDragablzMashUp:Mah Margin="16" />
</TabItem>
</dragablz:TabablzControl>
</dockablz:Layout>
</controls:MetroWindow>
The code works fine, but when I try to switch to another tab in the XAML designer by clicking on it, the whole section is selected but not any single object, so I cannot click on another tab:
The view in the designer changes when I click into the corresponding code lines in the XAML editor, but not when I click on the object in the designer. This makes simple design steps (like moving buttons around) very difficult as I cannot click and drag them. Up to now, I have tried the following:
- using Visual Studio 2013 Professional
- using Visual Studio 2015 Community
- Build the project
- restart VS and the computer
I found the following question and the provided solution by 'JFTxJ' (that empty Grid elements are causing the problem) is not working for me, as I do not have any Grid items.
Same for the answer from 'Moon Waxing' (to add the attribute Visibility="Collapsed" to the tabiItem) is not working for me.
Other StackOverflow question: Cannot click or select Control XAML design
Is this a common problem or is there any solution to it?
