AutomationProperties.GetFlowsFrom(DependencyObject) AutomationProperties.GetFlowsFrom(DependencyObject) AutomationProperties.GetFlowsFrom(DependencyObject) AutomationProperties.GetFlowsFrom(DependencyObject) Method


Gets a list of automation elements that suggests the reading order before the specified automation element.

public : static IVector<DependencyObject> GetFlowsFrom(DependencyObject element)
static IVector<DependencyObject> GetFlowsFrom(DependencyObject element) const;
public static IList<DependencyObject> GetFlowsFrom(DependencyObject element)
Public Shared Function GetFlowsFrom(element As DependencyObject) As IList<DependencyObject>(Of DependencyObject)
DependencyObject DependencyObject

The element for which to get the preceding reading order elements.

IList<DependencyObject> IList<DependencyObject>

A list of automation elements that suggests the reading order before the automation element specified by the element parameter.

Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)


    <Button x:Name="first">First</Button>
    <Button x:Name="third">Third</Button>
    <Button x:Name="second">Second</Button>
    <Button x:Name="fourth">Fourth</Button>
public sealed partial class MainPage : Page
    public MainPage()

        // Override the default flow for next/previous items in 
        // UI Automation to differ from the sequence of items 
        // declared in markup
        FlowBetween(first, second);
        FlowBetween(second, third);
        FlowBetween(third, fourth);

    public void FlowBetween(UIElement fromElement, UIElement toElement)
        // Set up the flow as bi-directional so that moving next/previous is
        // consistent.
        var flowsToList = AutomationProperties.GetFlowsTo(fromElement);
        var flowsFromList = AutomationProperties.GetFlowsFrom(toElement);



Get the list, then call the Add method to add a new element.


When modifying the flow, be careful not to create a situation where the user gets stuck in a navigation loop that they can't escape if they are only using a keyboard.