FlipView Class

Représente un contrôle d'éléments qui affiche un élément à la fois et active le comportement « retourner » pour parcourir sa collection d'éléments.

Héritage

Object
  DependencyObject
    UIElement
      FrameworkElement
        Control
          ItemsControl
            Selector
              FlipView

Syntaxe


public class FlipView : Selector

Attributs

MarshalingBehaviorAttribute(Agile)
ThreadingAttribute(Both)
VersionAttribute(NTDDI_WIN8)
WebHostHiddenAttribute()

Membres

FlipViewClasse comporte les types de membres suivants :

Constructeurs

FlipViewClasse comporte les constructeurs suivants.

ConstructeurDescription
FlipView Initializes a new instance of the FlipView class.

 

Événements

FlipViewClasse comporte les événements suivants.

ÉvénementDescription
DoubleTapped Occurs when an otherwise unhandled DoubleTap interaction occurs over the hit test area of this element. (Hérité de UIElement)
DragEnter Occurs when the input system reports an underlying drag event with this element as the target. (Hérité de UIElement)
DragLeave Occurs when the input system reports an underlying drag event with this element as the origin. (Hérité de UIElement)
DragOver Occurs when the input system reports an underlying drag event with this element as the potential drop target. (Hérité de UIElement)
Drop Occurs when the input system reports an underlying drop event with this element as the drop target. (Hérité de UIElement)
GotFocus Occurs when a UIElement receives focus. (Hérité de UIElement)
Holding Occurs when an otherwise unhandled Hold interaction occurs over the hit test area of this element. (Hérité de UIElement)
IsEnabledChanged Occurs when the IsEnabled property changes. (Hérité de Control)
KeyDown Occurs when a keyboard key is pressed while the UIElement has focus. (Hérité de UIElement)
KeyUp Occurs when a keyboard key is released while the UIElement has focus. (Hérité de UIElement)
LayoutUpdated Occurs when the layout of the visual tree changes. (Hérité de FrameworkElement)
Loaded Occurs when a FrameworkElement has been constructed and added to the object tree, and is ready for interaction. (Hérité de FrameworkElement)
LostFocus Occurs when a UIElement loses focus. (Hérité de UIElement)
ManipulationCompleted Occurs when a manipulation on the UIElement is complete. (Hérité de UIElement)
ManipulationDelta Occurs when the input device changes position during a manipulation. (Hérité de UIElement)
ManipulationInertiaStarting Occurs when the input device loses contact with the UIElement object during a manipulation and inertia begins. (Hérité de UIElement)
ManipulationStarted Occurs when an input device begins a manipulation on the UIElement. (Hérité de UIElement)
ManipulationStarting Occurs when the manipulation processor is first created. (Hérité de UIElement)
PointerCanceled Occurs when a pointer that made contact abnormally loses contact. (Hérité de UIElement)
PointerCaptureLost Occurs when pointer capture previously held by this element moves to another element or elsewhere. (Hérité de UIElement)
PointerEntered Occurs when a pointer enters the hit test area of this element. (Hérité de UIElement)
PointerExited Occurs when a pointer leaves the hit test area of this element. (Hérité de UIElement)
PointerMoved Occurs when a pointer moves while the pointer remains within the hit test area of this element. (Hérité de UIElement)
PointerPressed Occurs when the pointer device initiates a Press action within this element. (Hérité de UIElement)
PointerReleased Occurs when the pointer device that previously initiated a Press action is released, while within this element. (Hérité de UIElement)
PointerWheelChanged Occurs when the delta value of a pointer wheel changes. (Hérité de UIElement)
RightTapped Occurs when a right-tap input stimulus happens while the pointer is over the element. (Hérité de UIElement)
SelectionChanged Occurs when the currently selected item changes. (Hérité de Selector)
SizeChanged Occurs when either the ActualHeight or the ActualWidth property changes value on a FrameworkElement. (Hérité de FrameworkElement)
Tapped Occurs when an otherwise unhandled Tap interaction occurs over the hit test area of this element. (Hérité de UIElement)
Unloaded Occurs when this object is no longer connected to the main object tree. (Hérité de FrameworkElement)

 

Méthodes

The FlipView Classe comporte les méthodes suivantes. Il hérite également des méthodes de Object Classe.

