Skip to content

Commit

Permalink
Fix typo in SelectorBar sample (#1491)
Browse files Browse the repository at this point in the history
<!--- Provide a general summary of your changes in the Title above -->

## Description
<!--- Describe your changes in detail -->
added a `p` :)

## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->
fixes #1488

## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->

## Screenshots (if appropriate):

![image](https://github.com/microsoft/WinUI-Gallery/assets/65828559/109e7548-3c2d-48a7-ae13-42eae26307cb)


## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)

P.S. **XAML Styler** also did its job
  • Loading branch information
Jay-o-Way authored Mar 13, 2024
1 parent 2f7da4d commit 5eccf72
Showing 1 changed file with 31 additions and 12 deletions.
43 changes: 31 additions & 12 deletions WinUIGallery/ControlPages/SelectorBarPage.xaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8" ?>
<Page
x:Class="WinUIGallery.ControlPages.SelectorBarPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:WinUIGallery"
xmlns:media="using:Microsoft.UI.Xaml.Media"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="using:WinUIGallery"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:media="using:Microsoft.UI.Xaml.Media"
mc:Ignorable="d">

<Page.Resources>
<DataTemplate x:Key="ColorsTemplate" x:DataType="media:SolidColorBrush">
<ItemContainer Background="{x:Bind}" Width="112" Height="82" Margin="4" />
<ItemContainer
Width="112"
Height="82"
Margin="4"
Background="{x:Bind}" />
</DataTemplate>
</Page.Resources>

<StackPanel>
<local:ControlExample x:Name="Example1" HeaderText="A Basic SelectorBar">
<SelectorBar x:Name="SelectorBar1">
<SelectorBarItem x:Name="SelectorBarItemRecent" Text="Recent" Icon="Clock" />
<SelectorBarItem x:Name="SelectorBarItemShared" Text="Shared" Icon="Share" />
<SelectorBarItem x:Name="SelectorBarItemFavorites" Text="Favorites" Icon="Favorite" />
<SelectorBarItem
x:Name="SelectorBarItemRecent"
Icon="Clock"
Text="Recent" />
<SelectorBarItem
x:Name="SelectorBarItemShared"
Icon="Share"
Text="Shared" />
<SelectorBarItem
x:Name="SelectorBarItemFavorites"
Icon="Favorite"
Text="Favorites" />
</SelectorBar>
<local:ControlExample.Xaml>
<x:String xml:space="preserve">
Expand All @@ -36,7 +49,10 @@
<local:ControlExample x:Name="Example2" HeaderText="SelectorBar with Frame Slide Transitions">
<StackPanel>
<SelectorBar x:Name="SelectorBar2" SelectionChanged="SelectorBar2_SelectionChanged">
<SelectorBarItem x:Name="SelectorBarItemPage1" Text="Page1" IsSelected="True"/>
<SelectorBarItem
x:Name="SelectorBarItemPage1"
IsSelected="True"
Text="Page1" />
<SelectorBarItem x:Name="SelectorBarItemPage2" Text="Page2" />
<SelectorBarItem x:Name="SelectorBarItemPage3" Text="Page3" />
<SelectorBarItem x:Name="SelectorBarItemPage4" Text="Page4" />
Expand All @@ -45,7 +61,7 @@

<Frame x:Name="ContentFrame" IsNavigationStackEnabled="False" />
</StackPanel>

<local:ControlExample.Xaml>
<x:String xml:space="preserve">
&lt;SelectorBar x:Name="SelectorBar2" SelectionChanged="SelectorBar2_SelectionChanged"&gt;
Expand All @@ -62,7 +78,7 @@

<local:ControlExample.CSharp>
<x:String xml:space="preserve">
rivate void SelectorBar2_SelectionChanged(SelectorBar sender, SelectorBarSelectionChangedEventArgs args)
private void SelectorBar2_SelectionChanged(SelectorBar sender, SelectorBarSelectionChangedEventArgs args)
{
SelectorBarItem selectedItem = sender.SelectedItem;
int currentSelectedIndex = sender.Items.IndexOf(selectedItem);
Expand Down Expand Up @@ -100,7 +116,10 @@ rivate void SelectorBar2_SelectionChanged(SelectorBar sender, SelectorBarSelecti
<local:ControlExample x:Name="Example3" HeaderText="SelectorBar Displaying Different Collections Using ItemsView">
<StackPanel>
<SelectorBar x:Name="SelectorBar3" SelectionChanged="SelectorBar3_SelectionChanged">
<SelectorBarItem x:Name="SelectorBarItemPink" Text="Pink" IsSelected="True"/>
<SelectorBarItem
x:Name="SelectorBarItemPink"
IsSelected="True"
Text="Pink" />
<SelectorBarItem x:Name="SelectorBarItemPlum" Text="Plum" />
<SelectorBarItem x:Name="SelectorBarItemPowderBlue" Text="PowderBlue" />
</SelectorBar>
Expand All @@ -111,7 +130,7 @@ rivate void SelectorBar2_SelectionChanged(SelectorBar sender, SelectorBarSelecti
</ItemsView.Layout>
</ItemsView>
</StackPanel>

<local:ControlExample.Xaml>
<x:String xml:space="preserve">
&lt;SelectorBar x:Name="SelectorBar3" SelectionChanged="SelectorBar3_SelectionChanged" &gt;
Expand Down

0 comments on commit 5eccf72

Please sign in to comment.