diff --git a/hub/apps/develop/ui/controls/buttons.md b/hub/apps/develop/ui/controls/buttons.md index e5b6496924..c86305060a 100644 --- a/hub/apps/develop/ui/controls/buttons.md +++ b/hub/apps/develop/ui/controls/buttons.md @@ -277,7 +277,7 @@ private void AlignmentMenuFlyoutItem_Click(object sender, RoutedEventArgs e) { var option = ((MenuFlyoutItem)sender).Tag.ToString(); - Windows.UI.Text.ITextSelection selectedText = editor.Document.Selection; + Microsoft.UI.Text.ITextSelection selectedText = editor.Document.Selection; if (selectedText != null) { // Apply the alignment to the selected paragraphs. @@ -403,10 +403,10 @@ public sealed partial class MainPage : Page private void ChangeColor() { // Apply the color to the selected text in a RichEditBox. - Windows.UI.Text.ITextSelection selectedText = editor.Document.Selection; + Microsoft.UI.Text.ITextSelection selectedText = editor.Document.Selection; if (selectedText != null) { - Windows.UI.Text.ITextCharacterFormat charFormatting = selectedText.CharacterFormat; + Microsoft.UI.Text.ITextCharacterFormat charFormatting = selectedText.CharacterFormat; charFormatting.ForegroundColor = CurrentColorBrush.Color; selectedText.CharacterFormat = charFormatting; } @@ -522,7 +522,7 @@ private void ListStylesListView_SelectionChanged(object sender, SelectionChanged private void ApplyListStyle(string listStyle) { - Windows.UI.Text.ITextSelection selectedText = editor.Document.Selection; + Microsoft.UI.Text.ITextSelection selectedText = editor.Document.Selection; if (selectedText != null) { // Apply the list style to the selected text. diff --git a/hub/apps/develop/ui/controls/custom-transport-controls.md b/hub/apps/develop/ui/controls/custom-transport-controls.md index 0834f66bdd..751403bc0f 100644 --- a/hub/apps/develop/ui/controls/custom-transport-controls.md +++ b/hub/apps/develop/ui/controls/custom-transport-controls.md @@ -15,7 +15,7 @@ ms.localizationpriority: medium MediaPlayerElement has customizable XAML transport controls to manage control of audio and video content within a Windows app. Here, we demonstrate how to customize the MediaTransportControls template. We'll show you how to work with the overflow menu, add a custom button and modify the slider. -> **Important APIs**: [MediaPlayerElement](/uwp/api/windows.ui.xaml.controls.mediaplayerelement), [MediaPlayerElement.AreTransportControlsEnabled](/uwp/api/windows.ui.xaml.controls.mediaplayerelement.aretransportcontrolsenabled), [MediaTransportControls](/uwp/api/Windows.Media.SystemMediaTransportControls) +> **Important APIs**: [MediaPlayerElement](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.mediaplayerelement), [MediaPlayerElement.AreTransportControlsEnabled](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.mediaplayerelement.aretransportcontrolsenabled), [MediaTransportControls](/uwp/api/Windows.Media.SystemMediaTransportControls) Before starting, you should be familiar with the MediaPlayerElement and the MediaTransportControls classes. For more info, see the MediaPlayerElement control guide. @@ -24,7 +24,7 @@ Before starting, you should be familiar with the MediaPlayerElement and the Medi ## When should you customize the template? -**MediaPlayerElement** has built-in transport controls that are designed to work well without modification in most video and audio playback apps. They're provided by the [**MediaTransportControls**](/uwp/api/Windows.UI.Xaml.Controls.MediaTransportControls) class and include buttons to play, stop, and navigate media, adjust volume, toggle full screen, cast to a second device, enable captions, switch audio tracks, and adjust the playback rate. MediaTransportControls has properties that let you control whether each button is shown and enabled. You can also set the [**IsCompact**](/uwp/api/windows.ui.xaml.controls.mediatransportcontrols.iscompact) property to specify whether the controls are shown in one row or two. +**MediaPlayerElement** has built-in transport controls that are designed to work well without modification in most video and audio playback apps. They're provided by the [**MediaTransportControls**](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.Controls.MediaTransportControls) class and include buttons to play, stop, and navigate media, adjust volume, toggle full screen, cast to a second device, enable captions, switch audio tracks, and adjust the playback rate. MediaTransportControls has properties that let you control whether each button is shown and enabled. You can also set the [**IsCompact**](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.mediatransportcontrols.iscompact) property to specify whether the controls are shown in one row or two. However, there may be scenarios where you need to further customize the look of the control or change its behavior. Here are some examples: - Change the icons, slider behavior, and colors. @@ -42,17 +42,17 @@ You can customize the appearance of the control by modifying the default templat ## Template structure -The [**ControlTemplate**](/uwp/api/Windows.UI.Xaml.Controls.ControlTemplate) is part of the default style. You can copy this default style into your project to modify it. The ControlTemplate is divided into sections similar to other XAML control templates. -- The first section of the template contains the [**Style**](/uwp/api/Windows.UI.Xaml.Style) definitions for the various components of the MediaTransportControls. +The [**ControlTemplate**](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.Controls.ControlTemplate) is part of the default style. You can copy this default style into your project to modify it. The ControlTemplate is divided into sections similar to other XAML control templates. +- The first section of the template contains the [**Style**](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.Style) definitions for the various components of the MediaTransportControls. - The second section defines the various visual states that are used by the MediaTransportControls. -- The third section contains the [**Grid**](/uwp/api/Windows.UI.Xaml.Controls.Grid) that holds that various MediaTransportControls elements together and defines how the components are laid out. +- The third section contains the [**Grid**](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.Controls.Grid) that holds that various MediaTransportControls elements together and defines how the components are laid out. > [!NOTE] > For more info about modifying templates, see [Control templates](../../platform/xaml/xaml-control-templates.md). You can use a text editor or similar editors in your IDE to open the XAML files in \(*Program Files*)\Windows Kits\10\DesignTime\CommonConfiguration\Neutral\UAP\\(*SDK version*)\Generic. The default style and template for each control is defined in the **generic.xaml** file. You can find the MediaTransportControls template in generic.xaml by searching for "MediaTransportControls". In the following sections, you learn how to customize several of the main elements of the transport controls: -- [**Slider**](/uwp/api/Windows.UI.Xaml.Controls.Slider): allows a user to scrub through their media and also displays progress -- [**CommandBar**](/uwp/api/Windows.UI.Xaml.Controls.CommandBar): contains all of the buttons. +- [**Slider**](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.Controls.Slider): allows a user to scrub through their media and also displays progress +- [**CommandBar**](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.Controls.CommandBar): contains all of the buttons. For more info, see the Anatomy section of the MediaTransportControls reference topic. ## Customize the transport controls @@ -100,9 +100,9 @@ public sealed class CustomMediaTransportControls : MediaTransportControls } ``` -3. Copy the default style for [**MediaTransportControls**](/uwp/api/Windows.UI.Xaml.Controls.MediaTransportControls) into a [ResourceDictionary](/uwp/api/Windows.UI.Xaml.ResourceDictionary) in your project. This is the style and template you modify. +3. Copy the default style for [**MediaTransportControls**](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.Controls.MediaTransportControls) into a [ResourceDictionary](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.ResourceDictionary) in your project. This is the style and template you modify. (In the Media Transport Controls sample, a new folder called "Themes" is created, and a ResourceDictionary file called generic.xaml is added to it.) -4. Change the [**TargetType**](/uwp/api/windows.ui.xaml.style.targettype) of the style to the new custom control type. (In the sample, the TargetType is changed to `local:CustomMediaTransportControls`.) +4. Change the [**TargetType**](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.style.targettype) of the style to the new custom control type. (In the sample, the TargetType is changed to `local:CustomMediaTransportControls`.) ```xaml xmlns:local="using:CustomMediaTransportControls"> @@ -110,7 +110,7 @@ xmlns:local="using:CustomMediaTransportControls">