MéthodeDescription
AddHandler Adds a routed event handler for a specified routed event, adding the handler to the handler collection on the current element. Specify handledEventsToo as true to have the provided handler be invoked even if the event is handled elsewhere. (Hérité de UIElement)
ApplyTemplate Loads the relevant control template so that its parts can be referenced. (Hérité de Control)
Arrange Positions child objects and determines a size for a UIElement. Parent objects that implement custom layout for their child elements should call this method from their layout override implementations to form a recursive layout update. (Hérité de UIElement)
ArrangeOverride Provides the behavior for the Arrange pass of layout. Classes can override this method to define their own Arrange pass behavior. (Hérité de FrameworkElement)
CapturePointer Sets pointer capture to a UIElement. Once captured, only the element that has capture will fire pointer-related events. (Hérité de UIElement)
ClearContainerForItemOverride Undoes the effects of the PrepareContainerForItemOverride method. (Hérité de ItemsControl)
ClearValue Clears the local value of a dependency property. (Hérité de DependencyObject)
FindName Retrieves an object that has the specified identifier name. (Hérité de FrameworkElement)
FindSubElementsForTouchTargeting Enables a UIElement subclass to expose child elements that assist with resolving touch targeting. (Hérité de UIElement)
Focus Attempts to set the focus on the control. (Hérité de Control)
GetAnimationBaseValue Returns any base value established for a dependency property, which would apply in cases where an animation is not active. (Hérité de DependencyObject)
GetContainerForItemOverride Creates or identifies the element that is used to display the given item. (Hérité de ItemsControl)
GetTemplateChild Retrieves the named element in the instantiated ControlTemplate visual tree. (Hérité de Control)
GetValue Returns the current effective value of a dependency property from a DependencyObject. (Hérité de DependencyObject)
InvalidateArrange Invalidates the arrange state (layout) for a UIElement. After the invalidation, the UIElement will have its layout updated, which will occur asynchronously. (Hérité de UIElement)
InvalidateMeasure Invalidates the measurement state (layout) for a UIElement. (Hérité de UIElement)
IsItemItsOwnContainerOverride Determines whether the specified item is (or is eligible to be) its own container. (Hérité de ItemsControl)
Measure Updates the DesiredSize of a UIElement. Typically, objects that implement custom layout for their layout children call this method from their own MeasureOverride implementations to form a recursive layout update. (Hérité de UIElement)
MeasureOverride Provides the behavior for the Measure pass of the layout cycle. Classes can override this method to define their own Measure pass behavior. (Hérité de FrameworkElement)
OnApplyTemplate Invoked whenever application code or internal processes (such as a rebuilding layout pass) call ApplyTemplate. In simplest terms, this means the method is called just before a UI element displays in your app. Override this method to influence the default post-template logic of a class. (Hérité de FrameworkElement)
OnCreateAutomationPeer When implemented in a derived class, returns class-specific AutomationPeer implementations for the Microsoft UI Automation infrastructure. (Hérité de UIElement)
OnDisconnectVisualChildren Override this method to implement how layout and logic should behave when items are removed from a class-specific content or children property. (Hérité de UIElement)
OnDoubleTapped Called before the DoubleTapped event occurs. (Hérité de Control)
OnDragEnter Called before the DragEnter event occurs. (Hérité de Control)
OnDragLeave Called before the DragLeave event occurs. (Hérité de Control)
OnDragOver Called before the DragOver event occurs. (Hérité de Control)
OnDrop Called before the Drop event occurs. (Hérité de Control)
OnGotFocus Called before the GotFocus event occurs. (Hérité de Control)
OnGroupStyleSelectorChanged Invoked when the value of the GroupStyleSelector property changes. (Hérité de ItemsControl)
OnHolding Called before the Holding event occurs. (Hérité de Control)
OnItemContainerStyleChanged Invoked when the value of the ItemContainerStyle property changes. (Hérité de ItemsControl)
OnItemContainerStyleSelectorChanged Invoked when the value of the ItemContainerStyleSelector property changes. (Hérité de ItemsControl)
OnItemsChanged Invoked when the value of the Items property changes. (Hérité de ItemsControl)
OnItemTemplateChanged Invoked when the value of the ItemTemplate property changes. (Hérité de ItemsControl)
OnItemTemplateSelectorChanged Invoked when the value of the ItemTemplateSelector property changes. (Hérité de ItemsControl)
OnKeyDown Called before the KeyDown event occurs. (Hérité de Control)
OnKeyUp Called before the KeyUp event occurs. (Hérité de Control)
OnLostFocus Called before the LostFocus event occurs. (Hérité de Control)
OnManipulationCompleted Called before the ManipulationCompleted event occurs. (Hérité de Control)
OnManipulationDelta Called before the ManipulationDelta event occurs. (Hérité de Control)
OnManipulationInertiaStarting Called before the ManipulationInertiaStarting event occurs. (Hérité de Control)
OnManipulationStarted Called before the ManipulationStarted event occurs. (Hérité de Control)
OnManipulationStarting Called before the ManipulationStarting event occurs. (Hérité de Control)
OnPointerCanceled Called before the PointerCanceled event occurs. (Hérité de Control)
OnPointerCaptureLost Called before the PointerCaptureLost event occurs. (Hérité de Control)
OnPointerEntered Called before the PointerEntered event occurs. (Hérité de Control)
OnPointerExited Called before the PointerExited event occurs. (Hérité de Control)
OnPointerMoved Called before the PointerMoved event occurs. (Hérité de Control)
OnPointerPressed Called before the PointerPressed event occurs. (Hérité de Control)
OnPointerReleased Called before the PointerReleased event occurs. (Hérité de Control)
OnPointerWheelChanged Called before the PointerWheelChanged event occurs. (Hérité de Control)
OnRightTapped Called before the RightTapped event occurs. (Hérité de Control)
OnTapped Called before the Tapped event occurs. (Hérité de Control)
PrepareContainerForItemOverride Prepares the specified element to display the specified item. (Hérité de ItemsControl)
ReadLocalValue Returns the local value of a dependency property, if a local value is set. (Hérité de DependencyObject)
ReleasePointerCapture Releases pointer captures for capture of one specific pointer by this UIElement. (Hérité de UIElement)
ReleasePointerCaptures Releases all pointer captures held by this element. (Hérité de UIElement)
RemoveHandler Removes the specified routed event handler from this UIElement. Typically the handler in question was added by AddHandler. (Hérité de UIElement)
SetBinding Attaches a binding to a FrameworkElement, using the provided binding object. (Hérité de FrameworkElement)
SetValue Sets the local value of a dependency property on a DependencyObject. (Hérité de DependencyObject)
TransformToVisual Returns a transform object that can be used to transform coordinates from the UIElement to the specified object. (Hérité de UIElement)
UpdateLayout Ensures that all positions of child objects of a UIElement are properly updated for layout. (Hérité de UIElement)

 

