-
Notifications
You must be signed in to change notification settings - Fork 743
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Cleanup in Xaml.Hosting namespace, focus event args
- Loading branch information
1 parent
9b7d5fc
commit 2a5740e
Showing
12 changed files
with
210 additions
and
250 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
src/Uno.UI/UI/Xaml/Hosting/DesktopWindowXamlSourceGotFocusEventArgs.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
namespace Windows.UI.Xaml.Hosting; | ||
|
||
/// <summary> | ||
/// Provides event data for the GotFocus event. | ||
/// </summary> | ||
public partial class DesktopWindowXamlSourceGotFocusEventArgs | ||
{ | ||
internal DesktopWindowXamlSourceGotFocusEventArgs(XamlSourceFocusNavigationRequest request) | ||
{ | ||
Request = request; | ||
} | ||
|
||
/// <summary> | ||
/// Gets a XamlSourceFocusNavigationRequest object that specifies the reason and other info for the focus navigation. | ||
/// </summary> | ||
public XamlSourceFocusNavigationRequest Request { get; } | ||
} |
17 changes: 17 additions & 0 deletions
17
src/Uno.UI/UI/Xaml/Hosting/DesktopWindowXamlSourceTakeFocusRequestedEventArgs.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
namespace Windows.UI.Xaml.Hosting; | ||
|
||
/// <summary> | ||
/// Provides event data for the TakeFocusRequested event. | ||
/// </summary> | ||
public partial class DesktopWindowXamlSourceTakeFocusRequestedEventArgs | ||
{ | ||
internal DesktopWindowXamlSourceTakeFocusRequestedEventArgs(XamlSourceFocusNavigationRequest request) | ||
{ | ||
Request = request; | ||
} | ||
|
||
/// <summary> | ||
/// Gets a XamlSourceFocusNavigationRequest object that specifies the reason and other info for the focus navigation. | ||
/// </summary> | ||
public XamlSourceFocusNavigationRequest Request { get; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
105 changes: 52 additions & 53 deletions
105
src/Uno.UI/UI/Xaml/Hosting/XamlSourceFocusNavigationReason.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,55 @@ | ||
namespace Windows.UI.Xaml.Hosting | ||
namespace Windows.UI.Xaml.Hosting; | ||
|
||
/// <summary> | ||
/// Defines values that represent the reasons that the Windows.UI.Xaml.UIElement got focus | ||
/// in a desktop application that uses a DesktopWindowXamlSource object to host XAML-based UI. | ||
/// The XamlSourceFocusNavigationRequest.Reason property returns one of these values. | ||
/// </summary> | ||
public enum XamlSourceFocusNavigationReason | ||
{ | ||
/// <summary> | ||
/// Defines values that represent the reasons that the Windows.UI.Xaml.UIElement got focus | ||
/// in a desktop application that uses a DesktopWindowXamlSource object to host XAML-based UI. | ||
/// The XamlSourceFocusNavigationRequest.Reason property returns one of these values. | ||
/// </summary> | ||
public enum XamlSourceFocusNavigationReason | ||
{ | ||
/// <summary> | ||
/// The focus was set programmatically. | ||
/// </summary> | ||
Programmatic = 0, | ||
|
||
/// <summary> | ||
/// The focus was restored after a task switch, such as pressing Alt + Tab. | ||
/// </summary> | ||
Restore = 1, | ||
|
||
/// <summary> | ||
/// The focus was set in response to the user navigating to the next element | ||
/// by using a bidirectional navigation experience (for example, by pressing Tab). | ||
/// </summary> | ||
First = 3, | ||
|
||
/// <summary> | ||
/// The focus was set in response to the user navigating to the previous element | ||
/// by using a bidirectional navigation experience (for example, by pressing Shift-Tab). | ||
/// </summary> | ||
Last = 4, | ||
|
||
/// <summary> | ||
/// The focus was set in response to the user navigating left by using | ||
/// a 4-direction navigation experience (for example, by using keyboard arrow keys). | ||
/// </summary> | ||
Left = 7, | ||
|
||
/// <summary> | ||
/// The focus was set in response to the user navigating up by using | ||
/// a 4-direction navigation experience (for example, by using keyboard arrow keys). | ||
/// </summary> | ||
Up = 8, | ||
|
||
/// <summary> | ||
/// The focus was set in response to the user navigating right by using | ||
/// a 4-direction navigation experience (for example, by using keyboard arrow keys). | ||
/// </summary> | ||
Right = 9, | ||
|
||
/// <summary> | ||
/// The focus was set in response to the user navigating down by using | ||
/// a 4-direction navigation experience (for example, by using keyboard arrow keys). | ||
/// </summary> | ||
Down = 10, | ||
} | ||
/// The focus was set programmatically. | ||
/// </summary> | ||
Programmatic = 0, | ||
|
||
/// <summary> | ||
/// The focus was restored after a task switch, such as pressing Alt + Tab. | ||
/// </summary> | ||
Restore = 1, | ||
|
||
/// <summary> | ||
/// The focus was set in response to the user navigating to the next element | ||
/// by using a bidirectional navigation experience (for example, by pressing Tab). | ||
/// </summary> | ||
First = 3, | ||
|
||
/// <summary> | ||
/// The focus was set in response to the user navigating to the previous element | ||
/// by using a bidirectional navigation experience (for example, by pressing Shift-Tab). | ||
/// </summary> | ||
Last = 4, | ||
|
||
/// <summary> | ||
/// The focus was set in response to the user navigating left by using | ||
/// a 4-direction navigation experience (for example, by using keyboard arrow keys). | ||
/// </summary> | ||
Left = 7, | ||
|
||
/// <summary> | ||
/// The focus was set in response to the user navigating up by using | ||
/// a 4-direction navigation experience (for example, by using keyboard arrow keys). | ||
/// </summary> | ||
Up = 8, | ||
|
||
/// <summary> | ||
/// The focus was set in response to the user navigating right by using | ||
/// a 4-direction navigation experience (for example, by using keyboard arrow keys). | ||
/// </summary> | ||
Right = 9, | ||
|
||
/// <summary> | ||
/// The focus was set in response to the user navigating down by using | ||
/// a 4-direction navigation experience (for example, by using keyboard arrow keys). | ||
/// </summary> | ||
Down = 10, | ||
} |
Oops, something went wrong.