ListView 클래스
TOC
콘텐츠의 테이블 축소
콘텐츠의 테이블 확장

ListView Class

데이터 항목의 세로 목록을 표시하는 컨트롤을 나타냅니다.

상속

Object
  DependencyObject
    UIElement
      FrameworkElement
        Control
          ItemsControl
            Selector
              ListViewBase
                ListView

구문


public class ListView : ListViewBase


<ListView .../>
-or-
<ListView ...>
  oneOrMoreComponents
</ListView>

XAML Values

oneOrMoreComponents

뷰의 ItemsControl 특성을 설정하는 하나 이상의 구성 요소입니다. 예를 들어 ListViewGroupStyle, ItemTemplate, ItemContainerStyle 또는 ItemsPanel 속성에 대한 인라인 정의를 수행하는 개체 요소를 포함할 수 있습니다.

ListView는 보려는 실제 콘텐츠를 선언하는 개체 요소를 포함할 수도 있습니다. 이러한 개체 요소는 Items 컬렉션을 채웁니다. 그러나 이런 콘텐츠를 데이터 바인딩 소스에서 가져오는 것이 더 일반적입니다.

특성

[MarshalingBehavior(Agile)]
[Threading(Both)]
[Version(0x06020000)]
[WebHostHidden()]

멤버

ListView클래스에는 다음과 같은 형식의 멤버가 있습니다.

생성자

ListView클래스에는 다음과 같은 생성자가 있습니다.

생성자Description
ListView Initializes a new instance of the ListView class.

 

이벤트

ListView클래스에는 다음과 같은 이벤트가 있습니다.

이벤트Description
ContainerContentChanging Occurs when the data item associated with a UI container changes. (다음에서 상속됨 ListViewBase)
DataContextChanged Occurs when the value of the FrameworkElement.DataContext property changes. (다음에서 상속됨 FrameworkElement)
DoubleTapped Occurs when an otherwise unhandled DoubleTap interaction occurs over the hit test area of this element. (다음에서 상속됨 UIElement)
DragEnter Occurs when the input system reports an underlying drag event with this element as the target. (다음에서 상속됨 UIElement)
DragItemsStarting Occurs when a drag operation that involves one of the items in the view is initiated. (다음에서 상속됨 ListViewBase)
DragLeave Occurs when the input system reports an underlying drag event with this element as the origin. (다음에서 상속됨 UIElement)
DragOver Occurs when the input system reports an underlying drag event with this element as the potential drop target. (다음에서 상속됨 UIElement)
Drop Occurs when the input system reports an underlying drop event with this element as the drop target. (다음에서 상속됨 UIElement)
GotFocus Occurs when a UIElement receives focus. (다음에서 상속됨 UIElement)
Holding Occurs when an otherwise unhandled Hold interaction occurs over the hit test area of this element. (다음에서 상속됨 UIElement)
IsEnabledChanged Occurs when the IsEnabled property changes. (다음에서 상속됨 Control)
ItemClick Occurs when an item in the list view receives an interaction, and the IsItemClickEnabled property is true. (다음에서 상속됨 ListViewBase)
KeyDown Occurs when a keyboard key is pressed while the UIElement has focus. (다음에서 상속됨 UIElement)
KeyUp Occurs when a keyboard key is released while the UIElement has focus. (다음에서 상속됨 UIElement)
LayoutUpdated Occurs when the layout of the visual tree changes, due to layout-relevant properties changing value or some other action that refreshes the layout. (다음에서 상속됨 FrameworkElement)
Loaded Occurs when a FrameworkElement has been constructed and added to the object tree, and is ready for interaction. (다음에서 상속됨 FrameworkElement)
LostFocus Occurs when a UIElement loses focus. (다음에서 상속됨 UIElement)
ManipulationCompleted Occurs when a manipulation on the UIElement is complete. (다음에서 상속됨 UIElement)
ManipulationDelta Occurs when the input device changes position during a manipulation. (다음에서 상속됨 UIElement)
ManipulationInertiaStarting Occurs when the input device loses contact with the UIElement object during a manipulation and inertia begins. (다음에서 상속됨 UIElement)
ManipulationStarted Occurs when an input device begins a manipulation on the UIElement. (다음에서 상속됨 UIElement)
ManipulationStarting Occurs when the manipulation processor is first created. (다음에서 상속됨 UIElement)
PointerCanceled Occurs when a pointer that made contact abnormally loses contact. (다음에서 상속됨 UIElement)
PointerCaptureLost Occurs when pointer capture previously held by this element moves to another element or elsewhere. (다음에서 상속됨 UIElement)
PointerEntered Occurs when a pointer enters the hit test area of this element. (다음에서 상속됨 UIElement)
PointerExited Occurs when a pointer leaves the hit test area of this element. (다음에서 상속됨 UIElement)
PointerMoved Occurs when a pointer moves while the pointer remains within the hit test area of this element. (다음에서 상속됨 UIElement)
PointerPressed Occurs when the pointer device initiates a Press action within this element. (다음에서 상속됨 UIElement)
PointerReleased Occurs when the pointer device that previously initiated a Press action is released, while within this element. (다음에서 상속됨 UIElement)
PointerWheelChanged Occurs when the delta value of a pointer wheel changes. (다음에서 상속됨 UIElement)
RightTapped Occurs when a right-tap input stimulus happens while the pointer is over the element. (다음에서 상속됨 UIElement)
SelectionChanged Occurs when the currently selected item changes. (다음에서 상속됨 Selector)
SizeChanged Occurs when either the ActualHeight or the ActualWidth property changes value on a FrameworkElement. (다음에서 상속됨 FrameworkElement)
Tapped Occurs when an otherwise unhandled Tap interaction occurs over the hit test area of this element. (다음에서 상속됨 UIElement)
Unloaded Occurs when this object is no longer connected to the main object tree. (다음에서 상속됨 FrameworkElement)

 