Propriétés

Le FlipViewClasse contient les propriétés suivantes.

PropriétéType d’accèsDescription

ActualHeight

en lecture seuleGets the rendered height of a FrameworkElement. (Hérité de FrameworkElement)

ActualWidth

en lecture seuleGets the rendered width of a FrameworkElement. (Hérité de FrameworkElement)

AllowDrop

en lecture/écritureGets or sets a value that determines whether this UIElement can be a drop target for purposes of drag-and-drop operations. (Hérité de UIElement)

Background

en lecture/écritureGets or sets a brush that provides the background of the control. (Hérité de Control)

BaseUri

en lecture seuleGets a Uniform Resource Identifier (URI) that represents the base Uniform Resource Identifier (URI) for an XAML-constructed object at XAML load time. This property is useful for Uniform Resource Identifier (URI) resolution at run time. (Hérité de FrameworkElement)

BorderBrush

en lecture/écritureGets or sets a brush that describes the border background of a control. (Hérité de Control)

BorderThickness

en lecture/écritureGets or sets the border thickness of a control. (Hérité de Control)

CacheMode

en lecture/écritureGets or sets a value that indicates that rendered content should be cached as a composited bitmap when possible. (Hérité de UIElement)

CharacterSpacing

en lecture/écritureGets or sets the uniform spacing between characters, in units of 1/1000 of an em. (Hérité de Control)

Clip

en lecture/écritureGets or sets the RectangleGeometry used to define the outline of the contents of a UIElement. (Hérité de UIElement)

