Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Microsoft.Toolkit.Uwp.SampleApp/Pages/SampleController.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,12 @@
<ComboBoxItem Content="Light" />
<ComboBoxItem Content="Dark" />
</ComboBox>

<TextBlock Text="Flow Direction" VerticalAlignment="Center" Margin="8,0,10,0" />
<ComboBox x:Name="FlowDirectionPicker">
<ComboBoxItem Content="Left To Right" />
<ComboBoxItem Content="Right To Left" />
</ComboBox>
</StackPanel>
</StackPanel>

Expand Down
14 changes: 14 additions & 0 deletions Microsoft.Toolkit.Uwp.SampleApp/Pages/SampleController.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ public SampleController()
ThemePicker.SelectedIndex = (int)GetCurrentTheme();
ThemePicker.SelectionChanged += ThemePicker_SelectionChanged;

FlowDirectionPicker.SelectedIndex = (int)DemoFlowDirection;
FlowDirectionPicker.SelectionChanged += this.FlowDirectionPicker_SelectionChanged;

DocumentationTextBlock.SetRenderer<SampleAppMarkdownRenderer>();

ProcessSampleEditorTime();
Expand Down Expand Up @@ -661,6 +664,11 @@ private void ThemePicker_SelectionChanged(object sender, SelectionChangedEventAr
}
}

private void FlowDirectionPicker_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
DemoFlowDirection = (FlowDirection)FlowDirectionPicker.SelectedIndex;
}

public Sample CurrentSample { get; private set; }

public ObservableCollection<SampleCommand> Commands { get; } = new ObservableCollection<SampleCommand>();
Expand Down Expand Up @@ -694,6 +702,12 @@ public bool UseBackground
}
}

private FlowDirection DemoFlowDirection
{
get => DemoAreaGrid.FlowDirection;
set => DemoAreaGrid.FlowDirection = value;
}

// The Loaded Instance of the backing .xaml.cs Page (if any)
private Page SamplePage { get; set; }

Expand Down