1
I have a problem in Visual Studio. When I create a new UWP10 project in white, it comes the basic code.
<Page
x:Class="FoxMovieStoreMain.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:FoxMovieStoreMain"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
</Grid>
</Page>
And the designer displays the Page preview normally. But when replacing the XAML code with this:
<Page x:Name="AppMainPage"
x:Class="FoxMovieStoreMain.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:FoxMovieStoreMain"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid x:Name="GridToMainPage">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<RelativePanel x:Name="RelatMainPanelTop" Background="#FFFF6800">
<Button x:Name="HamburgerMenuButton" Content="" FontFamily="Segoe MDL2 Assets" FontSize="22" VerticalAlignment="Stretch" Background="#FFFF6800" Height="39.5" Width="{Binding CompactPaneLength, ElementName=MainSplitView}"/>
<TextBlock x:Name="NavigationTitle" Text="Início" RelativePanel.RightOf="HamburgerMenuButton" Margin="10,0,0,0" FontSize="30" FontWeight="Bold"/>
<TextBox x:Name="MainSearchTextBox" Width="200" PlaceholderText="Buscar" RelativePanel.AlignVerticalCenterWithPanel="True" RelativePanel.LeftOf="MainSearchButtom"/>
<Button x:Name="MainSearchButtom" Content="" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" RelativePanel.AlignRightWithPanel="True" RelativePanel.AlignVerticalCenterWithPanel="True" FontFamily="Segoe MDL2 Assets" FontSize="20" Margin="0,0,10,0"/>
</RelativePanel>
<SplitView x:Name="MainSplitView" Grid.Row="1" DisplayMode="CompactOverlay" CompactPaneLength="46.4" OpenPaneLength="{Binding ActualWidth, ElementName=MainSplitViewListView}">
<SplitView.Pane>
<RelativePanel x:Name="MainSplitRelativPanel">
<ListView x:Name="MainSplitViewListView">
<ListViewItem x:Name="HomeSplittem" HorizontalAlignment="Left">
<StackPanel x:Name="HomeStackPanelViewItem" Orientation="Horizontal">
<TextBlock x:Name="HomeIconSplitItem" FontFamily="Segoe MDL2 Assets" FontSize="22" Text="" VerticalAlignment="Center"/>
<TextBlock x:Name="HomeTextSplitItem" FontSize="22" Text="Início" Margin="11,0,0,0"/>
</StackPanel>
</ListViewItem>
<ListViewItem x:Name="PersonsSplitItem" HorizontalAlignment="Left">
<StackPanel x:Name="PersonsStackPanelViewItem" Orientation="Horizontal">
<TextBlock x:Name="PersonsIconSplitItem" FontFamily="Segoe MDL2 Assets" FontSize="22" Text="" VerticalAlignment="Center"/>
<TextBlock x:Name="PersonsTextSplitItem" FontSize="22" Text="Pessoas" Margin="11,0,0,0"/>
</StackPanel>
</ListViewItem>
<ListViewItem x:Name="MediaSplitItem" HorizontalAlignment="Left">
<StackPanel x:Name="MediaStackPanelViewItem" Orientation="Horizontal">
<TextBlock x:Name="MediaIconSplitItem" FontFamily="Segoe MDL2 Assets" FontSize="22" Text="" VerticalAlignment="Center"/>
<TextBlock x:Name="MediaTextSplitItem" FontSize="22" Text="Mídias" Margin="11,0,0,0"/>
</StackPanel>
</ListViewItem>
<ListViewItem x:Name="MovementsSplitItem" HorizontalAlignment="Left">
<StackPanel x:Name="MovementsStackPanelViewItem" Orientation="Horizontal">
<TextBlock x:Name="MovementsIconSplitItem" FontFamily="Segoe MDL2 Assets" FontSize="22" Text="" VerticalAlignment="Center"/>
<TextBlock x:Name="MovementsTextSplitItem" FontSize="22" Text="Movimentações" Margin="11,0,0,0"/>
</StackPanel>
</ListViewItem>
</ListView>
</RelativePanel>
</SplitView.Pane>
<Frame x:Name="MainSplitViewFrame" FocusVisualPrimaryBrush="{x:Null}"/>
</SplitView>
</Grid>
</Page>
The Designer generates the error:
This only happens with my code, if I return the previous code the designer back to work.
True, grotesque bug, :-. Actually this code is part of a project that was already working when the designer stopped suddenly presenting the image error. So to check if the problem was with my XAML code I created a blank project to test and pasted the code there, but the error was repeated.
– Matheus Saraiva