PipsPager Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a control that enables navigation within linearly paginated content using a configurable collection of glyphs, each of which represents a single "page" within a limitless range.
This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).
/// [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
/// [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallbackMethodName(value="OnPropertyChanged")]
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.UI.Xaml.XamlContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class PipsPager : Control
[Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
[Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallbackMethodName(value="OnPropertyChanged")]
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.UI.Xaml.XamlContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public class PipsPager : Control
Public Class PipsPager
Inherits Control
- Inheritance
-
PipsPager
- Attributes
-
Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallbackAttribute Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallbackMethodNameAttribute ContractVersionAttribute MarshalingBehaviorAttribute ThreadingAttribute
Examples
Tip
For more info, design guidance, and code examples, see PipsPager.
The WinUI 3 Gallery and WinUI 2 Gallery apps include interactive examples of most WinUI 3 and WinUI 2 controls, features, and functionality.
If installed already, open them by clicking the following links: WinUI 3 Gallery or WinUI 2 Gallery.
If they are not installed, you can download the WinUI 3 Gallery and the WinUI 2 Gallery from the Microsoft Store.
You can also get the source code for both from GitHub (use the main branch for WinUI 3 and the winui2 branch for WinUI 2).
Tip
For more info, design guidance, and code examples, see PipsPager.
The WinUI 2 Gallery app includes interactive examples of most WinUI 2 controls, features, and functionality. Get the app from the Microsoft Store or get the source code on GitHub.
Remarks
The glyphs highlight the current page, and indicate the availability of both preceding and succeeding pages. The control relies on current context and does not support explicit page numbering or a non-linear organization.
See the PipsPager overview for more details.
Control style and template
You can modify the default Style and ControlTemplate to give the control a unique appearance. For information about modifying a control's style and template, see Styling controls. The default style, template, and resources that define the look of the control are included in the generic.xaml file. For design purposes, generic.xaml is available in the (Program Files)\Windows Kits\10\DesignTime\CommonConfiguration\Neutral\UAP\ <SDK version>\Generic folder from a Windows Software Development Kit (SDK) installation. Styles and resources from different versions of the SDK might have different values.
Starting in Windows 10, version 1607 (SDK 14393), generic.xaml includes resources that you can use to modify the colors of a control in different visual states without modifying the control template. In apps that target this software development kit (SDK) or later, modifying these resources is preferred to setting properties such as Background and Foreground. For more info, see the Light-weight styling section of the Styling controls article.
This table shows the resources used by the PipsPager control.
All Theme Resources
| Resource key | Description | Type |
|---|---|---|
| PipsPagerVerticalButtonWidth | Sets the bounding box width for each pip when in vertical orientation | Double |
| PipsPagerVerticalButtonHeight | Sets the bounding box height for each pip when in vertical orientation | Double |
| PipsPagerHorizontalButtonWidth | Sets the bounding box width for each pip when in horizontal orientation | Double |
| PipsPagerHorizontalButtonHeight | Sets the bounding box height for each pip when in horizontal orientation | Double |
| PipsPagerButtonBorderThickness | Sets the border thickness for each pip | Thickness |
| PipsPagerNavigationButtonBorderThickness | Sets the border thickness for each navigational button | Thickness |
| PipsPagerSelectedGlyph | Sets the pip glyph when selected in MDL2 icon set | String |
| PipsPagerNormalGlyph | Sets the default pip glyph in MDL2 icon set | String |
| PipsPagerNavigationButtonHeight | Sets the height for each navigational button | Double |
| PipsPagerNavigationWidth | Sets the width for each navigational button | Double |
| PipsPagerNavigationButtonFontSize | Sets the font size for each navigational button | Double |
| PipsPagerSelectedGlyphFontSize | Sets the size in pixels of the pip glyph when selected | Double |
| PipsPagerNormalGlyphFontSize | Sets the size in pixels of the pip glyph at rest | Double |
| PipsPagerSelectionIndicatorBackground | Sets the pip background | StaticResource |
| PipsPagerSelectionIndicatorBackgroundPointerOver | Sets the pip background on pointer over | StaticResource |
| PipsPagerSelectionIndicatorBackgroundPressed | Sets the pip background when pressed | StaticResource |
| PipsPagerSelectionIndicatorBackgroundSelected | Sets the pip background when selected | StaticResource |
| PipsPagerSelectionIndicatorBackgroundDisabled | Sets the pip background when disabled | StaticResource |
| PipsPagerSelectionIndicatorBorderBrush | Sets the pip border | StaticResource |
| PipsPagerSelectionIndicatorBorderBrushPointerOver | Sets the pip border on pointer over | StaticResource |
| PipsPagerSelectionIndicatorBorderBrushPressed | Sets the pip border when pressed | StaticResource |
| PipsPagerSelectionIndicatorBorderBrushSelected | Sets the pip border when selected | StaticResource |
| PipsPagerSelectionIndicatorBorderBrushDisabled | Sets the pip border when disabled | StaticResource |
| PipsPagerSelectionIndicatorForeground | Sets the pip foreground | StaticResource |
| PipsPagerSelectionIndicatorForegroundPointerOver | Sets the pip foreground on pointer over | StaticResource |
| PipsPagerSelectionIndicatorForegroundPressed | Sets the pip foreground when pressed | StaticResource |
| PipsPagerSelectionIndicatorForegroundSelected | Sets the pip foreground when selected | StaticResource |
| PipsPagerSelectionIndicatorForegroundDisabled | Sets the pip foreground when disabled | StaticResource |
| PipsPagerNavigationButtonBackground | Sets the navigation button background | StaticResource |
| PipsPagerNavigationButtonBackgroundPointerOver | Sets the navigation button background on pointer over | StaticResource |
| PipsPagerNavigationButtonBackgroundPressed | Sets the navigation button background when pressed | StaticResource |
| PipsPagerNavigationButtonBackgroundDisabled | Sets the navigation button background when disabled | StaticResource |
| PipsPagerNavigationButtonBorderBrush | Sets the navigation button border | StaticResource |
| PipsPagerNavigationButtonBorderBrushPointerOver | Sets the navigation button border on pointer over | StaticResource |
| PipsPagerNavigationButtonBorderBrushPressed | Sets the navigation button border when pressed | StaticResource |
| PipsPagerNavigationButtonBorderBrushDisabled | Sets the navigation button border when disabled | StaticResource |
| PipsPagerNavigationButtonForeground | Sets the navigation button foreground | StaticResource |
| PipsPagerNavigationButtonForegroundPointerOver | Sets the navigation button foreground on pointer over | StaticResource |
| PipsPagerNavigationButtonForegroundPressed | Sets the navigation button foreground when pressed | StaticResource |
| PipsPagerNavigationButtonForegroundDisabled | Sets the navigation button foreground when disabled | StaticResource |
Constructors
| PipsPager() |
Initializes a new instance of the PipsPager class. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
Properties
| MaxVisiblePips |
The maximum number of pips shown in the PipsPager at one time. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
| MaxVisiblePipsProperty |
Identifies the MaxVisiblePips dependency property. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
| NextButtonStyle |
Gets or sets the style to apply to the Next button. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
| NextButtonStyleProperty |
Identifies the NextButtonStyle dependency property. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
| NextButtonVisibility |
Gets or sets the display state of the Next button. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
| NextButtonVisibilityProperty |
Identifies the NextButtonVisibility dependency property. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
| NormalPipStyle |
Gets or sets the style for the default, unselected pips in the PipsPager. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
| NormalPipStyleProperty |
Identifies the NormalPipStyle dependency property. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
| NumberOfPages |
Gets or sets the maximum number of pages supported by the PipsPager. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
| NumberOfPagesProperty |
Identifies the NumberOfPages dependency property. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
| Orientation |
Gets or sets the orientation of the pips and navigation buttons in the PipsPager. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
| OrientationProperty |
Identifies the Orientation dependency property. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
| PreviousButtonStyle |
Gets or sets the style to apply to the Previous button. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
| PreviousButtonStyleProperty |
Identifies the PreviousButtonStyle dependency property. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
| PreviousButtonVisibility |
Gets or sets the display state of the Previous button. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
| PreviousButtonVisibilityProperty |
Identifies the PreviousButtonVisibility dependency property. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
| SelectedPageIndex |
Gets or sets the 0 based index of the currently selected pip in the PipsPager. A pip is always selected. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
| SelectedPageIndexProperty |
Identifies the SelectedPageIndex dependency property. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
| SelectedPipStyle |
Gets or sets the style to apply to the selected pip in the PipsPager. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
| SelectedPipStyleProperty |
Identifies the SelectedPipStyle dependency property. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
| TemplateSettings |
Provides calculated values that can be referenced as TemplatedParent sources when defining templates for a PipsPager. Not intended for general use. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
Events
| SelectedIndexChanged |
Occurs after the selected index changes on the PipsPager. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
Applies to
See also
피드백
다음에 대한 사용자 의견 제출 및 보기