安装后 UWP SplitView 问题 Visual Studio 2015.1

UWP SplitView Issue After Installing Visual Studio 2015.1

安装 Visual Studio 2015 更新 1 后,UWP 的 SplitView 控件在 Windows10 上损坏。如您所知,SplitView 有 2 个子项,一个对象网格和一个窗格。

现在,XAML 错误表明,"You cannot insert a object into SplitView"。

我正在尝试将对象网格移出 SplitView。在这种情况下是 运行 。但是,网格无法拟合 UI。

除此之外,当我尝试向页面添加新的 SplitView 控件时,它抛出了 NullReferenceException。

我在 VS 2015 RTM 上没有任何类似的问题。有人遇到过这个问题吗? 谢谢...

我的XAML代码在这里:

 <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>

Microsoft Connect 的回答解决了我的问题。感谢贡献。

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