NOTE: This question is (in part) related to: Simulating events on UIElement's without inheriting on Windows Phone 7
I have made a custom user control using this:
public class MyClass : ContentControl {
public void SomeMethod() {
// ...
}
}
But I am not able to call the RaiseEvent method of ContentControl. IIRC, ContentControl inherits from UIElement
, but why do I get the error saying that RaiseEvent
is not defined in this context?
I'm using Silverlight (Windows Pho开发者_高级运维ne 7), so is it an issue due to that, since it is a subset of WPF and I've been dealing with a lot of lack of functionality in Silverlight.
This is a list of UIElement members in Silverlight:
http://msdn.microsoft.com/en-us/library/system.windows.uielement(v=VS.95).aspx
and this one members in WPF (.net 4.0)
http://msdn.microsoft.com/en-us/library/system.windows.uielement(v=VS.100).aspx
Apparently this method is not included in Silverlight (and WP7).
精彩评论