internal ThumbnailToolbarProxyWindow(System.Windows.UIElement windowsControl, ThumbnailToolBarButton[] buttons) { if (windowsControl == null) { throw new ArgumentNullException("windowsControl"); } if (buttons != null && buttons.Length == 0) { throw new ArgumentException(LocalizedMessages.ThumbnailToolbarManagerNullEmptyArray, "buttons"); } _internalWindowHandle = IntPtr.Zero; WindowsControl = windowsControl; _thumbnailButtons = buttons; // Set the window handle on the buttons (for future updates) Array.ForEach(_thumbnailButtons, new Action<ThumbnailToolBarButton>(UpdateHandle)); }
internal ThumbnailToolbarProxyWindow(IntPtr windowHandle, ThumbnailToolBarButton[] buttons) { if (windowHandle == IntPtr.Zero) { throw new ArgumentException(LocalizedMessages.CommonFileDialogInvalidHandle, "windowHandle"); } if (buttons != null && buttons.Length == 0) { throw new ArgumentException(LocalizedMessages.ThumbnailToolbarManagerNullEmptyArray, "buttons"); } _internalWindowHandle = windowHandle; _thumbnailButtons = buttons; // Set the window handle on the buttons (for future updates) Array.ForEach(_thumbnailButtons, new Action<ThumbnailToolBarButton>(UpdateHandle)); // Assign the window handle (coming from the user) to this native window // so we can intercept the window messages sent from the taskbar to this window. this.AssignHandle(windowHandle); }
private void UpdateHandle(ThumbnailToolBarButton button) { button.WindowHandle = _internalWindowHandle; button.AddedToTaskbar = false; }
/// <summary> /// Creates a Event Args for the TabbedThumbnailButton.Click event /// </summary> /// <param name="windowsControl">WPF Control (UIElement) related to the event</param> /// <param name="button">Thumbnail toolbar button that was clicked</param> public ThumbnailButtonClickedEventArgs(UIElement windowsControl, ThumbnailToolBarButton button) { ThumbnailButton = button; WindowHandle = IntPtr.Zero; WindowsControl = windowsControl; }
/// <summary> /// Creates a Event Args for the TabbedThumbnailButton.Click event /// </summary> /// <param name="windowHandle">Window handle for the control/window related to the event</param> /// <param name="button">Thumbnail toolbar button that was clicked</param> public ThumbnailButtonClickedEventArgs(IntPtr windowHandle, ThumbnailToolBarButton button) { ThumbnailButton = button; WindowHandle = windowHandle; WindowsControl = null; }