2011-07-10 61 views
0

注:这个问题(部分)有关:Simulating events on UIElement's without inheriting on Windows Phone 7Windows Phone中没有ContentControl.RaiseEvent 7

我做了一个自定义的用户控件使用此:

public class MyClass : ContentControl { 
    public void SomeMethod() { 
     // ... 
    } 
} 

但我不能调用ContentControl的RaiseEvent方法。 IIRC,ContentControl中从UIElement继承,但为什么我得到的错误,说RaiseEvent未在此背景下定义?

我使用Silverlight(Windows Phone 7的),那么,这归因于一个问题,因为它是WPF的一个子集,我一直在处理大量的缺乏Silverlight的功能。

回答