Refactored `CredentialProviderBase` and `CredentialTile` to improve the handling of default and auto-logon tiles. Key changes include:
- Introduced `SetDefaultTile` method with validation and tile refresh.
- Refactored `IsAutoLogon` and `IsDefault` properties to be read only properties.
- Added `ShouldAutoLogon` method to be called when a tile is selected.
Modified the `OnSelected` method in the `CredentialTile` class to include an `out` parameter named `autoLogon`, which determines if the logon should proceed immediately. Updated XML documentation to explain the new parameter and its behavior in Windows 10. Adjusted the `SetSelected` method in `CredentialTile.ICredentialProviderCredential` to call the updated `OnSelected` method and set `pbAutoLogon` based on the returned `autoLogon` value. Removed the previous `OnSelected` implementation without parameters.
There was confusion between a tile that is configured as a default auto logon tile, and a tile that can be auto logged-on when selecteed. This change clarifies the case of a tile allowing login when selected, without having to press a submit button.
The AutoLogon propert of the CredentialTile object is no longer used in this scenario.
Implementers must override OnSelected(out bool autoLogon) to automatically logon a tile when selected
- Added ReloadUserTiles method to CredentialProviderBase to notify LogonUI of tile modifications.
- Introduced private field isAutoLogon in CredentialTile.
- Updated IsAutoLogon property in CredentialTile to use a backing field and call ReloadUserTiles on set.
- Corrected typo in XML documentation for CreateParentWindowHwnd method.
- Introduced a private field `adjacentToControl` in `SubmitButtonControl`.
- Added a constructor parameter to initialize `adjacentToControl`.
- Updated `AdjacentToKey` and `AdjacentToId` to use `adjacentToControl`.
- Added a public property `AdjacentToControl` with getter and setter.
- Modified the `Clone` method to copy `adjacentToControl`.