static IntPtr InvokeGetDefaultTemplate (IntPtr fwe_ptr)
{
IntPtr result = IntPtr.Zero;
UIElement root = null;
try {
FrameworkElement element = (FrameworkElement) NativeDependencyObjectHelper.FromIntPtr (fwe_ptr);
root = element.GetDefaultTemplate ();
if (root != null)
result = root.native;
} catch (Exception ex) {
try {
Console.WriteLine ("Moonlight: Unhandled exception in FrameworkElement.InvokeGetDefaultTemplate: {0}", ex);
} catch {
// Ignore
}
}
return result;
}