private static RoutedEvent RoutedEvent (Type eventids, string type, string event_name)
{
string field_name = String.Concat (type, "_", event_name, "Event");
FieldInfo field = eventids.GetField (field_name);
if (field == null)
return null;
return new RoutedEvent ((int) field.GetValue (null));
}