예제 #1
0
        public static void Initialize(IntPtr handle)
        {
            if (Instance != null)
            {
                throw new InvalidOperationException("WindowCollection already initialized.");
            }

            WindowCollection windowCollection = new WindowCollection(handle);

            _instance = windowCollection;
        }
예제 #2
0
        void MainWindowLoaded(object sender, RoutedEventArgs e)
        {
            IntPtr intPtr = new WindowInteropHelper(this).Handle;

            WindowCollection.Initialize(intPtr);
        }