Skip to content

Commit 9b6e37a

Browse files
committed
Added SearchType enum
1 parent 62c4934 commit 9b6e37a

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
// See the LICENSE file in the project root for more information.
4+
5+
namespace Microsoft.Toolkit.Uwp.UI
6+
{
7+
/// <summary>
8+
/// Indicates a type of search for elements in a visual or logical tree.
9+
/// </summary>
10+
public enum SearchType
11+
{
12+
/// <summary>
13+
/// Depth-first search, where each branch is recursively explored until the end before moving to the next one.
14+
/// </summary>
15+
DepthFirst,
16+
17+
/// <summary>
18+
/// Breadth-first search, where each depthwise level is completely explored before moving to the next one.
19+
/// This is particularly useful if the target element to find is known to not be too distant from the starting
20+
/// point and the whole visual/logical tree from the root is large enough, as it can reduce the traversal time.
21+
/// </summary>
22+
BreadthFirst
23+
}
24+
}

0 commit comments

Comments
 (0)