Visual Studio Designer not showing controls for UW

2019-07-23 04:52发布

问题:

XAML Designer is not displaying controls in a way they are visble. The controls are there, if you click where one should be the outline borders are highlighted and the proper xaml code is selected. With nothing selected it looks like a blank pallet with just the page outlined. I have tried the blue, blue extra contrast, dark and light color theme. Same issue all themes. I have also tried switching between ARM, x86 and x64 with issue in all three. There are no messages in the Error List. Have opened multiple solutions same result.

回答1:

As i build your code which gives correct output

Your Codes

<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
    <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
        <Ellipse Name="LED" Fill="LightGray" Stroke="White" Height="100" Width="100" Margin="10" />
        <TextBlock Name="DelayText" Text="500ms" Margin="10" TextAlignment="Center" FontSize="26.667"/>
        <TextBlock Name="GpioStatus" Text="Waiting To Initialize GPIO..." Margin="10,50,10,10" TextAlignment="Center" FontSize="26.667" />
    </StackPanel>
</Grid>

Output

Suggestion

For Better Alignment Of Elements You Can Use RelativePanel which allow Developer to better arrangement of elements in UWP apps

Further the problem you face in visual studio Designer is Related to your CPU performance which protect designer to update in real time, you can try Debug your app which may give correct result. And find processes in task manager any process other than visual studio and its components may consume your CPU and RAM-

And View Your System Configuration which should be enough but you don't need very high configuration PC for app development it should minimal which can easily handle all visual studio process , if you planning to game development then you need a higher one according to your game development.



标签: uwp designer