Type t = typeof(LLCommands); >> PropertyInfo p = t.GetProperty("LockDown", BindingFlags.Public | BindingFlags.Static); >> RoutedUICommand r = (RoutedUICommand) p.GetValue(LLCommands.LockDown,null); >> SupportedCommands.Add(r);obviously needs a bit of exception handling tho.....
>var t = typeof(LLCommands); >var routedCommand = (RoutedUICommand) t.InvokeMember("LockDown", BindingFlags.GetProperty, null, t, new object[0]); >Hi,