从工具箱中删除控件会替换以前的代码

时间:2014-12-15 00:49:51

标签: xaml visual-studio-2013 drag-and-drop windows-phone-8.1 toolbox

我对Windows Phone 8.1 SL应用程序中的XAML代码有一个奇怪的问题。我创建了一个数据透视页面。所以我有类似的东西:

<!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <phone:Pivot Title="MYAPP">
            <!--Pivot item one-->
            <phone:PivotItem x:Name="pivotPaliwo" Header="Alcohol" />


            <!--Pivot item two-->
            <phone:PivotItem Header="Cigarette"/>
        </phone:Pivot>
    </Grid>

当我拖放时,例如它创建此代码的按钮:

<Button Content="Button" HorizontalAlignment="Left" Margin="108,192,0,0" VerticalAlignment="Top"/>

所以没关系。但是,当我尝试添加另一个按钮(它无关紧要)时,替换该代码的新代码。

我无法通过从工具箱中删除来添加一个控件。为什么会这样?

0 个答案:

没有答案