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 Phone 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).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.