DataContext

en lecture/écritureGets or sets the data context for a FrameworkElement when it participates in data binding. (Hérité de FrameworkElement)

DefaultStyleKey

en lecture/écritureGets or sets the key that references the default style for the control. (Hérité de Control)

DesiredSize

en lecture seuleGets the size that this UIElement computed during the measure pass of the layout process. (Hérité de UIElement)

Dispatcher

en lecture seuleGets the CoreDispatcher that this object is associated with. (Hérité de DependencyObject)

DisplayMemberPath

en lecture/écritureGets or sets the name or path of the property that is displayed for each data item. (Hérité de ItemsControl)

FlowDirection

en lecture/écritureGets or sets the direction in which text and other UI elements flow within any parent element that controls their layout. This property can be set to either LeftToRight or RightToLeft. Setting FlowDirection to RightToLeft on any element sets the alignment to the right, the reading order to right-to-left and the layout of the control to flow from right to left. (Hérité de FrameworkElement)

FocusState

en lecture seuleGets a value that specifies whether this control has focus, and the mode by which focus was obtained. (Hérité de Control)

FontFamily

en lecture/écritureGets or sets the font used to display text in the control. (Hérité de Control)

FontSize

en lecture/écritureGets or sets the size of the text in this control. (Hérité de Control)

FontStretch

en lecture/écritureGets or sets the degree to which a font is condensed or expanded on the screen. (Hérité de Control)

FontStyle

en lecture/écritureGets or sets the style in which the text is rendered. (Hérité de Control)

FontWeight

en lecture/écritureGets or sets the thickness of the specified font. (Hérité de Control)

Foreground

en lecture/écritureGets or sets a brush that describes the foreground color. (Hérité de Control)

GroupStyle

en lecture seuleGets a collection of GroupStyle objects that define the appearance of each level of groups. (Hérité de ItemsControl)

GroupStyleSelector

en lecture/écritureGets or sets a reference to a custom GroupStyleSelector logic class. The GroupStyleSelector returns different GroupStyle values to use for content based on the characteristics of that content. (Hérité de ItemsControl)

Height

en lecture/écritureGets or sets the suggested height of a FrameworkElement. (Hérité de FrameworkElement)

HorizontalAlignment

en lecture/écritureGets or sets the horizontal alignment characteristics that are applied to a FrameworkElement when it is composed in a layout parent, such as a panel or items control. (Hérité de FrameworkElement)

HorizontalContentAlignment

en lecture/écritureGets or sets the horizontal alignment of the control's content. (Hérité de Control)

IsDoubleTapEnabled

en lecture/écritureGets or sets a value that determines whether the DoubleTapped event can originate from that element. (Hérité de UIElement)

IsEnabled

en lecture/écritureGets or sets a value indicating whether the user can interact with the control. (Hérité de Control)

IsGrouping

en lecture seuleGets a value that indicates whether the control is using grouping. (Hérité de ItemsControl)

IsHitTestVisible

en lecture/écritureGets or sets whether the contained area of this UIElement can return true values for hit testing. (Hérité de UIElement)

IsHoldingEnabled

en lecture/écritureGets or sets a value that determines whether the Holding event can originate from that element. (Hérité de UIElement)

IsRightTapEnabled

en lecture/écritureGets or sets a value that determines whether the RightTapped event can originate from that element. (Hérité de UIElement)

IsSynchronizedWithCurrentItem

en lecture/écritureGets or sets a value that indicates whether a Selector should keep the SelectedItem synchronized with the current item in the Items property. (Hérité de Selector)

IsSynchronizedWithCurrentItemProperty

en lecture seuleIdentifies the IsSynchronizedWithCurrentItem dependency property. (Hérité de Selector)

IsTabStop

en lecture/écritureGets or sets a value that indicates whether a control is included in tab navigation. (Hérité de Control)

IsTapEnabled

en lecture/écritureGets or sets a value that determines whether the Tapped event can originate from that element. (Hérité de UIElement)

ItemContainerGenerator

en lecture seuleGets the ItemContainerGenerator associated with this ItemsControl. (Hérité de ItemsControl)

ItemContainerStyle

en lecture/écritureGets or sets the style that is used when rendering the item containers. (Hérité de ItemsControl)

