Ejemplo n.º 1
0
        /// <summary/>
        public static void WaitForCompleteRender()
        {
            Type            hwndTargetType = typeof(HwndTarget);
            TrustedAssembly mcasm          = TrustedAssembly.GetAssembly(hwndTargetType);
            TrustedType     mcType         = mcasm.GetType("System.Windows.Media.MediaContext");

            object mediaContext = mcType.InvokeMember("From", BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.InvokeMethod, null, null, new object[] { System.Windows.Threading.Dispatcher.CurrentDispatcher });

            mcType.InvokeMember("CompleteRender", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.InvokeMethod, null, mediaContext, new object[] { });
        }
Ejemplo n.º 2
0
        /// <summary>
        /// This summary has not been prepared yet. NOSUMMARY - pantal07
        /// </summary>
        public object MakeValue(string value, Type type)
        {
            TrustedType t = PT.Trust(typeof(StringConverter));

            return(t.InvokeMember("To" + type.Name, BindingFlags.Static | BindingFlags.Public | BindingFlags.InvokeMethod, null, null, new object[] { value }));
        }