Skip to content

Commit 5eaeeca

Browse files
author
msftbot[bot]
authored
Replace remaning references to ribbon to TabbedCommandBar (#3890)
<!-- 🚨 Please Do Not skip any instructions and information mentioned below as they are all required and essential to evaluate and test the PR. By fulfilling all the required information you will be able to reduce the volume of questions and most likely help merge the PR faster 🚨 --> <!-- 📝 It is preferred if you keep the "☑️ Allow edits by maintainers" checked in the Pull Request Template as it increases collaboration with the Toolkit maintainers by permitting commits to your PR branch (only) created from your fork. This can let us quickly make fixes for minor typos or forgotten StyleCop issues during review without needing to wait on you doing extra work. Let us help you help us! 🎉 --> ## Some references to ribbon removed <!-- Add the relevant issue number after the "#" mentioned above (for ex: Fixes #1234) which will automatically close the issue once the PR is merged. --> <!-- Add a brief overview here of the feature/bug & fix. --> Replaces certain referecnes to ribbon with TabbedCommandBar ## PR Type What kind of change does this PR introduce? <!-- Please uncomment one or more that apply to this PR. --> - Bugfix <!-- - Feature --> <!-- - Code style update (formatting) --> <!-- - Refactoring (no functional changes, no api changes) --> <!-- - Build or CI related changes --> <!-- - Documentation content changes --> <!-- - Sample app changes --> <!-- - Other... Please describe: --> ## What is the current behavior? <!-- Please describe the current behavior that you are modifying, or link to a relevant issue. --> ## What is the new behavior? <!-- Describe how was this issue resolved or changed? --> ## PR Checklist Please check if your PR fulfills the following requirements: - [ ] Tested code with current [supported SDKs](../readme.md#supported) - [ ] Pull Request has been submitted to the documentation repository [instructions](..\contributing.md#docs). Link: <!-- docs PR link --> - [ ] Sample in sample app has been added / updated (for bug fixes / features) - [ ] Icon has been created (if new sample) following the [Thumbnail Style Guide and templates](https://github.com/windows-toolkit/WindowsCommunityToolkit-design-assets) - [ ] New major technical changes in the toolkit have or will be added to the [Wiki](https://github.com/windows-toolkit/WindowsCommunityToolkit/wiki) e.g. build changes, source generators, testing infrastructure, sample creation changes, etc... - [ ] Tests for the changes have been added (for bug fixes / features) (if applicable) - [ ] Header has been added to all new source files (run *build/UpdateHeaders.bat*) - [ ] Contains **NO** breaking changes <!-- If this PR contains a breaking change, please describe the impact and migration path for existing applications below. Please note that breaking changes are likely to be rejected within minor release cycles or held until major versions. --> ## Other information
2 parents b2f8fcb + a47b51d commit 5eaeeca

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)