lundi 30 mars 2015

Visual C# 2013 - Element disappearing when adding a new one in WPF form editor

When I try adding more than one element to my WPF form in the editor in VC#2013, the previous element disappears. In the end, I can't have more than one item in the form. I've already written some code so I'd prefer not starting again from scratch. The form has nothing special besides being borderless, fullscreen and starting maximized. This is the XAML code for the form right now:



<Window x:Class="queue_bigscreen.MainWindow"
xmlns="http://ift.tt/o66D3f"
xmlns:x="http://ift.tt/mPTqtT"
Title="MainWindow" Height="1080" Width="1920" WindowStyle="None" ResizeMode="NoResize" WindowState="Maximized" Background="#FF9EA7CD">
<Label x:Name="nowServingLabel" Content="0" Margin="42,56,1160,131" Foreground="White" Height="893" FontSize="700" HorizontalContentAlignment="Center">
<Label.Effect>
<DropShadowEffect ShadowDepth="13"/>
</Label.Effect>
</Label>
</Window>


And this is what I get after I select a textbox and try adding it to the form:



<Window x:Class="queue_bigscreen.MainWindow"
xmlns="http://ift.tt/o66D3f"
xmlns:x="http://ift.tt/mPTqtT"
Title="MainWindow" Height="1080" Width="1920" WindowStyle="None" ResizeMode="NoResize" WindowState="Maximized" Background="#FF9EA7CD">
<TextBlock HorizontalAlignment="Left" Margin="1332,382,0,0" TextWrapping="Wrap" Text="TextBlock" VerticalAlignment="Top"/>


As you can see, the label disappears, and the textbox I added in turn disappears if I try adding something else. Am I doing something wrong or is it a known bug?


Aucun commentaire:

Enregistrer un commentaire