Skip to content

Commit 57c20d4

Browse files
committed
Inverted contextual toggle in sample; Fixed incorrect background during transition animation (again)
1 parent 5bb806e commit 57c20d4

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Microsoft.Toolkit.Uwp.SampleApp/SamplePages/TabbedCommandBar/TabbedCommandBar.bind

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@
134134
</controls:TabbedCommandBar>
135135

136136
<Grid Grid.Row="1">
137-
<ToggleSwitch x:Name="ContextualToggle" IsOn="True"
137+
<ToggleSwitch x:Name="ContextualToggle" IsOn="{Binding Visibility, ElementName=ShapeFormat, Mode=TwoWay}"
138138
OffContent="Contextual Tab Off" OnContent="Contextual Tab On"/>
139139
</Grid>
140140
</Grid>

Microsoft.Toolkit.Uwp.UI.Controls/TabbedCommandBar/TabbedCommandBar.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ private void SelectedItemChanged(NavigationView sender, NavigationViewSelectionC
8484
_previousSelectedItem.RegisterPropertyChangedCallback(TabbedCommandBarItem.VisibilityProperty, SelectedItemVisibilityChanged);
8585

8686
// Set the ribbon background and start the transition animation
87-
_ribbonContentBorder.Background = item.Background;
87+
//_ribbonContentBorder.Background = item.Background;
8888
_tabChangedStoryboard?.Begin();
8989
}
9090

Microsoft.Toolkit.Uwp.UI.Controls/TabbedCommandBar/TabbedCommandBar.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@
246246
</Grid>
247247

248248

249-
<Border x:Name="PART_RibbonContentBorder" Grid.Row="1"
249+
<Border x:Name="PART_RibbonContentBorder" Grid.Row="1" Background="{Binding ElementName=PART_RibbonContent, Path=Content.Background}"
250250
VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
251251
<ContentControl x:Name="PART_RibbonContent" Content="{TemplateBinding SelectedItem}"
252252
HorizontalContentAlignment="Stretch">

0 commit comments

Comments
 (0)