diff --git a/xml/System.Windows.Forms.Design.Behavior/BehaviorServiceAdornerCollection.xml b/xml/System.Windows.Forms.Design.Behavior/BehaviorServiceAdornerCollection.xml index f2ca0de3dfe..c2f8ccf6e8a 100644 --- a/xml/System.Windows.Forms.Design.Behavior/BehaviorServiceAdornerCollection.xml +++ b/xml/System.Windows.Forms.Design.Behavior/BehaviorServiceAdornerCollection.xml @@ -44,6 +44,7 @@ Stores objects in a strongly typed collection. To be added. + @@ -193,6 +194,7 @@ The index at which the new element was inserted. To be added. + @@ -247,6 +249,7 @@ Copies the elements of an array to the end of the . To be added. + @@ -282,6 +285,7 @@ Adds the contents of another to the end of the collection. To be added. + @@ -319,6 +323,7 @@ if the is contained in the collection; otherwise, . To be added. + @@ -366,6 +371,7 @@ The number of elements in the is less than the lower bound of . + @@ -399,6 +405,7 @@ The number of elements in the for the instance. To be added. + @@ -435,6 +442,7 @@ The number of elements in the of in the , if found; otherwise, -1. To be added. + @@ -472,6 +480,7 @@ The number of elements in the into the at the specified index. To be added. + diff --git a/xml/System.Windows.Forms/AccessibleEvents.xml b/xml/System.Windows.Forms/AccessibleEvents.xml index d04e5f630db..a86e278e145 100644 --- a/xml/System.Windows.Forms/AccessibleEvents.xml +++ b/xml/System.Windows.Forms/AccessibleEvents.xml @@ -587,6 +587,7 @@ 9 A window has lost mouse capture. The system sends the event; servers never send this event. + @@ -614,6 +615,7 @@ 8 A window is being moved or resized. The system sends the event; servers never send this event. + @@ -641,6 +643,7 @@ 13 A window exited context-sensitive Help mode. The system does not send the event consistently. + @@ -668,6 +671,7 @@ 12 A window entered context-sensitive Help mode. The system does not send the event consistently. + @@ -695,6 +699,7 @@ 17 A dialog box was closed. The system does not send the event for standard dialog boxes. Servers send this event for custom dialog boxes. The system does not send the event consistently. + @@ -722,6 +727,7 @@ 16 A dialog box was displayed. The system sends the event for standard dialog boxes. Servers send this event for custom dialog boxes. The system does not send the event consistently. + @@ -749,6 +755,7 @@ 15 An application is about to exit drag-and-drop mode. Applications that support drag-and-drop operations must send this event; the system does not. + @@ -776,6 +783,7 @@ 14 An application is about to enter drag-and-drop mode. Applications that support drag-and-drop operations must send this event; the system does not. + @@ -830,6 +838,7 @@ 5 A menu from the menu bar was closed. The system sends this event for standard menus. Servers send this event for custom menus. + @@ -860,6 +869,7 @@ A shortcut menu was closed. The system sends this event for standard menus. Servers send this event for custom menus. When a shortcut menu is closed, the client receives this message followed almost immediately by the event. The system does not send the event consistently. For a call to TrackPopupMenu(), a client will see followed almost immediately by for the popup being shown. + @@ -890,6 +900,7 @@ A shortcut menu was displayed. The system sends this event for standard menus. Servers send this event for custom menus. The system does not send the event consistently. For a call to TrackPopupMenu(), a client will see followed almost immediately by for the popup being shown. + @@ -917,6 +928,7 @@ 4 A menu item on the menu bar was selected. The system sends this event for standard menus. Servers send this event for custom menus. The system might raise more than one event that might or might not have a corresponding event. + @@ -944,6 +956,7 @@ 23 A window object was minimized or maximized. The system sends the event; servers never send this event. + @@ -971,6 +984,7 @@ 22 A window object is about to be minimized or maximized. The system sends the event; servers never send this event. + @@ -998,6 +1012,7 @@ 11 The movement or resizing of a window is finished. The system sends the event; servers never send this event. + @@ -1025,6 +1040,7 @@ 10 A window is being moved or resized. The system sends the event; servers never send this event. + @@ -1052,6 +1068,7 @@ 19 Scrolling has ended on a scroll bar. The system sends this event for scroll bars attached to a window and for standard scroll bar controls. Servers send this event for custom scroll bars. + @@ -1079,6 +1096,7 @@ 18 Scrolling has started on a scroll bar. The system sends the event for scroll bars attached to a window and for standard scroll bar controls. Servers send this event for custom scroll bars. + @@ -1133,6 +1151,7 @@ 21 The user released ALT+TAB. The system sends the event; servers never send this event. If only one application is running when the user presses ALT+TAB, the system sends the event without a corresponding event. + @@ -1160,6 +1179,7 @@ 20 The user pressed ALT+TAB, which activates the switch window. If only one application is running when the user presses ALT+TAB, the system raises the event without a corresponding event. + diff --git a/xml/System.Windows.Forms/Application.xml b/xml/System.Windows.Forms/Application.xml index 5563f8cab6c..ba5693d2d8b 100644 --- a/xml/System.Windows.Forms/Application.xml +++ b/xml/System.Windows.Forms/Application.xml @@ -252,9 +252,10 @@ System.Windows.Forms.SystemColorMode - To be added. + Gets the default color mode (dark mode) for the application. To be added. - To be added. + This is the ; which either has been set by or its default value . + If it has been set to , then the actual color mode is determined by the system settings (which can be retrieved by the static (shared in VB) property. @@ -982,9 +983,9 @@ System.Boolean - To be added. + Gets a value indicating whether the application is running in a dark system color context. To be added. - To be added. + In a high contrast mode, this will always return . @@ -1811,9 +1812,25 @@ - To be added. - To be added. - To be added. + The application's default color mode (dark mode) to set. + Sets the default color mode (dark mode) for the application. + + + You should use this method to set the default color mode (dark mode) for the application. Set it before creating any UI elements to ensure that the correct color mode + is used. You can set it to dark mode (), light mode () + or to the system setting (). + + + If you set it to , the actual color mode is determined by the Windows system settings. If the system setting is changed, + the application will not automatically adapt to the new setting. + + + Note that the dark color mode is only available from Windows 11 on or later versions. If the system is set to a high contrast mode, the dark mode is not available. + + + Note for Visual Basic: If you are using the Visual Basic Application Framework, you should set the color mode by handling the Application Events (see ). + + @@ -1930,6 +1947,7 @@ You can adjust text scale with the **Make text bigger** slider on the **Settings is . You can only call this method before the first window is created by your Windows Forms application. + @@ -2225,9 +2243,15 @@ The high DPI mode is set once per process. For more information about setting th System.Windows.Forms.SystemColorMode - To be added. + Gets the system color mode setting of the OS system environment. To be added. - To be added. + + + The color setting is determined based on the operating system version and its system settings. It returns if the dark mode is enabled in the system settings, if the color mode equals the light, standard color setting. + + SystemColorMode is supported on Windows 11 or later versions. + SystemColorModes is not supported if the Windows OS High Contrast Mode has been enabled in the system settings. + diff --git a/xml/System.Windows.Forms/ButtonBase.xml b/xml/System.Windows.Forms/ButtonBase.xml index a880a64241a..0371ce642ba 100644 --- a/xml/System.Windows.Forms/ButtonBase.xml +++ b/xml/System.Windows.Forms/ButtonBase.xml @@ -1040,6 +1040,7 @@ For example, consider a button control whose is less than -1. + diff --git a/xml/System.Windows.Forms/ButtonRenderer.xml b/xml/System.Windows.Forms/ButtonRenderer.xml index d8046cf753f..fe9449e2ac2 100644 --- a/xml/System.Windows.Forms/ButtonRenderer.xml +++ b/xml/System.Windows.Forms/ButtonRenderer.xml @@ -110,6 +110,7 @@ ]]> + @@ -154,6 +155,7 @@ ]]> + @@ -202,6 +204,7 @@ ]]> + @@ -277,6 +280,7 @@ ]]> + @@ -341,6 +345,7 @@ ]]> + @@ -414,6 +419,7 @@ ]]> + diff --git a/xml/System.Windows.Forms/CheckBoxRenderer.xml b/xml/System.Windows.Forms/CheckBoxRenderer.xml index 2b16c599eb5..277a83e036d 100644 --- a/xml/System.Windows.Forms/CheckBoxRenderer.xml +++ b/xml/System.Windows.Forms/CheckBoxRenderer.xml @@ -110,6 +110,7 @@ ]]> + @@ -178,6 +179,7 @@ ]]> + @@ -253,6 +255,7 @@ ]]> + @@ -328,6 +331,7 @@ ]]> + @@ -433,6 +437,7 @@ The control whose parent's background will be drawn. Draws the background of a control's parent in the specified area. To be added. + @@ -514,6 +519,7 @@ if the background of the check box has semitransparent or alpha-blended pieces; otherwise, . To be added. + @@ -559,6 +565,7 @@ ]]> + diff --git a/xml/System.Windows.Forms/Control.xml b/xml/System.Windows.Forms/Control.xml index b98f1c2b230..ffff62953e5 100644 --- a/xml/System.Windows.Forms/Control.xml +++ b/xml/System.Windows.Forms/Control.xml @@ -8325,11 +8325,20 @@ MyControl.Font = New Font(MyControl.Font, _ - To be added. - To be added. - To be added. - To be added. - To be added. + The synchronous action to execute. + The cancellation token. + Invokes the specified synchronous callback asynchronously on the thread that owns the control's handle. + A task that represents the asynchronous invoke operation. + + + When you pass a to this method, the method will return, but the callback will still be executed. + The callback will be running on the UI thread and will be also blocking the UI thread. InvokeAsync in this case is just queuing the callback to the end of the message queue and returns immediately, but as soon as the callback gets executed, it will still block the UI thread for the time it is running. For this reason, it is recommended to only execute short sync running operations in the callback, like updating a control's property or similar. + + + If you want to execute a long-running operation, consider using asynchronous callbacks instead, by making sure that you use either the overload + or . + + @@ -8357,11 +8366,21 @@ MyControl.Font = New Font(MyControl.Font, _ - To be added. - To be added. - To be added. - To be added. - To be added. + + The asynchronous function to execute, which takes a and returns a . + + The cancellation token. + Executes the specified asynchronous callback on the thread that owns the control's handle asynchronously. + A task that represents the asynchronous invoke operation. + + + The callback will be marshalled to the thread that owns the control's handle, and then awaited. Exceptions will be propagated back to the caller. Also note that the returned task is not the task associated with the callback, but a task representing the operation of marshalling the callback to the UI thread. If you need to pass a callback returning a rather than a , use the 's constructor to create a new which wraps the original Task. The will be both taken into account when marshalling the callback to the thread that owns the control's handle, and when executing the callback. + + + If you want to asynchronously execute a synchronous callback, use the overload or the overload . + + + The control's handle is not yet created. @@ -8406,12 +8425,23 @@ MyControl.Font = New Font(MyControl.Font, _ - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. + The return type of the asynchronous callback. + + The asynchronous function to execute, which takes a and returns a . + + The cancellation token. + Executes the specified asynchronous callback on the thread that owns the control's handle. + A task representing the operation and containing the function's result of type . + + + The callback will be marshalled to the thread that owns the control's handle, and then be awaited. Exceptions will be propagated back to the caller. Also note that the returned task is not the task associated with the callback, + but a task representing the operation of marshalling the callback to the UI thread. If you need to pass a callback returning a rather than a , + use the 's constructor to create a new which wraps the original Task. The will be both taken into account when marshalling the callback to the thread that owns the control's handle, + and when executing the callback. + + If you want to asynchronously execute a synchronous callback, use the overload or the overload . + + The control's handle is not yet created. @@ -8449,12 +8479,24 @@ MyControl.Font = New Font(MyControl.Font, _ - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. + The return type of the synchronous callback. + The synchronous function to execute. + The cancellation token. + Invokes the specified synchronous callback asynchronously on the thread that owns the control's handle. + A task representing the operation and containing the function's result. + + + When you pass a to this method, the method will return, but the callback will still be executed. The callback will be running on the UI thread and will be also blocking the UI thread. + InvokeAsync in this case is just queuing the callback to the end of the message queue and returns immediately, but as soon as the callback is executed, it will still block the UI for the time it is running. For this reason, it is recommended to only + execute short sync running operations in the callback, like updating a control's property or similar. + + If you want to execute a long-running operation, consider using asynchronous callbacks instead, which you use with the overloads of InvokeAsync described below. + + Important: Also note that if you use this overload to pass a callback which returns a that this Task will NOT be awaited but return immediately and has the characteristics of an "engage-and-forget". + If you want the task which you pass to be awaited, make sure that you use either the overload + or . + + @@ -17847,7 +17889,7 @@ if (CanSelect && IsMnemonic(charCode, MyControl.Text) { The DPI value prior to the change. The DPI value after the change. Provides constants for rescaling the control when a DPI change occurs. - To be added. + This method is an opportunity to rescale any constant sizes, glyphs or bitmaps before re-painting. diff --git a/xml/System.Windows.Forms/ControlStyles.xml b/xml/System.Windows.Forms/ControlStyles.xml index 7293d24a4f9..c2d48fdb0bf 100644 --- a/xml/System.Windows.Forms/ControlStyles.xml +++ b/xml/System.Windows.Forms/ControlStyles.xml @@ -120,7 +120,11 @@ myControl.SetStyle(UserPaint Or AllPaintingInWmPaint Or DoubleBuffer, True) 524288 - To be added. + + For certain UI-related color modes (Dark Mode/Light Mode), controls can opt-in to automatically apply the appropriate theming. + Especially controls which are utilizing system-managed scrollbars can benefit from this setting. + Note that using this settings will cause some win32 control theming renderers to become inactive for a specific theme. + diff --git a/xml/System.Windows.Forms/Form.xml b/xml/System.Windows.Forms/Form.xml index 9901cdaf70c..a729255ca81 100644 --- a/xml/System.Windows.Forms/Form.xml +++ b/xml/System.Windows.Forms/Form.xml @@ -2151,9 +2151,21 @@ System.Drawing.Color - To be added. - To be added. - To be added. + Sets or gets the Form's border color. + + The which has be previously set using this property or . + Note that the underlying Win32 API does not provide a reliable mechanism to retrieve the current border color. + + + + Note: Reading this property is only for tracking purposes. If the Form's border color is changed through other external means (Win32 calls), + reading this property will not reflect those changes, as the Win32 API does not provide a mechanism to retrieve the current title bar color. + + + The property only reflects the value that was previously set using this property. The + event is raised accordingly when the value is changed, which allows the property to be participating in binding scenarios. + + @@ -2178,7 +2190,7 @@ System.EventHandler - To be added. + Occurs when the property has changed. To be added. @@ -2271,9 +2283,21 @@ System.Drawing.Color - To be added. - To be added. - To be added. + Sets or gets the Form's title bar back color (caption back color). + + The , which has be previously set using this property or . + Note that the underlying Win32 API does not provide a reliable mechanism to retrieve the current title bar color. + + + + Reading this property is only for tracking purposes. If the window's title bar color is changed through other external means (Win32 calls), + reading this property will not reflect those changes, as the Win32 API does not provide a mechanism to retrieve the current title bar color. + + + The property only reflects the value that was previously set using this property. The + event is raised accordingly when the value is changed, which allows the property to be participating in binding scenarios. + + @@ -2298,7 +2322,7 @@ System.EventHandler - To be added. + Occurs when the property has changed. To be added. @@ -2332,9 +2356,21 @@ System.Drawing.Color - To be added. - To be added. - To be added. + Sets or gets the Form's title bar text color (windows caption text color). + + The , which has be previously set using this property or . + Note that the underlying Win32 API does not provide a reliable mechanism to retrieve the current title bar text color. + + + + Reading this property is only for tracking purposes. If the Form's title bar's text color (window caption text) is changed through other external means (Win32 calls), + reading this property will not reflect those changes, as the Win32 API does not provide a mechanism to retrieve the current title bar color. + + + The property only reflects the value that was previously set using this property. The + event is raised accordingly when the value is changed, which allows the property to be participating in binding scenarios. + + @@ -2359,7 +2395,7 @@ System.EventHandler - To be added. + Occurs when the property has changed. To be added. @@ -2517,9 +2553,18 @@ System.Windows.Forms.FormCornerPreference - To be added. + Sets or gets the rounding style of the Form's corners using the enum. To be added. - To be added. + + + Reading this property is only for tracking purposes. If the Form's corner preference is changed through other external means (Win32 calls), + reading this property will not reflect those changes, as the Win32 API does not provide a mechanism to retrieve the current title bar color. + + + The property only reflects the value that was previously set using this property. The + event is raised accordingly when the value is changed, which allows the property to be participating in binding scenarios. + + @@ -2544,7 +2589,7 @@ System.EventHandler - To be added. + Occurs when the property has changed. To be added. @@ -4950,8 +4995,8 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f - To be added. - To be added. + An that contains the event data, in this case empty. + Raises the event when the property changes. To be added. @@ -4984,8 +5029,10 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f - To be added. - To be added. + An that contains the event data, in this case empty. + + Raises the event when the property changes. + To be added. @@ -5018,8 +5065,10 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f - To be added. - To be added. + An that contains the event data, in this case empty. + + Raises the event when the property changes. + To be added. @@ -5168,8 +5217,10 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f - To be added. - To be added. + An that contains the event data, in this case empty. + + Raises the event when the property changes. + To be added. @@ -7573,6 +7624,7 @@ This example assumes that the `CreateMyOpaqueForm` method is called from another + The owner window is trying to set itself as its own owner. @@ -7610,10 +7662,55 @@ This example assumes that the `CreateMyOpaqueForm` method is called from another - To be added. - To be added. - To be added. - To be added. + The optional owner window that implements . + Displays the form asynchronously, by setting its property to . + A that completes when the form is closed or disposed. + + + This method makes the form visible by setting the property to . + + + This method immediately returns, even if the form is large and takes a long time to be set up. + + + The task will complete when the form is closed or disposed. + + + If the owner window is provided, it ensures that the owner is topmost and sets the owner for the form. + + + This method also performs several checks to prevent invalid operations, such as trying to display a disabled form, attempting to display the form when + it is not a top-level window, or setting the form as its own owner. + + + If the operating system is in a non-interactive mode, this method will throw an . + + + If the form is already displayed asynchronously, an will be thrown. + + + An will also occur if no could be retrieved or installed. + + + There is no need to marshal the call to the UI thread manually if the call originates from a different thread than the UI-Thread. This is handled automatically. + + + + The form is already visible. + -or- + The form is disabled. + -or- + The form is not a top-level form. + -or- + The form is trying to set itself as its own owner. + -or- + The form is already displayed asynchronously. + -or- + No could be retrieved or installed. + -or- + The operating system is in a non-interactive mode. + + The owner window is trying to set itself as its own owner. @@ -7797,9 +7894,33 @@ This example assumes that the `CreateMyOpaqueForm` method is called from another - To be added. - To be added. - To be added. + Shows the form as a modal dialog box asynchronously. + A representing the outcome of the dialog. The task completes when the form is closed or disposed. + + + The task will complete when the form is closed or disposed. + + + This method immediately returns, even if the form is large and takes a long time to be set up. + + + If the form is already displayed asynchronously by , an will be thrown. + + + An will also occur if no could be retrieved or installed. + + + There is no need to marshal the call to the UI thread manually if the call originates from a different thread. This is handled automatically. + + + Any exceptions that occur will be automatically propagated to the calling thread. + + + + The form is already displayed asynchronously. + -or- + No could be retrieved or installed. + @@ -7831,10 +7952,34 @@ This example assumes that the `CreateMyOpaqueForm` method is called from another - To be added. - To be added. - To be added. - To be added. + Any object that implements that represents the top-level window that will own the modal dialog box. + Shows the form as a modal dialog box with the specified owner asynchronously. + A representing the outcome of the dialog. The task completes when the form is closed or disposed. + + + The task will complete when the form is closed or disposed. + + + This method immediately returns, even if the form is large and takes a long time to be set up. + + + If the form is already displayed asynchronously by , an will be thrown. + + + An will also occur if no could be retrieved or installed. + + + There is no need to marshal the call to the UI thread manually if the call originates from a different thread. This is handled automatically. + + + Any exceptions that occur will be automatically propagated to the calling thread. + + + + The form is already displayed asynchronously. + -or- + No could be retrieved or installed. + diff --git a/xml/System.Windows.Forms/FormCornerPreference.xml b/xml/System.Windows.Forms/FormCornerPreference.xml index 07488011780..cbe108472e7 100644 --- a/xml/System.Windows.Forms/FormCornerPreference.xml +++ b/xml/System.Windows.Forms/FormCornerPreference.xml @@ -19,7 +19,9 @@ - To be added. + + Specifies the corner preference for a which can be set using the property. + To be added. @@ -40,7 +42,7 @@ 0 - To be added. + The default corner preference. @@ -60,7 +62,7 @@ 1 - To be added. + Do not round the corners of the form window. @@ -80,7 +82,7 @@ 2 - To be added. + Round the corners of the form window. @@ -100,7 +102,7 @@ 3 - To be added. + Round the corners of the form window with a small radius. diff --git a/xml/System.Windows.Forms/GiveFeedbackEventArgs.xml b/xml/System.Windows.Forms/GiveFeedbackEventArgs.xml index 349415148b3..a8fc3369d78 100644 --- a/xml/System.Windows.Forms/GiveFeedbackEventArgs.xml +++ b/xml/System.Windows.Forms/GiveFeedbackEventArgs.xml @@ -37,30 +37,30 @@ Provides data for the event, which occurs during a drag operation. - event occurs during a drag operation. It allows the source of a drag event to modify the appearance of the mouse pointer in order to give the user visual feedback during a drag-and-drop operation. A object specifies the type of drag-and-drop operation and whether default cursors are used. - - For information about the event model, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following example demonstrates a drag-and-drop operation between two controls. The example calls the method when the drag action starts. The drag action starts if the mouse has moved more than from the mouse location during the event. The method is used to determine the index of the item to drag during the `MouseDown` event. - - The example also demonstrates using custom cursors for the drag-and-drop operation. The example assumes that two cursor files, `3dwarro.cur` and `3dwno.cur`, exist in the application directory, for the custom drag and no-drop cursors, respectively. The custom cursors will be used if the `UseCustomCursorsCheck` is checked. The custom cursors are set in the event handler. - - The keyboard state is evaluated in the event handler for the right `ListBox`, to determine what the drag operation will be based upon state of the SHIFT, CTRL, ALT, or CTRL+ALT keys. The location in the `ListBox` where the drop would occur is also determined during the `DragOver` event. If the data to drop is not a `String`, then the is set to . Finally, the status of the drop is displayed in the `DropLocationLabel` . - - The data to drop for the right `ListBox` is determined in the event handler and the `String` value is added at the appropriate place in the `ListBox`. If the drag operation moves outside the bounds of the form, then the drag-and-drop operation is canceled in the event handler. - - This code excerpt demonstrates using the class. See the method for the complete code example. - - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Control.DoDragDrop/CPP/form1.cpp" id="Snippet3"::: - :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/DoDragDrop/form11.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.Control.DoDragDrop/VB/form1.vb" id="Snippet3"::: - + event occurs during a drag operation. It allows the source of a drag event to modify the appearance of the mouse pointer in order to give the user visual feedback during a drag-and-drop operation. A object specifies the type of drag-and-drop operation and whether default cursors are used. + + For information about the event model, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following example demonstrates a drag-and-drop operation between two controls. The example calls the method when the drag action starts. The drag action starts if the mouse has moved more than from the mouse location during the event. The method is used to determine the index of the item to drag during the `MouseDown` event. + + The example also demonstrates using custom cursors for the drag-and-drop operation. The example assumes that two cursor files, `3dwarro.cur` and `3dwno.cur`, exist in the application directory, for the custom drag and no-drop cursors, respectively. The custom cursors will be used if the `UseCustomCursorsCheck` is checked. The custom cursors are set in the event handler. + + The keyboard state is evaluated in the event handler for the right `ListBox`, to determine what the drag operation will be based upon state of the SHIFT, CTRL, ALT, or CTRL+ALT keys. The location in the `ListBox` where the drop would occur is also determined during the `DragOver` event. If the data to drop is not a `String`, then the is set to . Finally, the status of the drop is displayed in the `DropLocationLabel` . + + The data to drop for the right `ListBox` is determined in the event handler and the `String` value is added at the appropriate place in the `ListBox`. If the drag operation moves outside the bounds of the form, then the drag-and-drop operation is canceled in the event handler. + + This code excerpt demonstrates using the class. See the method for the complete code example. + + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Control.DoDragDrop/CPP/form1.cpp" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/DoDragDrop/form11.cs" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.Control.DoDragDrop/VB/form1.vb" id="Snippet3"::: + ]]> @@ -154,7 +154,7 @@ Gets or sets the drag image cursor offset. To be added. - Specifies the location of the cursor within , which is an offset from the upper-left corner. + Specifies the location of the cursor within , which is an offset from the upper-left corner. @@ -180,7 +180,7 @@ Gets or sets the drag image bitmap. To be added. - Note the outer edges of are blended out if the image width or height exceeds 300 pixels. + Note the outer edges of are blended out if the image width or height exceeds 300 pixels. @@ -217,23 +217,23 @@ Gets the drag-and-drop operation feedback that is displayed. One of the values. - controls. The example calls the method when the drag action starts. The drag action starts if the mouse has moved more than from the mouse location during the event. The method is used to determine the index of the item to drag during the `MouseDown` event. - - The example also demonstrates using custom cursors for the drag-and-drop operation. The example assumes that two cursor files, `3dwarro.cur` and `3dwno.cur`, exist in the application directory, for the custom drag and no-drop cursors, respectively. The custom cursors will be used if the `UseCustomCursorsCheck` is checked. The custom cursors are set in the event handler. - - The keyboard state is evaluated in the event handler for the right `ListBox`, to determine what the drag operation will be based upon state of the SHIFT, CTRL, ALT, or CTRL+ALT keys. The location in the `ListBox` where the drop would occur is also determined during the `DragOver` event. If the data to drop is not a `String`, then the is set to . Finally, the status of the drop is displayed in the `DropLocationLabel` . - - The data to drop for the right `ListBox` is determined in the event handler and the `String` value is added at the appropriate place in the `ListBox`. If the drag operation moves outside the bounds of the form, then the drag-and-drop operation is canceled in the event handler. - - This code excerpt demonstrates using the class. See the method for the complete code example. - - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Control.DoDragDrop/CPP/form1.cpp" id="Snippet3"::: - :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/DoDragDrop/form11.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.Control.DoDragDrop/VB/form1.vb" id="Snippet3"::: - + controls. The example calls the method when the drag action starts. The drag action starts if the mouse has moved more than from the mouse location during the event. The method is used to determine the index of the item to drag during the `MouseDown` event. + + The example also demonstrates using custom cursors for the drag-and-drop operation. The example assumes that two cursor files, `3dwarro.cur` and `3dwno.cur`, exist in the application directory, for the custom drag and no-drop cursors, respectively. The custom cursors will be used if the `UseCustomCursorsCheck` is checked. The custom cursors are set in the event handler. + + The keyboard state is evaluated in the event handler for the right `ListBox`, to determine what the drag operation will be based upon state of the SHIFT, CTRL, ALT, or CTRL+ALT keys. The location in the `ListBox` where the drop would occur is also determined during the `DragOver` event. If the data to drop is not a `String`, then the is set to . Finally, the status of the drop is displayed in the `DropLocationLabel` . + + The data to drop for the right `ListBox` is determined in the event handler and the `String` value is added at the appropriate place in the `ListBox`. If the drag operation moves outside the bounds of the form, then the drag-and-drop operation is canceled in the event handler. + + This code excerpt demonstrates using the class. See the method for the complete code example. + + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Control.DoDragDrop/CPP/form1.cpp" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/DoDragDrop/form11.cs" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.Control.DoDragDrop/VB/form1.vb" id="Snippet3"::: + ]]> @@ -275,28 +275,28 @@ if the default pointers are used; otherwise, . - is set to `false`, it is the responsibility of the event source to set the appropriate cursor. - - - -## Examples - The following example demonstrates a drag-and-drop operation between two controls. The example calls the method when the drag action starts. The drag action starts if the mouse has moved more than from the mouse location during the event. The method is used to determine the index of the item to drag during the `MouseDown` event. - - The example also demonstrates using custom cursors for the drag-and-drop operation. The example assumes that two cursor files, `3dwarro.cur` and `3dwno.cur`, exist in the application directory, for the custom drag and no-drop cursors, respectively. The custom cursors will be used if the `UseCustomCursorsCheck` is checked. The custom cursors are set in the event handler. - - The keyboard state is evaluated in the event handler for the right `ListBox`, to determine what the drag operation will be based upon state of the SHIFT, CTRL, ALT, or CTRL+ALT keys. The location in the `ListBox` where the drop would occur is also determined during the `DragOver` event. If the data to drop is not a `String`, then the is set to . Finally, the status of the drop is displayed in the `DropLocationLabel` . - - The data to drop for the right `ListBox` is determined in the event handler and the `String` value is added at the appropriate place in the `ListBox`. If the drag operation moves outside the bounds of the form, then the drag-and-drop operation is canceled in the event handler. - - This code excerpt demonstrates using the class. See the method for the complete code example. - - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Control.DoDragDrop/CPP/form1.cpp" id="Snippet3"::: - :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/DoDragDrop/form11.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.Control.DoDragDrop/VB/form1.vb" id="Snippet3"::: - + is set to `false`, it is the responsibility of the event source to set the appropriate cursor. + + + +## Examples + The following example demonstrates a drag-and-drop operation between two controls. The example calls the method when the drag action starts. The drag action starts if the mouse has moved more than from the mouse location during the event. The method is used to determine the index of the item to drag during the `MouseDown` event. + + The example also demonstrates using custom cursors for the drag-and-drop operation. The example assumes that two cursor files, `3dwarro.cur` and `3dwno.cur`, exist in the application directory, for the custom drag and no-drop cursors, respectively. The custom cursors will be used if the `UseCustomCursorsCheck` is checked. The custom cursors are set in the event handler. + + The keyboard state is evaluated in the event handler for the right `ListBox`, to determine what the drag operation will be based upon state of the SHIFT, CTRL, ALT, or CTRL+ALT keys. The location in the `ListBox` where the drop would occur is also determined during the `DragOver` event. If the data to drop is not a `String`, then the is set to . Finally, the status of the drop is displayed in the `DropLocationLabel` . + + The data to drop for the right `ListBox` is determined in the event handler and the `String` value is added at the appropriate place in the `ListBox`. If the drag operation moves outside the bounds of the form, then the drag-and-drop operation is canceled in the event handler. + + This code excerpt demonstrates using the class. See the method for the complete code example. + + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Control.DoDragDrop/CPP/form1.cpp" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/DoDragDrop/form11.cs" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.Control.DoDragDrop/VB/form1.vb" id="Snippet3"::: + ]]> diff --git a/xml/System.Windows.Forms/RadioButtonRenderer.xml b/xml/System.Windows.Forms/RadioButtonRenderer.xml index 01c9a9d17e7..c7488a62fed 100644 --- a/xml/System.Windows.Forms/RadioButtonRenderer.xml +++ b/xml/System.Windows.Forms/RadioButtonRenderer.xml @@ -101,6 +101,7 @@ ]]> + @@ -151,6 +152,7 @@ ]]> + @@ -228,6 +230,7 @@ ]]> + @@ -294,6 +297,7 @@ ]]> + @@ -369,6 +373,7 @@ ]]> + @@ -521,6 +526,7 @@ if the background of the option button has semitransparent or alpha-blended pieces; otherwise, . To be added. + @@ -574,6 +580,7 @@ ]]> + diff --git a/xml/System.Windows.Forms/SystemColorMode.xml b/xml/System.Windows.Forms/SystemColorMode.xml index d169bcb23af..d3c11345cfd 100644 --- a/xml/System.Windows.Forms/SystemColorMode.xml +++ b/xml/System.Windows.Forms/SystemColorMode.xml @@ -40,7 +40,7 @@ 0 - To be added. + Dark mode for the current context is or should be disabled. @@ -60,7 +60,7 @@ 2 - To be added. + Dark mode for the current context is enabled. @@ -80,7 +80,7 @@ 1 - To be added. + The setting for the current system color mode is inherited from the Windows OS. diff --git a/xml/System.Windows.Forms/TaskDialog.xml b/xml/System.Windows.Forms/TaskDialog.xml index df9a8d8f2d1..8b730485341 100644 --- a/xml/System.Windows.Forms/TaskDialog.xml +++ b/xml/System.Windows.Forms/TaskDialog.xml @@ -263,11 +263,14 @@ - To be added. - To be added. - To be added. - To be added. - To be added. + The page instance that contains the contents which this task dialog will display. + Gets or sets the position of the task dialog when it is shown. + Shows the task dialog with the specified owner asynchronously. + The which was clicked by the user to close the dialog. + Showing the dialog will bind the and its controls until this method returns or the dialog is navigated to a different page. + + is . + The specified contains an invalid configuration. @@ -296,12 +299,15 @@ - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. + The handle of the owner window, or to show a modeless dialog. + The page instance that contains the contents which this task dialog will display. + The position of the task dialog when it is shown. + Shows the task dialog with the specified owner asynchronously. + The which was clicked by the user to close the dialog. + Showing the dialog will bind the and its controls until this method returns or the dialog is navigated to a different page. + + is . + The specified contains an invalid configuration. @@ -330,12 +336,15 @@ - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. + The owner window. + The page instance that contains the contents which this task dialog will display. + The position of the task dialog when it is shown. + Shows the task dialog with the specified owner asynchronously. + The which was clicked by the user to close the dialog. + Showing the dialog will bind the and its controls until this method returns or the dialog is navigated to a different page. + + is . + The specified contains an invalid configuration. diff --git a/xml/System.Windows.Forms/ToolStrip.xml b/xml/System.Windows.Forms/ToolStrip.xml index 3da49a734f6..a03677c3434 100644 --- a/xml/System.Windows.Forms/ToolStrip.xml +++ b/xml/System.Windows.Forms/ToolStrip.xml @@ -215,9 +215,10 @@ System.Boolean - To be added. - To be added. - To be added. + Gets or sets a value indicating whether the control to be interacted when window does not have focus. + + to allow the control to be interacted when window does not have focus; otherwise, . The default value is . + diff --git a/xml/System.Windows.Forms/ToolStripItem.xml b/xml/System.Windows.Forms/ToolStripItem.xml index 5d7796063b1..d1e24edf836 100644 --- a/xml/System.Windows.Forms/ToolStripItem.xml +++ b/xml/System.Windows.Forms/ToolStripItem.xml @@ -5855,8 +5855,11 @@ If you set the property, t To be added. - To be added. - To be added. + Raises the event. + + This method will be called when the selected changes. + Call base.OnSelectedChanged to send this event to any registered event listeners. + @@ -6682,7 +6685,7 @@ If you set the property, t System.Windows.Forms.ToolStripRenderer - To be added. + Returns the parent 's renderer. To be added. To be added. @@ -7294,8 +7297,11 @@ If you set the property, t System.EventHandler - To be added. - To be added. + Occurs when the value of the property changes. + + This event is raised when an item is selected by mouse or keyboard, or programmatically. + The MainMenu and MenuItem controls were removed in .NET Core 3.1. The ToolStripItem.SelectedChanged event is recommended as a replacement for the MenuItem.Select event. +