Here are the examples of the csharp api class System.Windows.Forms.Control.With(System.Func) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Example
0
1. Example
Project: DevExpress.Mvvm.Free
Source File: SplashScreenOwner.cs
Source File: SplashScreenOwner.cs
void TryInitializeWindowForm() { if(IsInitialized) return; HwndSource source = (WindowObject as Visual).With(x => PresentationSource.FromVisual(x) as HwndSource); if(source == null || source.Handle == IntPtr.Zero) return; Form = System.Windows.Forms.Control.FromChildHandle(source.Handle).With(x => x.FindForm()); if(Form != null) { Handle = Form.Handle; ManagedThreadId = (int)(Form.Invoke(new Func<int>(() => Thread.CurrentThread.ManagedThreadId))); CompleteInitialization(); } }