ItemContainerStyleSelector

en lecture/écritureGets or sets a reference to a custom StyleSelector logic class. The StyleSelector returns different Style values to use for the item container based on characteristics of the object being displayed. (Hérité de ItemsControl)

ItemContainerTransitions

en lecture/écritureGets or sets the collection of Transition style elements that apply to the item containers of an ItemsControl. (Hérité de ItemsControl)

Items

en lecture seuleGets the collection used to generate the content of the control. (Hérité de ItemsControl)

ItemsPanel

en lecture/écritureGets or sets the template that defines the panel that controls the layout of items. (Hérité de ItemsControl)

ItemsSource

en lecture/écritureGets or sets an object source used to generate the content of the ItemsControl. (Hérité de ItemsControl)

ItemTemplate

en lecture/écritureGets or sets the DataTemplate used to display each item. (Hérité de ItemsControl)

ItemTemplateSelector

en lecture/écritureGets or sets a reference to a custom DataTemplateSelector logic class. The DataTemplateSelector referenced by this property returns a template to apply to items. (Hérité de ItemsControl)

Language

en lecture/écritureGets or sets localization/globalization language information that applies to a FrameworkElement, and also to all child elements of the current FrameworkElement in the object representation and in UI. (Hérité de FrameworkElement)

ManipulationMode

en lecture/écritureGets or sets the ManipulationModes value used for UIElement behavior and interaction with gestures. (Hérité de UIElement)

Margin

en lecture/écritureGets or sets the outer margin of a FrameworkElement. (Hérité de FrameworkElement)

MaxHeight

en lecture/écritureGets or sets the maximum height constraint of a FrameworkElement. (Hérité de FrameworkElement)

MaxWidth

en lecture/écritureGets or sets the maximum width constraint of a FrameworkElement. (Hérité de FrameworkElement)

MinHeight

en lecture/écritureGets or sets the minimum height constraint of a FrameworkElement. (Hérité de FrameworkElement)

MinWidth

en lecture/écritureGets or sets the minimum width constraint of a FrameworkElement. (Hérité de FrameworkElement)

Name

en lecture/écritureGets or sets the identifying name of the object. When a XAML processor creates the object tree from XAML markup, run-time code can refer to the XAML-declared object by this name. (Hérité de FrameworkElement)

Opacity

en lecture/écritureGets or sets the degree of the object's opacity. (Hérité de UIElement)

Padding

en lecture/écritureGets or sets the padding inside a control. (Hérité de Control)

Parent

en lecture seuleGets the parent object of this FrameworkElement in the object tree. (Hérité de FrameworkElement)

PointerCaptures

en lecture seuleGets the set of all captured pointers, represented as Pointer values. (Hérité de UIElement)

Projection

en lecture/écritureGets or sets the perspective projection (3-D effect) to apply when rendering this element. (Hérité de UIElement)

RenderSize

en lecture seuleGets the final render size of a UIElement. (Hérité de UIElement)

RenderTransform

en lecture/écritureGets or sets transform information that affects the rendering position of a UIElement. (Hérité de UIElement)

RenderTransformOrigin

en lecture/écritureGets or sets the origin point of any possible render transform declared by RenderTransform, relative to the bounds of the UIElement. (Hérité de UIElement)

Resources

en lecture/écritureGets the locally defined resource dictionary. In XAML, you can establish resource items as child object elements of a frameworkElement.Resources property element, through XAML implicit collection syntax. (Hérité de FrameworkElement)

SelectedIndex

en lecture/écritureGets or sets the index of the selected item. (Hérité de Selector)

SelectedIndexProperty

en lecture seuleIdentifies the SelectedIndex dependency property. (Hérité de Selector)

SelectedItem

en lecture/écritureGets or sets the selected item. (Hérité de Selector)

SelectedItemProperty

en lecture seuleIdentifies the SelectedItem dependency property. (Hérité de Selector)

SelectedValue

en lecture/écritureGets or sets the value of the selected item, obtained by using the SelectedValuePath. (Hérité de Selector)

SelectedValuePath

en lecture/écritureGets or sets the property path that is used to get the SelectedValue property of the SelectedItem property. (Hérité de Selector)

SelectedValuePathProperty

en lecture seuleGets the identifier for the SelectedValuePath dependency property. (Hérité de Selector)