메서드

The ListView 클래스 - 이러한 메서드가 있습니다. 다음 위치의 메서드도 상속합니다. Object 클래스.

메서드Description
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. (다음에서 상속됨 UIElement)
ApplyTemplate Loads the relevant control template so that its parts can be referenced. (다음에서 상속됨 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. (다음에서 상속됨 UIElement)
ArrangeOverride Provides the behavior for the Arrange pass of layout. Classes can override this method to define their own Arrange pass behavior. (다음에서 상속됨 FrameworkElement)
CancelDirectManipulations Cancels ongoing direct manipulation processing (system-defined panning/zooming) on any ScrollViewer parent that contains the current UIElement. (다음에서 상속됨 UIElement)
CapturePointer Sets pointer capture to a UIElement. Once captured, only the element that has capture will fire pointer-related events. (다음에서 상속됨 UIElement)
ClearContainerForItemOverride Undoes the effects of the PrepareContainerForItemOverride method. (다음에서 상속됨 ItemsControl)
ClearValue Clears the local value of a dependency property. (다음에서 상속됨 DependencyObject)
CompleteViewChange Changes related aspects of presentation when the overall view for a SemanticZoom changes. (다음에서 상속됨 ListViewBase)
CompleteViewChangeFrom Completes item-wise operations that are related to a view change when the ListViewBase instance is the source view and the new view is a potentially different implementing view. (다음에서 상속됨 ListViewBase)
CompleteViewChangeTo Completes item-wise operations that are related to a view change when the ListViewBase instance is the destination view and the source view is a potentially different implementing view. (다음에서 상속됨 ListViewBase)
ContainerFromIndex Returns the container for the item at the specified index within the ItemCollection. (다음에서 상속됨 ItemsControl)
ContainerFromItem Returns the container corresponding to the specified item. (다음에서 상속됨 ItemsControl)
FindName Retrieves an object that has the specified identifier name. (다음에서 상속됨 FrameworkElement)
FindSubElementsForTouchTargeting Enables a UIElement subclass to expose child elements that assist with resolving touch targeting. (다음에서 상속됨 UIElement)
Focus Attempts to set the focus on the control. (다음에서 상속됨 Control)
GetAnimationBaseValue Returns any base value established for a dependency property, which would apply in cases where an animation is not active. (다음에서 상속됨 DependencyObject)
GetBindingExpression Returns the BindingExpression that represents the binding on the specified property. (다음에서 상속됨 FrameworkElement)
GetContainerForItemOverride Creates or identifies the element that is used to display the given item. (다음에서 상속됨 ItemsControl)
GetTemplateChild Retrieves the named element in the instantiated ControlTemplate visual tree. (다음에서 상속됨 Control)
GetValue Returns the current effective value of a dependency property from a DependencyObject. (다음에서 상속됨 DependencyObject)
GoToElementStateCore When implemented in a derived class, enables per-state construction of a visual tree for a control template in code, rather than by loading XAML for all states at control startup. (다음에서 상속됨 FrameworkElement)
IndexFromContainer Returns the index to the item that has the specified, generated container. (다음에서 상속됨 ItemsControl)
InitializeViewChange Initializes the changes to related aspects of presentation (such as scrolling UI or state) when the overall view for a SemanticZoom is about to change. (다음에서 상속됨 ListViewBase)
InvalidateArrange Invalidates the arrange state (layout) for a UIElement. After the invalidation, the UIElement will have its layout updated, which will occur asynchronously. (다음에서 상속됨 UIElement)
InvalidateMeasure Invalidates the measurement state (layout) for a UIElement. (다음에서 상속됨 UIElement)
IsItemItsOwnContainerOverride Determines whether the specified item is (or is eligible to be) its own container. (다음에서 상속됨 ItemsControl)
ItemFromContainer Returns the item that corresponds to the specified, generated container. (다음에서 상속됨 ItemsControl)
LoadMoreItemsAsync Initiates the asynchronous request to load more data items, in accordance with the active incremental loading settings. (다음에서 상속됨 ListViewBase)
MakeVisible Forces content in the view to scroll until the item that's specified by SemanticZoomLocation is visible. Also focuses the item if it finds the item. (다음에서 상속됨 ListViewBase)
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. (다음에서 상속됨 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. (다음에서 상속됨 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. (다음에서 상속됨 FrameworkElement)
OnCreateAutomationPeer When implemented in a derived class, returns class-specific AutomationPeer implementations for the Microsoft UI Automation infrastructure. (다음에서 상속됨 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. (다음에서 상속됨 UIElement)
OnDoubleTapped Called before the DoubleTapped event occurs. (다음에서 상속됨 Control)
OnDragEnter Called before the DragEnter event occurs. (다음에서 상속됨 Control)
OnDragLeave Called before the DragLeave event occurs. (다음에서 상속됨 Control)
OnDragOver Called before the DragOver event occurs. (다음에서 상속됨 Control)
OnDrop Called before the Drop event occurs. (다음에서 상속됨 Control)
OnGotFocus Called before the GotFocus event occurs. (다음에서 상속됨 Control)
OnGroupStyleSelectorChanged Invoked when the value of the GroupStyleSelector property changes. (다음에서 상속됨 ItemsControl)
OnHolding Called before the Holding event occurs. (다음에서 상속됨 Control)
OnItemContainerStyleChanged Invoked when the value of the ItemContainerStyle property changes. (다음에서 상속됨 ItemsControl)
OnItemContainerStyleSelectorChanged Invoked when the value of the ItemContainerStyleSelector property changes. (다음에서 상속됨 ItemsControl)
OnItemsChanged Invoked when the value of the Items property changes. (다음에서 상속됨 ItemsControl)
OnItemTemplateChanged Invoked when the value of the ItemTemplate property changes. (다음에서 상속됨 ItemsControl)
OnItemTemplateSelectorChanged Invoked when the value of the ItemTemplateSelector property changes. (다음에서 상속됨 ItemsControl)
OnKeyDown Called before the KeyDown event occurs. (다음에서 상속됨 Control)
OnKeyUp Called before the KeyUp event occurs. (다음에서 상속됨 Control)
OnLostFocus Called before the LostFocus event occurs. (다음에서 상속됨 Control)
OnManipulationCompleted Called before the ManipulationCompleted event occurs. (다음에서 상속됨 Control)
OnManipulationDelta Called before the ManipulationDelta event occurs. (다음에서 상속됨 Control)
OnManipulationInertiaStarting Called before the ManipulationInertiaStarting event occurs. (다음에서 상속됨 Control)
OnManipulationStarted Called before the ManipulationStarted event occurs. (다음에서 상속됨 Control)
OnManipulationStarting Called before the ManipulationStarting event occurs. (다음에서 상속됨 Control)
OnPointerCanceled Called before the PointerCanceled event occurs. (다음에서 상속됨 Control)
OnPointerCaptureLost Called before the PointerCaptureLost event occurs. (다음에서 상속됨 Control)
OnPointerEntered Called before the PointerEntered event occurs. (다음에서 상속됨 Control)
OnPointerExited Called before the PointerExited event occurs. (다음에서 상속됨 Control)
OnPointerMoved Called before the PointerMoved event occurs. (다음에서 상속됨 Control)
OnPointerPressed Called before the PointerPressed event occurs. (다음에서 상속됨 Control)
OnPointerReleased Called before the PointerReleased event occurs. (다음에서 상속됨 Control)
OnPointerWheelChanged Called before the PointerWheelChanged event occurs. (다음에서 상속됨 Control)
OnRightTapped Called before the RightTapped event occurs. (다음에서 상속됨 Control)
OnTapped Called before the Tapped event occurs. (다음에서 상속됨 Control)
PrepareContainerForItemOverride Prepares the specified element to display the specified item. (다음에서 상속됨 ItemsControl)
ReadLocalValue Returns the local value of a dependency property, if a local value is set. (다음에서 상속됨 DependencyObject)
ReleasePointerCapture Releases pointer captures for capture of one specific pointer by this UIElement. (다음에서 상속됨 UIElement)
ReleasePointerCaptures Releases all pointer captures held by this element. (다음에서 상속됨 UIElement)
RemoveHandler Removes the specified routed event handler from this UIElement. Typically the handler in question was added by AddHandler. (다음에서 상속됨 UIElement)
ScrollIntoView(Object) Scrolls the list to bring the specified data item into view. (다음에서 상속됨 ListViewBase)
ScrollIntoView(Object, ScrollIntoViewAlignment) Scrolls the list to bring the specified data item into view with the specified alignment. (다음에서 상속됨 ListViewBase)
SelectAll Selects all the items in a view. (다음에서 상속됨 ListViewBase)
SetBinding Attaches a binding to a FrameworkElement, using the provided binding object. (다음에서 상속됨 FrameworkElement)
SetDesiredContainerUpdateDuration Sets the maximum target time between two render passes when a ListViewBase is updating its UI with data items during initial load or scrolling. (다음에서 상속됨 ListViewBase)
SetValue Sets the local value of a dependency property on a DependencyObject. (다음에서 상속됨 DependencyObject)
StartViewChangeFrom Initializes item-wise operations that are related to a view change when the ListViewBase instance is the source view and the pending destination view is a potentially different implementing view. (다음에서 상속됨 ListViewBase)
StartViewChangeTo Initializes item-wise operations that are related to a view change when the source view is a different view and the pending destination view is the ListViewBase instance. (다음에서 상속됨 ListViewBase)
TransformToVisual Returns a transform object that can be used to transform coordinates from the UIElement to the specified object. (다음에서 상속됨 UIElement)
UpdateLayout Ensures that all positions of child objects of a UIElement are properly updated for layout. (다음에서 상속됨 UIElement)

 

속성

ListView클래스 - 이러한 속성이 있습니다.

속성사용 권한Description

ActualHeight

읽기 전용Gets the rendered height of a FrameworkElement. (다음에서 상속됨 FrameworkElement)

ActualWidth

읽기 전용Gets the rendered width of a FrameworkElement. (다음에서 상속됨 FrameworkElement)

AllowDrop

읽기/쓰기Gets or sets a value that determines whether this UIElement can be a drop target for purposes of drag-and-drop operations. (다음에서 상속됨 UIElement)

Background

읽기/쓰기Gets or sets a brush that provides the background of the control. (다음에서 상속됨 Control)

BaseUri

읽기 전용Gets 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. (다음에서 상속됨 FrameworkElement)

BorderBrush

읽기/쓰기Gets or sets a brush that describes the border background of a control. (다음에서 상속됨 Control)

BorderThickness

읽기/쓰기Gets or sets the border thickness of a control. (다음에서 상속됨 Control)

CacheMode

읽기/쓰기Gets or sets a value that indicates that rendered content should be cached as a composited bitmap when possible. (다음에서 상속됨 UIElement)

CanDragItems

읽기/쓰기Gets or sets a value that indicates whether items in the view can be dragged as data payload. (다음에서 상속됨 ListViewBase)

CanReorderItems

읽기/쓰기Gets or sets a value that indicates whether items in the view can be reordered through user interaction. (다음에서 상속됨 ListViewBase)

CharacterSpacing

읽기/쓰기Gets or sets the uniform spacing between characters, in units of 1/1000 of an em. (다음에서 상속됨 Control)

Clip

읽기/쓰기Gets or sets the RectangleGeometry used to define the outline of the contents of a UIElement. (다음에서 상속됨 UIElement)

CompositeMode

읽기/쓰기Gets or sets a property that declares alternate composition and blending modes for the element in its parent layout and window. This is relevant for elements that are involved in a mixed XAML / Microsoft DirectX UI. (다음에서 상속됨 UIElement)

DataContext

읽기/쓰기Gets or sets the data context for a FrameworkElement when it participates in data binding. (다음에서 상속됨 FrameworkElement)

DataFetchSize

읽기/쓰기Gets or sets the amount of data to fetch for virtualizing/prefetch operations. (다음에서 상속됨 ListViewBase)

DefaultStyleKey

읽기/쓰기Gets or sets the key that references the default style for the control. Authors of custom controls use this property to change the default for the style that their control uses. (다음에서 상속됨 Control)

DesiredSize

읽기 전용Gets the size that this UIElement computed during the measure pass of the layout process. (다음에서 상속됨 UIElement)

Dispatcher

읽기 전용Gets the CoreDispatcher that this object is associated with. (다음에서 상속됨 DependencyObject)

DisplayMemberPath

읽기/쓰기Gets or sets the name or path of the property that is displayed for each data item. (다음에서 상속됨 ItemsControl)

FlowDirection

읽기/쓰기Gets 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. (다음에서 상속됨 FrameworkElement)

FocusState

읽기 전용Gets a value that specifies whether this control has focus, and the mode by which focus was obtained. (다음에서 상속됨 Control)

FontFamily

읽기/쓰기Gets or sets the font used to display text in the control. (다음에서 상속됨 Control)

FontSize

읽기/쓰기Gets or sets the size of the text in this control. (다음에서 상속됨 Control)

FontStretch

읽기/쓰기Gets or sets the degree to which a font is condensed or expanded on the screen. (다음에서 상속됨 Control)

FontStyle

읽기/쓰기Gets or sets the style in which the text is rendered. (다음에서 상속됨 Control)

FontWeight

읽기/쓰기Gets or sets the thickness of the specified font. (다음에서 상속됨 Control)

Footer

읽기/쓰기Gets or sets the content for the list footer. (다음에서 상속됨 ListViewBase)

FooterTemplate

읽기/쓰기Gets or sets the DataTemplate used to display the content of the view footer. (다음에서 상속됨 ListViewBase)

FooterTransitions

읽기/쓰기Gets or sets the collection of Transition style elements that apply to the view footer. (다음에서 상속됨 ListViewBase)

Foreground

읽기/쓰기Gets or sets a brush that describes the foreground color. (다음에서 상속됨 Control)

GroupStyle

읽기 전용Gets a collection of GroupStyle objects that define the appearance of each level of groups. (다음에서 상속됨 ItemsControl)

GroupStyleSelector

읽기/쓰기Gets 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. (다음에서 상속됨 ItemsControl)

Header

읽기/쓰기Gets or sets the content for the list header. (다음에서 상속됨 ListViewBase)

HeaderTemplate

읽기/쓰기Gets or sets the DataTemplate used to display the content of the view header. (다음에서 상속됨 ListViewBase)

HeaderTransitions

읽기/쓰기Gets or sets the collection of Transition style elements that apply to the view header. (다음에서 상속됨 ListViewBase)

Height

읽기/쓰기Gets or sets the suggested height of a FrameworkElement. (다음에서 상속됨 FrameworkElement)

HorizontalAlignment

읽기/쓰기Gets 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. (다음에서 상속됨 FrameworkElement)

HorizontalContentAlignment

읽기/쓰기Gets or sets the horizontal alignment of the control's content. (다음에서 상속됨 Control)

IncrementalLoadingThreshold

읽기/쓰기Gets or sets the threshold range that governs when the ListViewBase class will begin to prefetch more items. (다음에서 상속됨 ListViewBase)

IncrementalLoadingTrigger

읽기/쓰기Gets or sets a value that indicates the conditions for prefetch operations by the ListViewBase class. (다음에서 상속됨 ListViewBase)

IsActiveView

읽기/쓰기Gets or sets a value that indicates whether the ListViewBase instance is the active view in its owning SemanticZoom. (다음에서 상속됨 ListViewBase)

IsDoubleTapEnabled

읽기/쓰기Gets or sets a value that determines whether the DoubleTapped event can originate from that element. (다음에서 상속됨 UIElement)

IsEnabled

읽기/쓰기Gets or sets a value indicating whether the user can interact with the control. (다음에서 상속됨 Control)

IsGrouping

읽기 전용Gets a value that indicates whether the control is using grouping. (다음에서 상속됨 ItemsControl)

IsHitTestVisible

읽기/쓰기Gets or sets whether the contained area of this UIElement can return true values for hit testing. (다음에서 상속됨 UIElement)

IsHoldingEnabled

읽기/쓰기Gets or sets a value that determines whether the Holding event can originate from that element. (다음에서 상속됨 UIElement)

IsItemClickEnabled

읽기/쓰기Gets or sets a value that indicates whether items in the view fire an ItemClick event in response to interaction. (다음에서 상속됨 ListViewBase)

IsRightTapEnabled

읽기/쓰기Gets or sets a value that determines whether the RightTapped event can originate from that element. (다음에서 상속됨 UIElement)

IsSwipeEnabled

읽기/쓰기Gets or sets a value that indicates whether the view supports discrete input processing for a swipe interaction. (다음에서 상속됨 ListViewBase)

IsSynchronizedWithCurrentItem

읽기/쓰기Gets or sets a value that indicates whether a Selector should keep the SelectedItem synchronized with the current item in the Items property. (다음에서 상속됨 Selector)

IsTabStop

읽기/쓰기Gets or sets a value that indicates whether a control is included in tab navigation. (다음에서 상속됨 Control)

IsTapEnabled

읽기/쓰기Gets or sets a value that determines whether the Tapped event can originate from that element. (다음에서 상속됨 UIElement)

IsZoomedInView

읽기/쓰기Gets or sets a value that indicates whether the ListViewBase instance is the zoomed-in view in its owning SemanticZoom. (다음에서 상속됨 ListViewBase)

ItemContainerGenerator

읽기 전용Gets the ItemContainerGenerator associated with this ItemsControl. (다음에서 상속됨 ItemsControl)

ItemContainerStyle

읽기/쓰기Gets or sets the style that is used when rendering the item containers. (다음에서 상속됨 ItemsControl)

ItemContainerStyleSelector

읽기/쓰기Gets 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. (다음에서 상속됨 ItemsControl)

ItemContainerTransitions

읽기/쓰기Gets or sets the collection of Transition style elements that apply to the item containers of an ItemsControl. (다음에서 상속됨 ItemsControl)

Items

읽기 전용Gets the collection used to generate the content of the control. (다음에서 상속됨 ItemsControl)

ItemsPanel

읽기/쓰기Gets or sets the template that defines the panel that controls the layout of items. (다음에서 상속됨 ItemsControl)

ItemsPanelRoot

읽기 전용Gets the Panel specified by ItemsPanel. (다음에서 상속됨 ItemsControl)

ItemsSource

읽기/쓰기Gets or sets an object source used to generate the content of the ItemsControl. (다음에서 상속됨 ItemsControl)

ItemTemplate

읽기/쓰기Gets or sets the DataTemplate used to display each item. (다음에서 상속됨 ItemsControl)

ItemTemplateSelector

읽기/쓰기Gets or sets a reference to a custom DataTemplateSelector logic class. The DataTemplateSelector referenced by this property returns a template to apply to items. (다음에서 상속됨 ItemsControl)

Language

읽기/쓰기Gets 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. (다음에서 상속됨 FrameworkElement)

ManipulationMode

읽기/쓰기Gets or sets the ManipulationModes value used for UIElement behavior and interaction with gestures. Setting this value enables handling the manipulation events from this element in app code. (다음에서 상속됨 UIElement)

Margin

읽기/쓰기Gets or sets the outer margin of a FrameworkElement. (다음에서 상속됨 FrameworkElement)

MaxHeight

읽기/쓰기Gets or sets the maximum height constraint of a FrameworkElement. (다음에서 상속됨 FrameworkElement)

MaxWidth

읽기/쓰기Gets or sets the maximum width constraint of a FrameworkElement. (다음에서 상속됨 FrameworkElement)

MinHeight

읽기/쓰기Gets or sets the minimum height constraint of a FrameworkElement. (다음에서 상속됨 FrameworkElement)

MinWidth

읽기/쓰기Gets or sets the minimum width constraint of a FrameworkElement. (다음에서 상속됨 FrameworkElement)

Name

읽기/쓰기Gets 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. (다음에서 상속됨 FrameworkElement)

Opacity

읽기/쓰기Gets or sets the degree of the object's opacity. (다음에서 상속됨 UIElement)

Padding

읽기/쓰기Gets or sets the padding inside a control. (다음에서 상속됨 Control)

Parent

읽기 전용Gets the parent object of this FrameworkElement in the object tree. (다음에서 상속됨 FrameworkElement)

PointerCaptures

읽기 전용Gets the set of all captured pointers, represented as Pointer values. (다음에서 상속됨 UIElement)

Projection

읽기/쓰기Gets or sets the perspective projection (3-D effect) to apply when rendering this element. (다음에서 상속됨 UIElement)

RenderSize

읽기 전용Gets the final render size of a UIElement. (다음에서 상속됨 UIElement)

RenderTransform

읽기/쓰기Gets or sets transform information that affects the rendering position of a UIElement. (다음에서 상속됨 UIElement)

RenderTransformOrigin

읽기/쓰기Gets or sets the origin point of any possible render transform declared by RenderTransform, relative to the bounds of the UIElement. (다음에서 상속됨 UIElement)

RequestedTheme

읽기/쓰기Gets or sets the UI theme that is used by the UIElement (and its child elements) for resource determination. The UI theme you specify with RequestedTheme can override the app-level RequestedTheme. (다음에서 상속됨 FrameworkElement)

Resources

읽기/쓰기Gets 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. (다음에서 상속됨 FrameworkElement)

SelectedIndex

읽기/쓰기Gets or sets the index of the selected item. (다음에서 상속됨 Selector)

SelectedItem

읽기/쓰기Gets or sets the selected item. (다음에서 상속됨 Selector)

SelectedItems

읽기 전용Gets the currently selected items. (다음에서 상속됨 ListViewBase)

SelectedValue

읽기/쓰기Gets or sets the value of the selected item, obtained by using the SelectedValuePath. (다음에서 상속됨 Selector)

SelectedValuePath

읽기/쓰기Gets or sets the property path that is used to get the SelectedValue property of the SelectedItem property. (다음에서 상속됨 Selector)

SelectionMode

읽기/쓰기Gets or sets the selection behavior for a ListViewBase instance. (다음에서 상속됨 ListViewBase)

SemanticZoomOwner

읽기/쓰기Gets or sets the SemanticZoom instance that hosts the ListViewBase. (다음에서 상속됨 ListViewBase)

ShowsScrollingPlaceholders

읽기/쓰기Gets or sets a value that indicates whether the view shows placeholder UI for items during scrolling. (다음에서 상속됨 ListViewBase)

Style

읽기/쓰기Gets or sets an instance Style that is applied for this object during layout and rendering. (다음에서 상속됨 FrameworkElement)

TabIndex

읽기/쓰기Gets or sets a value that determines the order in which elements receive focus when the user navigates through controls by pressing the Tab key. (다음에서 상속됨 Control)

TabNavigation

읽기/쓰기Gets or sets a value that modifies how tabbing and TabIndex work for this control. (다음에서 상속됨 Control)

Tag

읽기/쓰기Gets or sets an arbitrary object value that can be used to store custom information about this object. (다음에서 상속됨 FrameworkElement)

Template

읽기/쓰기Gets or sets a control template. The control template defines the visual appearance of a control in UI, and is defined in XAML markup. (다음에서 상속됨 Control)

Transitions

읽기/쓰기Gets or sets the collection of Transition style elements that apply to a UIElement. (다음에서 상속됨 UIElement)

Triggers

읽기 전용Gets the collection of triggers for animations that are defined for a FrameworkElement. Not commonly used. (다음에서 상속됨 FrameworkElement)

UseLayoutRounding

읽기/쓰기Gets 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. (다음에서 상속됨 UIElement)

VerticalAlignment

읽기/쓰기Gets 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. (다음에서 상속됨 FrameworkElement)

VerticalContentAlignment

읽기/쓰기Gets or sets the vertical alignment of the control's content. (다음에서 상속됨 Control)

Visibility

읽기/쓰기Gets 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. (다음에서 상속됨 UIElement)

Width

읽기/쓰기Gets or sets the width of a FrameworkElement. (다음에서 상속됨 FrameworkElement)

 

설명

ListView를 사용하여 세로로 스크롤하는 데이터의 컬렉션을 표시합니다. 가로 방향으로 스크롤하는 컬렉션을 표시하려면 GridView를 사용합니다.

ListViewItemsControl이므로 모든 종류의 항목의 컬렉션을 포함할 수 있습니다. 뷰를 채우려면 Items 컬렉션에 항목을 추가하거나 ItemsSource 속성을 데이터 소스로 설정합니다.

기본적으로 데이터 항목은 해당 데이터 항목이 바인딩된 데이터 개체의 문자열 표현으로 ListView에서 표시됩니다. ListView의 항목이 표시되는 방법을 정확하게 지정하려면 DataTemplate을 만들어 개별 항목을 표시하는 데 사용되는 컨트롤의 레이아웃을 정의합니다. 레이아웃의 컨트롤이 데이터 개체의 속성에 바인딩되거나 콘텐츠가 인라인으로 정의되었을 수 있습니다. DataTemplateListViewItemTemplate 속성에 할당합니다. 앱에 사용할 수 있는 공통 템플릿에 대해서는 목록 레이아웃의 항목 템플릿을 참조하십시오.

참고  

ItemsSource 속성을 설정하여 ListView를 채울 경우 모든 항목에 ItemTemplate이 적용됩니다. Items 컬렉션을 직접 채울 경우 항목이 ListViewItem이 아닐 경우에만 ItemTemplate이 적용됩니다. 자세한 내용은 예제를 참조하십시오.

기본적으로 사용자는 ListView에서 단일 항목을 선택할 수 있습니다. SelectionMode 속성을 ListViewSelectionMode 열거형 값으로 설정하여 다중 선택을 허용하거나 선택을 사용하지 않도록 할 수 있습니다. 항목이 선택되는 대신 단추처럼 사용자 클릭에 응답하도록 ListView 상호 작용 모드를 변경할 수도 있습니다.

이 표에서는 ListView와 사용자의 상호 작용 방식과 이러한 상호 작용에 응답하는 방법을 보여 줍니다.

이 상호 작용을 활성화하려면:다음 설정을 사용합니다.이 이벤트를 처리합니다.이 속성을 사용하여 선택한 항목을 가져옵니다.
상호 작용 없음 SelectionMode = None, IsItemClickEnabled = FalseN/AN/A
단일 선택 SelectionMode = Single, IsItemClickEnabled = False SelectionChanged SelectedItem, SelectedIndex
연속 다중 선택 SelectionMode = Multiple, IsItemClickEnabled = False SelectionChanged SelectedItems
비연속 다중 선택 SelectionMode = Extended, IsItemClickEnabled = False SelectionChanged SelectedItems
클릭 대상 SelectionMode = None, IsItemClickEnabled = True ItemClick N/A

 

주의   PointerWheelChanged 이벤트는 ListView에서 버블링되지 않습니다. 즉, 내부에 ListView가 있는 컨트롤은 포인터가 ListView 위에 있는 경우 마우스 휠 변경 메시지를 받지 못합니다. 예를 들어 ListViewScrollViewer 안에 넣는 경우 포인터가 ListView 위에 있을 때 마우스 휠로 ScrollViewer를 스크롤할 수 없습니다.

ListView는 대용량 데이터 집합에서 성능을 향상시키기 위해 데이터 가상화를 지원합니다. 임의 액세스 가상화는 데이터 소스에서 IObservableVector 또는 INotifyCollectionChanged 인터페이스를 구현할 때 지원됩니다. 증분 로드 가상화는 데이터 소스에서 ISupportIncrementalLoading 인터페이스를 구현할 때 지원됩니다. 증분 로드가 지원되는 경우 DataFetchSize, IncrementalLoadingThreshold, IncrementalLoadingTrigger, LoadMoreItemsAsync 멤버를 사용하여 데이터 로드를 제어할 수 있습니다.

Windows 8:  Windows 8에서는 선택한 ListViewItem의 데이터 항목을 바꾸어도 SelectedIndex 값이 지워지지 않습니다. Windows 8.1에서 SelectedIndex 값은 지워집니다.

ListViewISemanticZoomInformation 인터페이스를 구현하므로 SemanticZoom 컨트롤의 뷰로 사용할 수 있습니다. SemanticZoom 컨트롤에서 사용되는 경우 ScrollViewer.IsVerticalScrollChainingEnabled 연결된 속성을 ListView의 컨트롤 템플릿에 있는 ScrollViewer에서 항상 false로 설정합니다(예: <ListView ScrollViewer.IsVerticalScrollChainingEnabled="False">). 이러한 멤버는 ListViewIsActiveView, IsZoomedInView, SemanticZoomOwner, CompleteViewChange, CompleteViewChangeFrom, CompleteViewChangeTo, InitializeViewChange, MakeVisible, StartViewChangeFrom, StartViewChangeTo 등의 SemanticZoom 컨트롤에서 호스팅될 때만 유효합니다.

자세한 내용은 다음 항목을 참조하십시오.

ListView 컨트롤을 보여 주는 추가 코드 예제를 보려면 다음 샘플을 참조하십시오.

선택 동작 및 CollectionViewSource

Selector에서 파생되는 목록 컨트롤에는 항목 소스(ItemsSource에 사용되는 형식)에 따라 달라지는 기본 선택 동작이 있습니다. 항목 소스가 CollectionViewSource 인스턴스인 경우 선택 컨트롤의 동작은 선택이 기본적으로 현재 항목으로 설정되는 것입니다. 처음 목록을 표시하면 기본적으로 첫 번째 항목이 현재 항목으로 선택됩니다. 이 경우 첫 번째 항목을 선택하지 않으려면 ListView에서 IsSynchronizedWithCurrentItemfalse로 설정합니다.

예제

이 예제에서는 ListViewItemTemplate이 인라인으로 정의됩니다. ItemsSource가 설정되어 있으므로 모든 항목에 ItemTemplate이 적용됩니다.


<ListView x:Name="itemListView"
          Margin="120,0,0,60"
          ItemsSource="{Binding Source={StaticResource itemsViewSource}}"
          SelectionChanged="ItemListView_SelectionChanged">
    <ListView.ItemTemplate>
        <DataTemplate>
            <Grid Height="110" Margin="6">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}" Width="110" Height="110">
                    <Image Source="{Binding Image}" Stretch="UniformToFill"/>
                </Border>
                <StackPanel Grid.Column="1" VerticalAlignment="Top" Margin="10,0,0,0">
                    <TextBlock Text="{Binding Title}" Style="{StaticResource TitleTextStyle}" TextWrapping="NoWrap"/>
                    <TextBlock Text="{Binding Subtitle}" Style="{StaticResource CaptionTextStyle}" TextWrapping="NoWrap"/>
                    <TextBlock Text="{Binding Description}" Style="{StaticResource BodyTextStyle}" MaxHeight="60"/>
                </StackPanel>
            </Grid>
        </DataTemplate>
    </ListView.ItemTemplate>          
</ListView>


ListView에서 ItemTemplate은 두 번째 항목(ListViewItem)이 아니라 첫 번째 항목(문자열)에 적용됩니다. 자세한 내용은 설명 부분을 참조하십시오.


<ListView>
    <ListView.ItemTemplate>
        <DataTemplate>
            <Grid>
                <Border Background="LightGray" Height="200" Width="200">
                    <TextBlock Text="{Binding}" 
                               FontSize="48" Foreground="Green" />
                </Border>
            </Grid>
        </DataTemplate>
    </ListView.ItemTemplate>
    <ListView.Items>
        <x:String>One</x:String>
        <ListViewItem>Two</ListViewItem>
    </ListView.Items>
</ListView>

요구 사항

지원되는 최소 클라이언트

Windows 8 [Windows 스토어 앱만]

지원되는 최소 서버

Windows Server 2012 [Windows 스토어 앱만]

Namespace

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

Metadata

Windows.winmd

참고 항목

ListViewBase
ISemanticZoomInformation

 

 

표시:
© 2016 Microsoft