0
我有一个wormControl类,它应该从MyUserControl继承,但是在构建解决方案时,wormControl将从UserControl继承。 无论如何,我希望它从MyUserControl继承。如何实现它?防止继承UserControl
这里是我的用户控件XAML文件:
<UserControl
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:System="clr-namespace:System;assembly=mscorlib"
mc:Ignorable="d"
x:Class="FishGameAnimations.wormControl"
d:DesignWidth="575" d:DesignHeight="339">
/* ...other stuff... */
</UserControl>
继承是在你的wormControl后面的代码中处理的。请张贴此代码并澄清您的问题。 – 2012-08-17 09:49:46
尝试[从WPF中的UserControl继承](http://stackoverflow.com/questions/269106/inheriting-from-a-usercontrol-in-wpf)。 – Rafal 2012-08-17 09:55:58
@Michael你解决了你的问题吗? – Artiom 2012-08-18 04:20:00