SelectedValueProperty

en lecture seuleGets the identifier for the SelectedValue dependency property. (Hérité de Selector)

Style

en lecture/écritureGets or sets an instance Style that is applied for this object during layout and rendering. (Hérité de FrameworkElement)

TabIndex

en lecture/écritureGets or sets a value that determines the order in which elements receive focus when the user navigates through controls by pressing the Tab key. (Hérité de Control)

TabNavigation

en lecture/écritureGets or sets a value that modifies how tabbing and TabIndex work for this control. (Hérité de Control)

Tag

en lecture/écritureGets or sets an arbitrary object value that can be used to store custom information about this object. (Hérité de FrameworkElement)

Template

en lecture/écritureGets or sets a control template. The control template defines the visual appearance of a control in UI, and is defined in XAML markup. (Hérité de Control)

Transitions

en lecture/écritureGets or sets the collection of Transition style elements that apply to a UIElement. (Hérité de UIElement)

Triggers

en lecture seuleGets the collection of triggers for animations that are defined for a FrameworkElement. Not commonly used. (Hérité de FrameworkElement)

UseLayoutRounding

en lecture/écritureGets or sets a value that determines whether rendering for the object and its visual subtree should use rounding behavior that aligns rendering to whole pixels. (Hérité de UIElement)

VerticalAlignment

en lecture/écritureGets or sets the vertical alignment characteristics that are applied to a FrameworkElement when it is composed in a parent object such as a panel or items control. (Hérité de FrameworkElement)

VerticalContentAlignment

en lecture/écritureGets or sets the vertical alignment of the control's content. (Hérité de Control)

Visibility

en lecture/écritureGets or sets the visibility of a UIElement. A UIElement that is not visible is not rendered and does not communicate its desired size to layout. (Hérité de UIElement)

Width

en lecture/écritureGets or sets the width of a FrameworkElement. (Hérité de FrameworkElement)

 

Remarques

Utilisez FlipView pour présenter une collection d'éléments qui l'utilisateur affiche de manière séquentielle, un par un. Il est utile pour afficher une galerie d'images ou les pages d'un magazine.

FlipView est un contrôle ItemsControl ; par conséquent, il peut contenir une collection d'éléments de tout type. Pour remplir une vue, ajoutez des éléments à la collection Items ou définissez la propriété ItemsSource sur une source de données.

Par défaut, un élément de données est affiché dans FlipView en tant que représentation sous forme de chaîne de l'objet de données auquel il est lié. Pour spécifier exactement comment les éléments dans FlipView sont affichés, vous créez un DataTemplate pour définir la disposition des contrôles utilisés pour afficher un élément individuel. Les contrôles de la disposition peuvent être liés aux propriétés d'un objet de données ou avoir du contenu défini inline. Vous assignez ensuite l'objet DataTemplate à la propriété ItemTemplate de FlipView.

Pour plus d'informations, consultez les rubriques suivantes :

Pour plus d'exemples, consultez l'exemple de contrôle XAML FlipView.

Exemples

Dans cet exemple, l'ItemTemplate d'un FlipView est défini inline.


    <FlipView x:Name="flipView1" Width="480" Height="270" 
              BorderBrush="Black" BorderThickness="1">
            <FlipView.ItemTemplate>
                <DataTemplate>
                    <Grid>
                        <Image Width="480" Height="270" Source="{Binding Image}" Stretch="UniformToFill"/>
                        <Border Background="#A5000000" Height="80" VerticalAlignment="Bottom">
                            <TextBlock Text="{Binding Name}" FontFamily="Segoe UI" FontSize="26.667" 
                                       Foreground="#CCFFFFFF" Padding="15,20"/>
                        </Border>
                    </Grid>
                </DataTemplate>
            </FlipView.ItemTemplate>
        </FlipView>


Configuration requise

Client minimal pris en charge

Windows 8 [Applications du Windows Store uniquement]

Serveur minimal pris en charge

Windows Server 2012 [Applications du Windows Store uniquement]

Espace de noms

Windows.UI.Xaml.Controls
Windows::UI::Xaml::Controls [C++]

Métadonnées

Windows.winmd

Voir aussi

Selector

 

 

Afficher:
© 2014 Microsoft