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