C# 用户控件内容不能设置多次
用户控制有一些问题。我无法摆脱内容设置多次错误 据我所知,共同的原因是。。嗯,内容设置不止一次。例如,有多个子项或通过content=.设置内容。。然后在标记之间指定另一个内容 但是,这是VisualStudio生成的用户控件,我没有对xaml进行任何更改C# 用户控件内容不能设置多次,c#,wpf,xaml,user-controls,C#,Wpf,Xaml,User Controls,用户控制有一些问题。我无法摆脱内容设置多次错误 据我所知,共同的原因是。。嗯,内容设置不止一次。例如,有多个子项或通过content=.设置内容。。然后在标记之间指定另一个内容 但是,这是VisualStudio生成的用户控件,我没有对xaml进行任何更改 <UserControl x:Class="TMEGadget.View.Toolbox" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/present
<UserControl x:Class="TMEGadget.View.Toolbox"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<Grid>
</Grid>
</UserControl>
有什么建议吗
附言:有人能告诉我,为什么当我试图键入Hey,\n\n一些文本…,Hey,\n\n会被删除
编辑:重新启动VS修复了问题,谢谢@Bolu你想在哪里添加这个content@Sajeetharan这里的内容是指用户控件?如果是这样,现在重建项目或重新启动VS可能..@Bolu重新启动VS实际上解决了问题,谢谢