Skip to content

Commit 2c8a1d6

Browse files
committed
Replace remaning references to ribbon to TabbedCommandBar
1 parent ee38f3a commit 2c8a1d6

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ IF NOT CERTAIN ABOUT THE FEATURE AND REQUIRE MORE CLARITY THEN PLEASE POST ON "I
1515
<!-- Please describe or link to any existing issues or discussions.
1616
A clear and concise description of what the problem is, starting with the user story.
1717
Provide examples of the restrictions in the current environment that hinders the work your users or you want to perform. What are the ways this new feature will help transform and deliver those results?
18-
For example, I am currently using the InfiniteCanvas control which lacks the ribbon control feature. I am looking to improve user experience therefore i would like to use that in my project to provide ease of accessibility and a user-friendly interface. This new feature will provide quick access to the toolbar, enhance space utilization, etc [...] -->
18+
For example, I am currently using the InfiniteCanvas control which lacks the TabbedCommandBar control feature. I am looking to improve user experience therefore i would like to use that in my project to provide ease of accessibility and a user-friendly interface. This new feature will provide quick access to the toolbar, enhance space utilization, etc [...] -->
1919

2020

2121
## Describe the solution

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

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@
1212
namespace Microsoft.Toolkit.Uwp.UI.Controls
1313
{
1414
/// <summary>
15-
/// A basic ribbon control that houses <see cref="TabbedCommandBarItem"/>s
15+
/// A basic TabbedCommandBar control that houses <see cref="TabbedCommandBarItem"/>s
1616
/// </summary>
1717
[ContentProperty(Name = nameof(MenuItems))]
18-
[TemplatePart(Name = "PART_RibbonContent", Type = typeof(ContentControl))]
19-
[TemplatePart(Name = "PART_RibbonContentBorder", Type = typeof(Border))]
18+
[TemplatePart(Name = "PART_TabbedCommandBarContent", Type = typeof(ContentControl))]
19+
[TemplatePart(Name = "PART_TabbedCommandBarContentBorder", Type = typeof(Border))]
2020
[TemplatePart(Name = "PART_TabChangedStoryboard", Type = typeof(Storyboard))]
2121
public class TabbedCommandBar : NavigationView
2222
{
23-
private ContentControl _ribbonContent = null;
24-
private Border _ribbonContentBorder = null;
23+
private ContentControl _tabbedCommandBarContent = null;
24+
private Border _tabbedCommandBarContentBorder = null;
2525
private Storyboard _tabChangedStoryboard = null;
2626

2727
/// <summary>
@@ -45,14 +45,14 @@ protected override void OnApplyTemplate()
4545
{
4646
base.OnApplyTemplate();
4747

48-
if (_ribbonContent != null)
48+
if (_tabbedCommandBarContent != null)
4949
{
50-
_ribbonContent.Content = null;
50+
_tabbedCommandBarContent.Content = null;
5151
}
5252

53-
// Get RibbonContent first, since setting SelectedItem requires it
54-
_ribbonContent = GetTemplateChild("PART_RibbonContent") as ContentControl;
55-
_ribbonContentBorder = GetTemplateChild("PART_RibbonContentBorder") as Border;
53+
// Get TabbedCommandBarContent first, since setting SelectedItem requires it
54+
_tabbedCommandBarContent = GetTemplateChild("PART_TabbedCommandBarContent") as ContentControl;
55+
_tabbedCommandBarContentBorder = GetTemplateChild("PART_TabbedCommandBarContentBorder") as Border;
5656
_tabChangedStoryboard = GetTemplateChild("TabChangedStoryboard") as Storyboard;
5757

5858
SelectedItem = MenuItems.FirstOrDefault();
@@ -83,7 +83,7 @@ private void SelectedItemChanged(NavigationView sender, NavigationViewSelectionC
8383
_visibilityChangedToken =
8484
_previousSelectedItem.RegisterPropertyChangedCallback(TabbedCommandBarItem.VisibilityProperty, SelectedItemVisibilityChanged);
8585

86-
// Set the ribbon background and start the transition animation
86+
// Set the TabbedCommandBar background and start the transition animation
8787
_tabChangedStoryboard?.Begin();
8888
}
8989

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,17 +250,17 @@
250250
</Grid>
251251

252252

253-
<Border x:Name="PART_RibbonContentBorder"
253+
<Border x:Name="PART_TabbedCommandBarContentBorder"
254254
Grid.Row="1"
255255
HorizontalAlignment="Stretch"
256256
VerticalAlignment="Stretch"
257-
Background="{Binding ElementName=PART_RibbonContent, Path=Content.Background}">
258-
<ContentControl x:Name="PART_RibbonContent"
257+
Background="{Binding ElementName=PART_TabbedCommandBarContent, Path=Content.Background}">
258+
<ContentControl x:Name="PART_TabbedCommandBarContent"
259259
HorizontalContentAlignment="Stretch"
260260
Content="{TemplateBinding SelectedItem}">
261261
<ContentControl.Resources>
262262
<Storyboard x:Name="TabChangedStoryboard">
263-
<PopInThemeAnimation TargetName="PART_RibbonContent" />
263+
<PopInThemeAnimation TargetName="PART_TabbedCommandBarContent" />
264264
</Storyboard>
265265

266266
<!--

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public TabbedCommandBarItem()
3535
new PropertyMetadata(string.Empty));
3636

3737
/// <summary>
38-
/// Gets or sets the text or <see cref="UIElement"/> to display in the header of this ribbon tab.
38+
/// Gets or sets the text or <see cref="UIElement"/> to display in the header of this TabbedCommandBar tab.
3939
/// </summary>
4040
public object Header
4141
{

0 commit comments

Comments
 (0)