Search code examples
c#visual-studiovisual-studio-2015uisplitviewcontrolleruwp

UWP SplitView Issue After Installing Visual Studio 2015.1


After installing update 1 for Visual Studio 2015, SplitView control for UWP broken on Windows 10. As you know, SplitView have 2 sub items, an object grid and pane.

Now, an XAML error says that, "You cannot insert a object into SplitView".

enter image description here

I'm trying move object grid outside of SplitView. It is running at this case. However, the grid could not fitting the UI.

In addition to this, when I try adding new SplitView control to the page, it thrown a NullReferenceException.

enter image description here

I have not any issues like that on VS 2015 RTM. Are anyone encountered with this issue ? Thanks...

My XAML Code is here:

 <SplitView x:Name="MenuViewer" Margin="0" OpenPaneLength="200" PaneBackground="{StaticResource BorderColor}" RequestedTheme="Light" DisplayMode="CompactOverlay" FontSize="16" PaneClosing="MenuViewer_PaneClosing">
                <SplitView.Pane>
                    <Grid x:Name="PanelGrid" ManipulationCompleted="PanelGrid_ManipulationCompleted" ManipulationMode="TranslateX">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="48"/>
                            <RowDefinition/>
                        </Grid.RowDefinitions>
                        <Grid x:Name="MenuButtonGrid" Margin="0" Background="{StaticResource Dark Main Color}" RequestedTheme="Light">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="50"/>
                                <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <Button x:Name="HamburgerButton" FontFamily="Segoe MDL2 Assets" Content="&#xE700;" Background="Transparent" Click="HamburgerButton_Click" VerticalAlignment="Center" Foreground="White" HorizontalAlignment="Center" RequestedTheme="Light" FontSize="16" Width="48" Height="48"/>
                            <TextBlock x:Name="MenuText" Grid.Column="1" Margin="10,12" TextWrapping="Wrap" Text="Menu" Foreground="White" RequestedTheme="Light" FontSize="16"/>
                        </Grid>
                        <Grid x:Name="MenuStack" Margin="0,10,0,0" Grid.Row="1">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition/>
                                <RowDefinition Height="Auto"/>
                            </Grid.RowDefinitions>
                            <Grid.Transitions>
                                <TransitionCollection>
                                    <EdgeUIThemeTransition Edge="Bottom"/>
                                    <EntranceThemeTransition/>
                                </TransitionCollection>
                            </Grid.Transitions>
                            <StackPanel x:Name="UserDetailPanel" Orientation="Vertical">
                                <Image x:Name="UserImage" Source="ms-appx:///Images/ProfileHolder.png" Width="100" Height="100" Margin="0"/>
                                <TextBlock x:Name="UserName" TextWrapping="Wrap" Text="" FontSize="16" Margin="10,0" TextAlignment="Center"/>
                                <Border x:Name="LogoutBorder" HorizontalAlignment="Center" VerticalAlignment="Center" BorderThickness="0,0,0,1"  Margin="0,10,0,0" PointerEntered="LogoutBorder_PointerEntered" PointerExited="LogoutBorder_PointerExited" PointerPressed="LogoutBorder_PointerPressed" BorderBrush="{StaticResource TextColor}" >
                                    <TextBlock x:Name="LogoutText" TextWrapping="Wrap" Text="Logout" Foreground="#FF777777" TextAlignment="Center"/>
                                </Border>
                            </StackPanel>
                            <ListView x:Name="MenuList" ItemsSource="{Binding Menu}" ItemTemplate="{StaticResource ListView_TripItemTemplate}" FontSize="16" SelectionChanged="MenuList_SelectionChanged" Margin="-10,10,0,0" Grid.Row="1" VerticalAlignment="Top" />
                            <ListView x:Name="MenuList_2" ItemsSource="{Binding Second_menu}" ItemTemplate="{StaticResource ListView_TripItemTemplate}" FontSize="16" VerticalAlignment="Bottom" SelectionMode="None" Margin="-10,0,0,48" Grid.Row="2" />
                        </Grid>
                    </Grid>
                </SplitView.Pane>
                <Grid x:Name="Main" Background="{StaticResource Background}" ManipulationMode="TranslateX" ManipulationCompleted="Main_ManipulationCompleted">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="48"/>
                        <RowDefinition/>
                    </Grid.RowDefinitions>
                    <Grid x:Name="Header" Margin="0" Background="{StaticResource Dark Main Color}">
                        <Grid.Transitions>
                            <TransitionCollection/>
                        </Grid.Transitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="64"/>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                            <ColumnDefinition Width="64"/>
                        </Grid.ColumnDefinitions>
                        <Button x:Name="HamburgerButton2" FontFamily="Segoe MDL2 Assets" Content="&#xE700;" Background="Transparent" Click="HamburgerButton_Click" VerticalAlignment="Center" Margin="0" HorizontalAlignment="Center" Foreground="White" FontSize="16" RequestedTheme="Light" Visibility="Collapsed"/>
                        <Button x:Name="AddButton" FontFamily="Segoe MDL2 Assets" Content="&#xE710;" Background="Transparent" Click="AddButton_Click" VerticalAlignment="Center" Margin="0" HorizontalAlignment="Center" Foreground="White" FontSize="16" Grid.Column="3" RequestedTheme="Light" Width="64" Height="48"/>
                        <AutoSuggestBox x:Name="SearchBar" Grid.Column="2" VerticalAlignment="Center" Margin="10,0" PlaceholderText="Search" FontSize="16" Style="{StaticResource AutoSuggestBoxStyle_TripLog}" BorderThickness="0" QuerySubmitted="SearchBar_QuerySubmitted" Background="#B2E9E9E9">
                            <AutoSuggestBox.QueryIcon>
                                <SymbolIcon Symbol="Find"/>
                            </AutoSuggestBox.QueryIcon>
                        </AutoSuggestBox>
                        <Button x:Name="Search_Button" FontFamily="Segoe MDL2 Assets" Content="&#xE71E;" Background="Transparent" Click="Search_Button_Click" VerticalAlignment="Center" Margin="0" HorizontalAlignment="Right" Foreground="White" FontSize="16" Grid.Column="2" RequestedTheme="Light" Width="64" Height="48" Visibility="Collapsed"/>
                        <TextBlock x:Name="Operation_Header" Margin="10,12" TextWrapping="Wrap" Text="Test" FontSize="16" Foreground="White" RequestedTheme="Light" Grid.ColumnSpan="2"/>
                    </Grid>
                    <Grid x:Name="MobileSearch_Grid" Grid.Row="1" Visibility="Collapsed">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="48"/>
                            <RowDefinition/>
                        </Grid.RowDefinitions>
                        <AutoSuggestBox x:Name="SearchBar_Mobile" VerticalAlignment="Stretch" Margin="10,5" PlaceholderText="" FontSize="16" Style="{StaticResource AutoSuggestBoxStyle_TripLog}" BorderThickness="0,0,0,13" QuerySubmitted="SearchBar_QuerySubmitted" Background="#B2E9E9E9"/>
                    </Grid>

                </Grid>
            </SplitView>

Solution

  • Answer which comes from Microsoft Connect solves my issue. Thanks for contiributions.

    Hi.

    We have worked with the Windows SDK team to get this fixed in a future version of the Windows Software Development Kit. We have a workaround that should fix the issue for you. Please "repair" the install, by opening "Add or remove programs," and repairing the "Windows Software Development Kit" matching the version 10.0.10586.15.

    Thank you!

    Jeremiah