Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/visual-studio-2010/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Wpf 工具箱中的UserControl默认名称_Wpf_Visual Studio 2010_Xaml - Fatal编程技术网

Wpf 工具箱中的UserControl默认名称

Wpf 工具箱中的UserControl默认名称,wpf,visual-studio-2010,xaml,Wpf,Visual Studio 2010,Xaml,在开发一些内部使用的用户控件时,我遵循了MSDN中的exmaple 我遇到的问题是,当工具从工具箱拖到工作区时,默认名称不会自动生成 向外拖动按钮可提供以下信息: <Button Content="Button" Height="23" HorizontalAlignment="Left" Margin="41,157,0,0" Name="button1" VerticalAlignment="Top" Width="75" /> 当我把我的拖出时,我得到: <my:

在开发一些内部使用的用户控件时,我遵循了MSDN中的exmaple

我遇到的问题是,当工具从工具箱拖到工作区时,默认名称不会自动生成

向外拖动按钮可提供以下信息:

<Button Content="Button" Height="23" HorizontalAlignment="Left" Margin="41,157,0,0" Name="button1" VerticalAlignment="Top" Width="75" />

当我把我的拖出时,我得到:

<my:MyUserControl HorizontalAlignment="Left" Margin="101,105,0,0" VerticalAlignment="Top" />


默认情况下,该控件不会命名。此设置和其他设置是否在控件代码中的某个位置可控?我希望它的名称类似于
Name=“MyUserControl1”

您找到解决方案了吗?