GridView 類別

定義

表示在數據列和數據行中顯示數據項的控制件。

/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.UI.Xaml.WinUIContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class GridView : ListViewBase
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.UI.Xaml.WinUIContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public class GridView : ListViewBase
Public Class GridView
Inherits ListViewBase
<GridView .../>
-or-
<GridView ...>
  oneOrMoreItems
</GridView>
繼承
屬性

範例

提示

如需詳細資訊、設計指引和程式碼範例,請參閱 清單檢視和方格檢視

WinUI 3 資源庫應用程式包含大部分 WinUI 3 控制件、特性和功能的互動式範例。 從 Microsoft Store 取得應用程式,或在 GitHub 上取得原始程式碼。

在這裡,GridView 會系結至名為 的cvsProjects群組 CollectionViewSource。 每個群組中個別項目的外觀是由 ItemTemplate 所定義。 ItemsPanel 會指定如何在 GridView 中排列群組。 GroupStyle.Panel 會指定每個群組內的個別項目排列方式。 GroupStyle.ContainerStyle 可用來在每個群組周圍新增框線,並設定其最小大小和邊界。 HidesIfEmpty 屬性設定為 true,以隱藏任何空白群組。

<Page
    x:Class="GroupedGridViewApp.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:GroupedGridViewApp"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
    <Page.Resources>
        <CollectionViewSource x:Name="cvsProjects" IsSourceGrouped="True" 
                              ItemsPath="Activities"/>
    </Page.Resources>

    <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
        <GridView ItemsSource="{Binding Source={StaticResource cvsProjects}}" MaxHeight="500">
            <GridView.ItemTemplate>
                <DataTemplate>
                    <StackPanel Margin="20">
                        <TextBlock Text="{Binding Name}" FontWeight="Bold" 
                                   Style="{StaticResource BaseTextBlockStyle}"/>
                        <TextBlock Text="{Binding DueDate}" TextWrapping="NoWrap" 
                                   Style="{StaticResource BodyTextBlockStyle}" />
                        <CheckBox Content="Complete" IsChecked="{Binding Complete}" 
                                  IsEnabled="False"/>
                    </StackPanel>
                </DataTemplate>
            </GridView.ItemTemplate>
            <GridView.ItemsPanel>
                <ItemsPanelTemplate>
                    <ItemsWrapGrid MaximumRowsOrColumns="3"/>
                </ItemsPanelTemplate>
            </GridView.ItemsPanel>

            <GridView.GroupStyle>
                <GroupStyle HidesIfEmpty="True">
                    <GroupStyle.HeaderTemplate>
                        <DataTemplate>
                            <Grid Background="LightGray" Margin="0">
                                <TextBlock Text='{Binding Name}' 
                                           Foreground="Black" Margin="12"
                                           Style="{StaticResource HeaderTextBlockStyle}"/>
                            </Grid>
                        </DataTemplate>
                    </GroupStyle.HeaderTemplate>
                </GroupStyle>
            </GridView.GroupStyle>
        </GridView>
</Page>
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using Windows.UI.Xaml.Controls;

namespace GroupedGridViewApp
{
    public sealed partial class MainPage : Page
    {
        DateTime startDate = DateTime.Now;

        public MainPage()
        {
            this.InitializeComponent();

            PopulateProjects();
        }

        private void PopulateProjects()
        {
            List<Project> Projects = new List<Project>();

            Project newProject = new Project();
            newProject.Name = "Project 1";
            newProject.Activities.Add(new Activity()
            { Name = "Activity 1", Complete = true, DueDate = startDate.AddDays(4) });
            newProject.Activities.Add(new Activity()
            { Name = "Activity 2", Complete = true, DueDate = startDate.AddDays(5) });
            Projects.Add(newProject);

            newProject = new Project();
            newProject.Name = "Project 2";
            newProject.Activities.Add(new Activity()
            { Name = "Activity A", Complete = true, DueDate = startDate.AddDays(2) });
            newProject.Activities.Add(new Activity()
            { Name = "Activity B", Complete = false, DueDate = startDate.AddDays(3) });
            Projects.Add(newProject);

            newProject = new Project();
            newProject.Name = "Project 3";
            Projects.Add(newProject);

            cvsProjects.Source = Projects;
        }
    }

    public class Project
    {
        public Project()
        {
            Activities = new ObservableCollection<Activity>();
        }

        public string Name { get; set; }
        public ObservableCollection<Activity> Activities { get; private set; }
    }

    public class Activity
    {
        public string Name { get; set; }
        public DateTime DueDate { get; set; }
        public bool Complete { get; set; }
        public string Project { get; set; }
    }
}

備註

提示

如需詳細資訊、設計指引和程式碼範例,請參閱 清單檢視和方格檢視

使用 GridView 在可以垂直捲動的數據列和數據行中顯示專案集合。 資料會以水平方向進行堆疊,直到它填滿該欄為止,然後繼續進行下一列。 這常用於需要以豐富視覺效果顯示每個項目時,例如影像中心這類每個項目需要更多空間的情況。

網格線檢視控件

GridView 是 ItemsControl,因此它可以包含任何類型的專案集合。 若要填入檢視,請新增項目至 Items 集合,或將 ItemsSource 屬性設定至資料來源。

根據預設,數據項會顯示在 GridView 中,做為其系結之數據物件的字串表示。 若要確切指定 GridView 中的項目顯示方式,您可以建立 DataTemplate 來定義用來顯示個別專案的控制項設定。 配置中的控制項可以繫結至資料物件的屬性,或以內嵌方式定義內容。 您會將 DataTemplate 指派給 GridView 的 ItemTemplate 屬性。 如需您可以在應用程式中使用的常見範本,請參閱 GridView 的項目範本

如果您藉由設定 ItemsSource 屬性來填入 GridView,則會將 ItemTemplate 套用至每個專案。 如果您直接填入 Items 集合,則只有在專案不是 GridViewItem 時,才會套用 ItemTemplate。 在此範例中,範本會套用至第一個專案,但不會套用至第二個專案。

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

如果您使用 GridView 來顯示大型數據集,請參閱 將 ListView 和 GridView 優化 ,以取得維持順暢且回應式用戶體驗的秘訣。

注意

根據預設,主動式畫筆會捲動/移動瀏覽清單, (例如觸控、觸控板和被動手寫筆) 。 如果您的 app 應該使用使用中的畫筆進行文字選取,您可以覆寫畫筆卷動行為。 如需詳細資訊,請參閱 ScrollViewer 類別參考的 Pen 互動一節。

根據預設,用戶可以在 GridView 中選取單一專案。 您可以將 SelectionMode 屬性設定為 ListViewSelectionMode 列舉值,以允許多重選取或停用選取。 您也可以變更 GridView 互動模式,讓專案回應使用者按兩下,例如按鈕,而不是被選取。

下表顯示使用者可以與 GridView 互動的方式,以及如何響應互動。

若要啟用此互動︰ 使用這些設定: 處理這個事件︰ 使用此屬性來取得選取的項目:
沒有互動 SelectionMode = NoneIsItemClickEnabled = False 不適用 不適用
單一選取 SelectionMode = SingleIsItemClickEnabled = False SelectionChanged \(英文\) SelectedItemSelectedIndex
連續多重選取 SelectionMode = MultipleIsItemClickEnabled = False SelectionChanged \(英文\) SelectedItems \(英文\)
非連續多重選取 SelectionMode = ExtendedIsItemClickEnabled = False SelectionChanged \(英文\) SelectedItems \(英文\)
按一下 SelectionMode = NoneIsItemClickEnabled = True ItemClick \(英文\) N/A

注意

PointerWheelChanged 事件不會從 GridView 反升。 這表示如果指標位於 GridView 上方,則其內有 GridView 的控件不會收到滑鼠滾輪變更訊息。 例如,如果您將 GridView 放在 ScrollViewer 內,當指標位於 GridView 上方時,就無法使用滑鼠滾輪捲 動 ScrollViewer

注意

當您在 GridView 控件上設定 Padding 屬性時,會忽略 填補的值;只會套用左、上和下邊框間距的值。

GridView 支援數據虛擬化,以改善大型數據集的效能。 當數據源實作適當的介面時,支援隨機存取虛擬化,視程式設計語言而有所不同:

Windows 8 在 Windows 8 中,當選取的 GridViewItem 中的數據項被取代時,不會清除 SelectedIndex 值。 在 Windows 8.1 或更新版本中,會清除 SelectedIndex 值。

GridView 會實作 ISemanticZoomInformation 介面,因此它可以當做 SemanticZoom 控制件中的檢視使用。 在 SemanticZoom 控制項中使用時,請一律在 GridView 控件範本中的 ScrollViewer 上,將 ScrollViewer.IsHorizontalScrollChainingEnabled 附加屬性設定為 false,如下所示:<GridView ScrollViewer.IsHorizontalScrollChainingEnabled="False">。 只有在 GridView 裝載於 SemanticZoom 控件時,這些成員才會生效: IsActiveViewIsZoomedInViewSemanticZoomOwnerCompleteViewChangeCompleteViewChangeFromCompleteViewChangeToInitializeViewChangeMakeVisibleStartViewChangeFromStartViewChangeTo

GridView 的預設範本包含現有的轉換動畫。 具體而言,預設 ItemContainerTransitions 值已經包含 AddDeleteThemeTransitionContentThemeTransitionReorderThemeTransitionEntranceThemeTransition (與 IsStaggeringEnabled="False") 的值。 如果您要在 GridView 上設定 ItemContainerTransitions 的新值,請考慮重現這些與起點相同的主題動畫。 如果您要自行設定屬性,除非您在定義中再次包含這些預設值,否則會覆寫這些預設值。

如果您需要在可捲動檢視中處理 UIElement 的指標事件 (,例如 ScrollViewer) ,您必須呼叫 UIElement.CancelDirectmanipulation () 明確停用檢視中元素的操作事件支援。 若要重新啟用檢視中的操作事件,請呼叫 UIElement.TryStartDirectManipulation

選取行為和 CollectionViewSource

衍生自 Selector 的清單控制項具有預設選取行為,取決於專案來源 (ItemsSource) 所使用的類型。 如果專案來源是 CollectionViewSource 實例,則選取控件的行為是選取範圍預設為目前專案。 第一次顯示清單時,選取範圍預設為第一個專案做為目前專案。 如果您不想在此案例中選取第一個專案,請在 GridView 中將 IsSynchronizedWithCurrentItem 設定為 false

建構函式

GridView()

初始化 GridView 類別的新實例。

屬性

AccessKey

取得或設定這個專案的訪問鍵 (助記鍵) 。

(繼承來源 UIElement)
AccessKeyScopeOwner

取得或設定來源項目,這個元素會提供這個專案的存取索引鍵範圍,即使它不在來源專案的可視化樹狀結構中也一樣。

(繼承來源 UIElement)
ActualHeight

取得 FrameworkElement 的呈現高度。 請參閱<備註>。

(繼承來源 FrameworkElement)
ActualOffset

取得這個 UIElement 的位置,相對於其父系,在配置程式的排列階段期間計算。

(繼承來源 UIElement)
ActualSize

取得這個UIElement在配置程式的排列階段期間計算的大小。

(繼承來源 UIElement)
ActualTheme

取得元素目前使用的UI主題,其可能與 RequestedTheme不同。

(繼承來源 FrameworkElement)
ActualWidth

取得 FrameworkElement 的呈現寬度。 請參閱<備註>。

(繼承來源 FrameworkElement)
AllowDrop

取得或設定值,這個值會判斷這個 UIElement 是否可以是拖放作業的置放目標。

(繼承來源 UIElement)
AllowFocusOnInteraction

取得或設定值,這個值表示當使用者與其互動時,專案是否會自動取得焦點。

(繼承來源 FrameworkElement)
AllowFocusWhenDisabled

取得或設定停用的控制項是否可以接收焦點。

(繼承來源 FrameworkElement)
Background

取得或設定提供控件背景的筆刷。

(繼承來源 Control)
BackgroundSizing

取得或設定值,這個值表示背景相對於這個專案框線的延伸程度。

(繼承來源 Control)
BaseUri

取得統一資源標識碼 (URI) ,表示 XAML 載入時 XAML 建構物件的基底 URI。 這個屬性適用於運行時間的 URI 解析。

(繼承來源 FrameworkElement)
BorderBrush

取得或設定描述控制件框線填滿的筆刷。

(繼承來源 Control)
BorderThickness

取得或設定控制項的框線粗細。

(繼承來源 Control)
CacheMode

取得或設定值,這個值表示轉譯的內容應該盡可能快取為複合位圖。

(繼承來源 UIElement)
CanBeScrollAnchor

取得或設定值,這個值表示 UIElement 是否可以是捲動錨定候選專案。

(繼承來源 UIElement)
CanDrag

取得或設定值,這個值表示是否可以將專案拖曳為拖放作業中的數據。

(繼承來源 UIElement)
CanDragItems

取得或設定值,這個值表示檢視中的專案是否可以拖曳為數據承載。

(繼承來源 ListViewBase)
CanReorderItems

取得或設定值,這個值表示檢視中的專案是否可以透過用戶互動重新排序。

(繼承來源 ListViewBase)
CenterPoint

取得或設定專案的中心點,這是發生旋轉或縮放的點。 影響項目的轉譯位置。

(繼承來源 UIElement)
CharacterSpacing

取得或設定字元之間的統一間距,單位為 em 的 1/1000。

(繼承來源 Control)
Clip

取得或設定用來定義UIElement內容的大綱的 RectangleGeometry

(繼承來源 UIElement)
CompositeMode

取得或設定屬性,這個屬性會宣告其父版面配置和視窗中專案的替代組合和混合模式。 這與混合 XAML/Microsoft DirectX UI 相關的元素相關。

(繼承來源 UIElement)
ContextFlyout

取得或設定與這個項目相關聯的飛出視窗。

(繼承來源 UIElement)
CornerRadius

取得或設定控件框線角落的半徑。

(繼承來源 Control)
DataContext

取得或設定 FrameworkElement 的數據內容。 數據內容的常見用法是 FrameworkElement 當 使用 {Binding} 標記延伸並參與數據系結時。

(繼承來源 FrameworkElement)
DataFetchSize

取得或設定要擷取以進行虛擬化/預先擷取作業的數據量。

(繼承來源 ListViewBase)
DefaultStyleKey

取得或設定參考控件預設樣式的索引鍵。 自定義控件的作者會使用此屬性來變更其控件所使用的樣式預設值。

(繼承來源 Control)
DefaultStyleResourceUri

取得或設定資源文件的路徑,其中包含控件的默認樣式。

(繼承來源 Control)
DesiredSize

取得這個 UIElement 在版面配置程式的量值階段期間計算的大小。

(繼承來源 UIElement)
Dispatcher

一律會在 Windows 應用程式 SDK 應用程式中傳null回 。 請改用 DispatcherQueue

(繼承來源 DependencyObject)
DispatcherQueue

DispatcherQueue取得與這個 物件相關聯的 。 DispatcherQueue表示即使程式代碼是由非UI線程起始,也可以存取 DependencyObject UI線程上的設備。

(繼承來源 DependencyObject)
DisplayMemberPath

取得或設定每個數據項所顯示之屬性的名稱或路徑。

(繼承來源 ItemsControl)
ElementSoundMode

取得或設定值,指定是否播放音效的控件喜好設定。

(繼承來源 Control)
ExitDisplayModeOnAccessKeyInvoked

取得或設定值,指定叫用存取金鑰時是否關閉存取金鑰顯示。

(繼承來源 UIElement)
FlowDirection

取得或設定文字和其他UI元素在控制其版面配置的任何父元素內流動的方向。 這個屬性可以設定為 LeftToRightRightToLeftRightToLeft在任何元素上將 設定FlowDirection為 ,會將對齊方式設定為從右至左、從右至左的閱讀順序,以及控件的版面配置從右至左流動。

(繼承來源 FrameworkElement)
FocusState

取得值,指定這個控件是否有焦點,以及取得焦點的模式。

(繼承來源 UIElement)
FocusVisualMargin

取得或設定 FrameworkElement 焦點視覺效果的外部邊界。

(繼承來源 FrameworkElement)
FocusVisualPrimaryBrush

取得或設定筆刷,用來繪製 FrameworkElement 之 或 Reveal 焦點視覺效果的外部HighVisibility框線。

(繼承來源 FrameworkElement)
FocusVisualPrimaryThickness

取得或設定 FrameworkElement 之或Reveal焦點視覺效果的外部框線HighVisibility粗細。

(繼承來源 FrameworkElement)
FocusVisualSecondaryBrush

取得或設定筆刷,用來繪製 FrameworkElement 之 或 Reveal 焦點視覺效果的內部框HighVisibility線。

(繼承來源 FrameworkElement)
FocusVisualSecondaryThickness

取得或設定 FrameworkElement 之或Reveal焦點視覺效果的內部框線HighVisibility粗細。

(繼承來源 FrameworkElement)
FontFamily

取得或設定顯示控制項的文字所用的字型。

(繼承來源 Control)
FontSize

取得或設定這個控制件中的文字大小。

(繼承來源 Control)
FontStretch

取得或設定螢幕上字型緊縮或加寬的程度。

(繼承來源 Control)
FontStyle

取得或設定轉譯文字的樣式。

(繼承來源 Control)
FontWeight

取得或設定指定字型的粗細。

(繼承來源 Control)
Footer

取得或設定清單頁尾的內容。

(繼承來源 ListViewBase)
FooterTemplate

取得或設定用來顯示檢視頁尾內容的 DataTemplate

(繼承來源 ListViewBase)
FooterTransitions

取得或設定套用至檢視頁尾的 Transition 樣式專案集合。

(繼承來源 ListViewBase)
Foreground

取得或設定描述前景色彩的筆刷。

(繼承來源 Control)
GroupStyle

取得 GroupStyle 物件的集合,這些物件會定義每個群組層級的外觀。

(繼承來源 ItemsControl)
GroupStyleSelector

取得或設定自定義 GroupStyleSelector 邏輯類別的參考。 GroupStyleSelector 會根據該內容的特性傳回不同的 GroupStyle 值,以用於內容。

(繼承來源 ItemsControl)
Header

取得或設定清單標頭的內容。

(繼承來源 ListViewBase)
HeaderTemplate

取得或設定用來顯示檢視標頭內容的 DataTemplate

(繼承來源 ListViewBase)
HeaderTransitions

取得或設定套用至檢視標頭的 Transition 樣式專案集合。

(繼承來源 ListViewBase)
Height

取得或設定 FrameworkElement 的建議高度。

(繼承來源 FrameworkElement)
HighContrastAdjustment

取得或設定值,這個值表示當啟用高對比度主題時,架構是否會自動調整專案的視覺屬性。

(繼承來源 UIElement)
HorizontalAlignment

取得或設定在版面配置父系中撰寫時套用至 FrameworkElement 的水準對齊特性,例如面板或專案控件。

(繼承來源 FrameworkElement)
HorizontalContentAlignment

取得或設定控制項內容的水平對齊。

(繼承來源 Control)
IncrementalLoadingThreshold

取得或設定控制 ListViewBase 類別開始預先擷取更多項目的臨界值範圍。

(繼承來源 ListViewBase)
IncrementalLoadingTrigger

取得或設定值,這個值表示 ListViewBase 類別預先擷取作業的條件。

(繼承來源 ListViewBase)
IsAccessKeyScope

取得或設定值,這個值表示專案是否定義自己的存取金鑰範圍。

(繼承來源 UIElement)
IsActiveView

取得或設定值,這個值表示 ListViewBase 實例是否為其擁有 SemanticZoom 中的使用中檢視。

(繼承來源 ListViewBase)
IsDoubleTapEnabled

取得或設定值,這個值會判斷 DoubleTapped 事件是否可以來自該專案。

(繼承來源 UIElement)
IsEnabled

取得或設定值,指出使用者是否可以與控件互動。

(繼承來源 Control)
IsFocusEngaged

取得或設定值,指出當使用者按下遊戲控制器上的 A/Select 按鈕時,焦點是否受限於控件。

(繼承來源 Control)
IsFocusEngagementEnabled

取得或設定值,指出當使用者按下遊戲控制器上的 A/Select 按鈕時,焦點是否可以限制為控件。

(繼承來源 Control)
IsGrouping

取得指出控制項是否使用群組的值。

(繼承來源 ItemsControl)
IsHitTestVisible

取得或設定這個 UIElement 的自主區域是否可以傳回真正的值來進行點擊測試。

(繼承來源 UIElement)
IsHoldingEnabled

取得或設定值,這個值會決定 Holding 事件是否可以來自該專案。

(繼承來源 UIElement)
IsItemClickEnabled

取得或設定值,這個值表示檢視中的專案是否會引發 ItemClick 事件以響應互動。

(繼承來源 ListViewBase)
IsLoaded

取得值,這個值表示專案是否已加入至專案樹狀結構,且已準備好進行互動。

(繼承來源 FrameworkElement)
IsMultiSelectCheckBoxEnabled

取得或設定值,這個值表示是否顯示複選框以啟用多重選取。

(繼承來源 ListViewBase)
IsRightTapEnabled

取得或設定值,這個值會判斷 RightTapped 事件是否可以來自該專案。

(繼承來源 UIElement)
IsSwipeEnabled

取得或設定值,這個值表示檢視是否支援 撥動 互動的離散輸入處理。

(繼承來源 ListViewBase)
IsSynchronizedWithCurrentItem

取得或設定值,這個值表示 選取器 是否應該讓 SelectedItemItems 屬性中的目前專案保持同步。

(繼承來源 Selector)
IsTabStop

取得或設定值,這個值表示控制項是否包含於索引標籤巡覽。

(繼承來源 UIElement)
IsTapEnabled

取得或設定值,這個值會決定 Tapped 事件是否可以來自該專案。

(繼承來源 UIElement)
IsTextScaleFactorEnabled

取得或設定是否啟用自動放大文字,以反映系統文字大小設定。

(繼承來源 Control)
IsZoomedInView

取得或設定值,這個值表示 ListViewBase 實例是否為其擁有 SemanticZoom 中的縮放檢視。

(繼承來源 ListViewBase)
ItemContainerGenerator

取得與此 ItemsControl 相關聯的 ItemContainerGenerator

(繼承來源 ItemsControl)
ItemContainerStyle

取得或設定呈現 ItemsControl 之專案容器時所使用的樣式。

(繼承來源 ItemsControl)
ItemContainerStyleSelector

取得或設定自定義 StyleSelector 邏輯類別的參考。 StyleSelector 會根據所顯示物件的特性,傳回不同的 Style 值,以用於專案容器。

(繼承來源 ItemsControl)
ItemContainerTransitions

取得或設定套用至 ItemsControl 專案容器的 Transition 樣式專案集合。

(繼承來源 ItemsControl)
Items

取得用來產生控件內容的集合。

(繼承來源 ItemsControl)
ItemsPanel

取得或設定樣板,這個樣板會定義控制項目配置的面板。

(繼承來源 ItemsControl)
ItemsPanelRoot

取得 ItemsPanel 指定的 Panel

(繼承來源 ItemsControl)
ItemsSource

取得或設定用來產生 ItemsControl 內容的物件來源。

(繼承來源 ItemsControl)
ItemTemplate

取得或設定用來顯示每個專案的 DataTemplate

(繼承來源 ItemsControl)
ItemTemplateSelector

取得或設定自定義 DataTemplateSelector 邏輯類別的參考。 此屬性所參考 的 DataTemplateSelector 會傳回要套用至專案的範本。

(繼承來源 ItemsControl)
KeyboardAcceleratorPlacementMode

取得或設定值,這個值表示控件 工具提示 是否顯示其相關聯鍵盤快捷鍵的按鍵組合。

(繼承來源 UIElement)
KeyboardAcceleratorPlacementTarget

取得或設定值,這個值表示顯示快速鍵組合的控件 工具提示

(繼承來源 UIElement)
KeyboardAccelerators

取得使用鍵盤叫用動作的按鍵組合集合。

快捷鍵通常會指派給按鈕或功能表項。

顯示各種功能表項鍵盤快捷鍵的功能表範例
顯示各種功能表項鍵盤快捷鍵的功能表範例

(繼承來源 UIElement)
KeyTipHorizontalOffset

取得或設定值,指出索引鍵提示相對於UIElement的左邊或右邊。

(繼承來源 UIElement)
KeyTipPlacementMode

取得或設定值,這個值表示存取索引鍵提示相對於UIElement界限的位置。

(繼承來源 UIElement)
KeyTipTarget

取得或設定值,這個值表示存取索引鍵提示的目標專案。

(繼承來源 UIElement)
KeyTipVerticalOffset

取得或設定值,這個值表示相對於UI元素放置索引鍵提示的上下距離。

(繼承來源 UIElement)
Language

取得或設定套用至 FrameworkElement 的當地語系化/全球化語言資訊,以及套用至物件表示法和 UI 中目前 FrameworkElement 的所有子元素。

(繼承來源 FrameworkElement)
Lights

取得附加至這個專案的 XamlLight 物件集合。

(繼承來源 UIElement)
ManipulationMode

取得或設定用於UIElement行為與手勢互動的ManipulationModes值。 設定此值可讓您處理來自應用程式程式碼中這個專案的操作事件。

(繼承來源 UIElement)
Margin

取得或設定 FrameworkElement 的外部邊界。

(繼承來源 FrameworkElement)
MaxHeight

取得或設定 FrameworkElement 的最大高度條件約束。

(繼承來源 FrameworkElement)
MaxWidth

取得或設定 FrameworkElement 的最大寬度條件約束。

(繼承來源 FrameworkElement)
MinHeight

取得或設定 FrameworkElement 的最小高度條件約束。

(繼承來源 FrameworkElement)
MinWidth

取得或設定 FrameworkElement 的最小寬度條件約束。

(繼承來源 FrameworkElement)
Name

取得或設定 對象的識別名稱。 當 XAML 處理器從 XAML 標記建立物件樹狀結構時,運行時間程式代碼可以透過這個名稱參考 XAML 宣告的物件。

(繼承來源 FrameworkElement)
Opacity

取得或設定物件的不透明度程度。

(繼承來源 UIElement)
OpacityTransition

取得或設定 ScalarTransition,以動畫顯示 Opacity 屬性的變更。

(繼承來源 UIElement)
Padding

取得或設定控制項內部的邊框間距。

(繼承來源 Control)
Parent

取得物件樹狀結構中這個 FrameworkElement 的父物件。

(繼承來源 FrameworkElement)
PointerCaptures

取得所有擷取指標的集合,表示為 指標 值。

(繼承來源 UIElement)
Projection

取得或設定轉譯這個專案時要套用的 3D 效果) (3D 效果。

(繼承來源 UIElement)
ProtectedCursor

取得或設定指標在這個專案上方時所顯示的游標。 默認值為 null,表示數據指標沒有變更。

(繼承來源 UIElement)
RasterizationScale

取得值,表示每個檢視圖元的原始 (實體) 像素數目。

(繼承來源 UIElement)
RenderSize

取得 UIElement的最終轉譯大小。 不建議使用,請參閱。

(繼承來源 UIElement)
RenderTransform

取得或設定會影響 UIElement轉譯位置的轉換資訊。

(繼承來源 UIElement)
RenderTransformOrigin

取得或設定 RenderTransform 所宣告之任何可能轉譯轉換的原點,相對於 UIElement 的界限。

(繼承來源 UIElement)
ReorderMode

取得或設定 ListViewBase 實例的重新排序行為。 啟用時,使用者操作可以重新排序未排序和未分組的清單。

(繼承來源 ListViewBase)
RequestedTheme

取得或設定 UIElement (及其子元素) 用於資源判斷的 UI 主題。 您指定的 RequestedTheme UI 主題可以覆寫應用層級 RequestedTheme

(繼承來源 FrameworkElement)
RequiresPointer

取得或設定UI元素是否支援滑鼠模式,以模擬指標互動體驗與非指標輸入設備,例如鍵盤或遊戲控制器。

(繼承來源 Control)
Resources

取得本機定義的資源字典。 在 XAML 中,您可以透過 XAML 隱含集合語法,將資源專案建立為屬性專案的子物件專案 frameworkElement.Resources

(繼承來源 FrameworkElement)
Rotation

取得或設定順時針旋轉的角度,以度為單位。 相對於 RotationAxis 和 CenterPoint 旋轉。 影響項目的轉譯位置。

(繼承來源 UIElement)
RotationAxis

取得或設定座標軸,以繞著旋轉專案。

(繼承來源 UIElement)
RotationTransition

取得或設定 ScalarTransition,以動畫顯示 Rotation 屬性的變更。

(繼承來源 UIElement)
Scale

取得或設定專案的刻度。 相對於專案的 CenterPoint 進行調整。 影響項目的轉譯位置。

(繼承來源 UIElement)
ScaleTransition

取得或設定 Vector3Transition,以動畫顯示 Scale 屬性的變更。

(繼承來源 UIElement)
SelectedIndex

取得或設定選取專案的索引。

(繼承來源 Selector)
SelectedItem

取得或設定選取的項目。

(繼承來源 Selector)
SelectedItems

取得目前選取的項目。

(繼承來源 ListViewBase)
SelectedRanges

取得 ItemIndexRange 物件的集合,這些物件描述清單中目前選取的專案。

(繼承來源 ListViewBase)
SelectedValue

取得或設定使用 SelectedValuePath 取得之選取專案的值。

(繼承來源 Selector)
SelectedValuePath

取得或設定用來取得 SelectedItem 屬性之 SelectedValue 屬性的屬性路徑。

(繼承來源 Selector)
SelectionMode

取得或設定 ListViewBase 實例的選取行為。

(繼承來源 ListViewBase)
SemanticZoomOwner

取得或設定裝載 ListViewBaseSemanticZoom 實例。

(繼承來源 ListViewBase)
Shadow

取得或設定 元素所轉換的陰影效果。

(繼承來源 UIElement)
ShowsScrollingPlaceholders

取得或設定值,這個值表示檢視是否會在卷動期間顯示專案的佔位元 UI。

(繼承來源 ListViewBase)
SingleSelectionFollowsFocus

取得或設定值,這個值表示項目選取專案在鍵盤焦點變更時是否變更。

(繼承來源 ListViewBase)
Style

取得或設定配置和轉譯期間針對這個物件套用的實例 Style

(繼承來源 FrameworkElement)
TabFocusNavigation

取得或設定值,這個值會修改Tabbing和 TabIndex 對此控件的運作方式。

(繼承來源 UIElement)
TabIndex

取得或設定值,決定當使用者使用 Tab 鍵瀏覽控制項時,元素接收焦點的順序。

(繼承來源 UIElement)
TabNavigation

取得或設定值,這個值會修改Tabbing和 UIElement.TabIndex 對此控件的運作方式。

注意

針對 Windows 10 Creators Update (組建 10.0.15063) 和更新版本,TABFocusNavigation 屬性可在 UIElement 基類上使用,以在不使用 ControlTemplate 的索引卷標序列中包含物件。

(繼承來源 Control)
Tag

取得或設定任意物件值,可用來儲存這個物件的自定義資訊。

(繼承來源 FrameworkElement)
Template

取得或設定控制項範本。 控件範本會定義 UI 中控制件的視覺外觀,並在 XAML 標記中定義。

(繼承來源 Control)
Transform3D

取得或設定轉譯這個專案時要套用的 3D 轉換效果。

(繼承來源 UIElement)
TransformMatrix

取得或設定要套用至項目的轉換矩陣。

(繼承來源 UIElement)
Transitions

取得或設定套用至 UIElementTransition 樣式專案集合。

(繼承來源 UIElement)
Translation

取得或設定專案的 x、y 和 z 轉譯位置。

(繼承來源 UIElement)
TranslationTransition

取得或設定 Vector3Transition,以動畫顯示 Translation 屬性的變更。

(繼承來源 UIElement)
Triggers

取得針對 FrameworkElement 定義的動畫觸發程式集合。 不常使用。 請參閱<備註>。

(繼承來源 FrameworkElement)
UseLayoutRounding

取得或設定值,這個值會決定物件及其視覺子樹的轉譯是否應該使用四捨五入行為,將轉譯對齊整個圖元。

(繼承來源 UIElement)
UseSystemFocusVisuals

取得或設定值,這個值表示控件是否使用由系統繪製的焦點視覺效果,或控件範本中定義的焦點視覺效果。

(繼承來源 UIElement)
VerticalAlignment

取得或設定在面板或專案控件等父物件中撰寫時套用至 FrameworkElement 的垂直對齊特性。

(繼承來源 FrameworkElement)
VerticalContentAlignment

取得或設定控制項內容的垂直對齊。

(繼承來源 Control)
Visibility

取得或設定 UIElement的可見性。 UIElement不可見的 ,不會轉譯,而且不會將其所需的大小傳達給版面配置。

(繼承來源 UIElement)
Width

取得或設定 FrameworkElement 的寬度。

(繼承來源 FrameworkElement)
XamlRoot

取得或設定 XamlRoot 正在檢視這個專案的 。

(繼承來源 UIElement)
XYFocusDown

取得或設定當使用者按下遊戲控制器的 Directional Pad (D-pad) 時取得焦點的物件。

(繼承來源 UIElement)
XYFocusDownNavigationStrategy

取得或設定值,指定用來判斷向下導覽目標元素的策略。

(繼承來源 UIElement)
XYFocusKeyboardNavigation

取得或設定值,這個值會啟用或停用使用鍵盤方向箭號的流覽。

(繼承來源 UIElement)
XYFocusLeft

取得或設定當用戶在遊戲控制器的 Directional Pad (D-pad) 左鍵時取得焦點的物件。

(繼承來源 UIElement)
XYFocusLeftNavigationStrategy

取得或設定值,指定用來判斷左側導覽目標元素的策略。

(繼承來源 UIElement)
XYFocusRight

取得或設定當使用者在遊戲控制器的 Directional Pad (D-pad) 上按下滑鼠右鍵時取得焦點的物件。

(繼承來源 UIElement)
XYFocusRightNavigationStrategy

取得或設定值,指定用來判斷右導覽之目標元素的策略。

(繼承來源 UIElement)
XYFocusUp

取得或設定對象,當使用者按下遊戲控制器的 Directional Pad (D-pad) 時取得焦點。

(繼承來源 UIElement)
XYFocusUpNavigationStrategy

取得或設定值,指定用來判斷向上瀏覽之目標元素的策略。

(繼承來源 UIElement)

方法

AddHandler(RoutedEvent, Object, Boolean)

加入所指定路由事件的路由事件處理常式,會將此處理常式加入目前項目的處理常式集合中。 指定 handledEventsTootrue ,即使事件是在其他地方處理,仍要叫用提供的處理程式。

(繼承來源 UIElement)
ApplyTemplate()

載入相關的控制項範本,以便參考其元件。

(繼承來源 Control)
Arrange(Rect)

放置子物件,並決定 UIElement的大小。 為其子項目實作自定義配置的父對象應該從其版面配置覆寫實作呼叫此方法,以形成遞歸版面配置更新。

(繼承來源 UIElement)
ArrangeOverride(Size)

提供配置「排列」階段的行為。 類別可以覆寫這個方法,以定義自己的「排列」傳遞行為。

(繼承來源 FrameworkElement)
CancelDirectManipulations()

取消任何包含目前 UIElementScrollViewer 父代上 (系統定義的行動瀏覽/縮放) 進行中的直接操作處理。

(繼承來源 UIElement)
CapturePointer(Pointer)

設定 UIElement 的指標擷取。 擷取之後,只有具有擷取的專案才會引發指標相關事件。

(繼承來源 UIElement)
ClearContainerForItemOverride(DependencyObject, Object)

復原 PrepareContainerForItemOverride 方法的效果。

(繼承來源 ItemsControl)
ClearValue(DependencyProperty)

清除相依性屬性的本機值。

(繼承來源 DependencyObject)
CompleteViewChange()

SemanticZoom 的整體檢視變更時,變更簡報的相關層面。

(繼承來源 ListViewBase)
CompleteViewChangeFrom(SemanticZoomLocation, SemanticZoomLocation)

ListViewBase 實例是來源檢視時,完成與檢視變更相關的專案操作,而新的檢視可能是不同的實作檢視。

(繼承來源 ListViewBase)
CompleteViewChangeTo(SemanticZoomLocation, SemanticZoomLocation)

ListViewBase 實例是目的地檢視,而且來源檢視可能是不同的實作檢視時,完成與檢視變更相關的專案操作。

(繼承來源 ListViewBase)
ContainerFromIndex(Int32)

傳回 ItemCollection 內指定索引處專案的容器。

(繼承來源 ItemsControl)
ContainerFromItem(Object)

傳回對應至指定專案的容器。

(繼承來源 ItemsControl)
DeselectRange(ItemIndexRange)

取消選取 ItemIndexRange 所描述的項目區塊。

(繼承來源 ListViewBase)
FindName(String)

擷取具有指定標識碼名稱的物件。

(繼承來源 FrameworkElement)
FindSubElementsForTouchTargeting(Point, Rect)

可讓 UIElement 子類別公開可協助解決觸控目標的子元素。

(繼承來源 UIElement)
Focus(FocusState)

嘗試將焦點設定至此項目。

(繼承來源 UIElement)
GetAnimationBaseValue(DependencyProperty)

傳回為相依性屬性建立的任何基底值,如果動畫未使用中,則適用此屬性。

(繼承來源 DependencyObject)
GetBindingExpression(DependencyProperty)

會傳回代表指定屬性上系 結的 BindingExpression

(繼承來源 FrameworkElement)
GetChildrenInTabFocusOrder()

可讓 UIElement 子類別公開參與 Tab 焦點的子元素。

(繼承來源 UIElement)
GetContainerForItemOverride()

建立或識別用來顯示指定項目的項目。

(繼承來源 ItemsControl)
GetTemplateChild(String)

擷取具現化 ControlTemplate 視覺化樹狀結構中的具名專案。

(繼承來源 Control)
GetValue(DependencyProperty)

DependencyObject 傳回相依性屬性的目前有效值。

(繼承來源 DependencyObject)
GetVisualInternal()

Visual擷取項目解析為 的 。

(繼承來源 UIElement)
GoToElementStateCore(String, Boolean)

在衍生類別中實作時,可在程式碼中啟用控件範本的個別狀態建構,而不是在控件啟動時載入所有狀態的 XAML。

(繼承來源 FrameworkElement)
GroupHeaderContainerFromItemContainer(DependencyObject)

傳回對應至指定之容器專案的群組標頭容器。

(繼承來源 ItemsControl)
IndexFromContainer(DependencyObject)

將索引傳回至具有指定且產生的容器的專案。

(繼承來源 ItemsControl)
InitializeViewChange()

SemanticZoom 的整體檢視即將變更時,初始化簡報相關層面的變更 (,例如卷動 UI 或狀態) 。

(繼承來源 ListViewBase)
InvalidateArrange()

使 UIElement 的排列狀態 (配置) 失效。 無效之後, UIElement 會更新其版面配置,這會以異步方式發生。

(繼承來源 UIElement)
InvalidateMeasure()

使 UIElement的度量狀態 (配置) 失效。

(繼承來源 UIElement)
InvalidateViewport()

使用來計算有效檢視區的UIElement檢視區狀態失效。

(繼承來源 FrameworkElement)
IsDragSource()

傳回值,這個值表示列表檢視是否同時是拖放作業中的拖放來源和置放目標。

(繼承來源 ListViewBase)
IsItemItsOwnContainerOverride(Object)

判斷指定的專案是 (還是有資格) 自己的容器。

(繼承來源 ItemsControl)
ItemFromContainer(DependencyObject)

傳回對應至指定之產生的容器的專案。

(繼承來源 ItemsControl)
LoadMoreItemsAsync()

根據使用中的累加式載入設定,起始異步要求以載入更多數據項。

(繼承來源 ListViewBase)
MakeVisible(SemanticZoomLocation)

強制檢視中的內容捲動,直到 SemanticZoomLocation 指定的項目可見為止。 如果找到專案,也會將焦點設定為專案。

(繼承來源 ListViewBase)
Measure(Size)

匯報 UIElementDesiredSize。 一般而言,針對其版面配置子系實作實作自定義配置的物件,會從自己的 MeasureOverride 實作呼叫這個方法,以形成遞歸版面配置更新。

(繼承來源 UIElement)
MeasureOverride(Size)

提供配置週期的「量值」傳遞行為。 類別可以覆寫這個方法,以定義自己的「量值」傳遞行為。

(繼承來源 FrameworkElement)
OnApplyTemplate()

每當應用程式程式代碼或內部進程 (,例如重建版面配置傳遞) 呼叫 ApplyTemplate 時叫用。 在最簡單的詞彙中,這表示方法只會在應用程式中顯示UI元素之前呼叫。 覆寫這個方法,以影響類別的默認範本後邏輯。

(繼承來源 FrameworkElement)
OnBringIntoViewRequested(BringIntoViewRequestedEventArgs)

BringIntoViewRequested 事件發生之前呼叫。

(繼承來源 UIElement)
OnCharacterReceived(CharacterReceivedRoutedEventArgs)

在 CharacterReceived 事件發生之前呼叫。

(繼承來源 Control)
OnCreateAutomationPeer()

在衍生類別中實作時,會傳回 Microsoft 使用者介面自動化 基礎結構的類別特定 AutomationPeer 實作。

(繼承來源 UIElement)
OnDisconnectVisualChildren()

覆寫這個方法,以實作從類別特定內容或子系屬性移除專案時,配置和邏輯的行為。

(繼承來源 UIElement)
OnDoubleTapped(DoubleTappedRoutedEventArgs)

DoubleTapped 事件發生之前呼叫。

(繼承來源 Control)
OnDragEnter(DragEventArgs)

DragEnter 事件發生之前呼叫。

(繼承來源 Control)
OnDragLeave(DragEventArgs)

DragLeave 事件發生之前呼叫。

(繼承來源 Control)
OnDragOver(DragEventArgs)

DragOver 事件發生之前呼叫。

(繼承來源 Control)
OnDrop(DragEventArgs)

Drop 事件發生之前呼叫。

(繼承來源 Control)
OnGotFocus(RoutedEventArgs)

GotFocus 事件發生之前呼叫。

(繼承來源 Control)
OnGroupStyleSelectorChanged(GroupStyleSelector, GroupStyleSelector)

GroupStyleSelector 屬性的值變更時叫用。

(繼承來源 ItemsControl)
OnHolding(HoldingRoutedEventArgs)

在 Holding 事件發生之前呼叫。

(繼承來源 Control)
OnItemContainerStyleChanged(Style, Style)

ItemContainerStyle 屬性的值變更時叫用。

(繼承來源 ItemsControl)
OnItemContainerStyleSelectorChanged(StyleSelector, StyleSelector)

ItemContainerStyleSelector 屬性的值變更時叫用。

(繼承來源 ItemsControl)
OnItemsChanged(Object)

當 Items 屬性的值變更時叫用。

(繼承來源 ItemsControl)
OnItemTemplateChanged(DataTemplate, DataTemplate)

ItemTemplate 屬性的值變更時叫用。

(繼承來源 ItemsControl)
OnItemTemplateSelectorChanged(DataTemplateSelector, DataTemplateSelector)

ItemTemplateSelector 屬性的值變更時叫用。

(繼承來源 ItemsControl)
OnKeyboardAcceleratorInvoked(KeyboardAcceleratorInvokedEventArgs)

在應用程式中處理 鍵盤快捷方式 (或快捷鍵) 時呼叫。 覆寫這個方法,以處理叫用鍵盤快捷鍵時應用程式回應的方式。

(繼承來源 UIElement)
OnKeyDown(KeyRoutedEventArgs)

在 KeyDown 事件發生之前呼叫。

(繼承來源 Control)
OnKeyUp(KeyRoutedEventArgs)

在 KeyUp 事件發生之前呼叫。

(繼承來源 Control)
OnLostFocus(RoutedEventArgs)

LostFocus 事件發生之前呼叫。

(繼承來源 Control)
OnManipulationCompleted(ManipulationCompletedRoutedEventArgs)

ManipulationCompleted 事件發生之前呼叫。

(繼承來源 Control)
OnManipulationDelta(ManipulationDeltaRoutedEventArgs)

ManipulationDelta 事件發生之前呼叫。

(繼承來源 Control)
OnManipulationInertiaStarting(ManipulationInertiaStartingRoutedEventArgs)

ManipulationInertiaStarting 事件發生之前呼叫。

(繼承來源 Control)
OnManipulationStarted(ManipulationStartedRoutedEventArgs)

ManipulationStarted 事件發生之前呼叫。

(繼承來源 Control)
OnManipulationStarting(ManipulationStartingRoutedEventArgs)

ManipulationStarting 事件發生之前呼叫。

(繼承來源 Control)
OnPointerCanceled(PointerRoutedEventArgs)

PointerCanceled 事件發生之前呼叫。

(繼承來源 Control)
OnPointerCaptureLost(PointerRoutedEventArgs)

PointerCaptureLost 事件發生之前呼叫。

(繼承來源 Control)
OnPointerEntered(PointerRoutedEventArgs)

PointerEntered 事件發生之前呼叫。

(繼承來源 Control)
OnPointerExited(PointerRoutedEventArgs)

PointerExited 事件發生之前呼叫。

(繼承來源 Control)
OnPointerMoved(PointerRoutedEventArgs)

PointerMoved 事件發生之前呼叫。

(繼承來源 Control)
OnPointerPressed(PointerRoutedEventArgs)

PointerPressed 事件發生之前呼叫。

(繼承來源 Control)
OnPointerReleased(PointerRoutedEventArgs)

PointerReleased 事件發生之前呼叫。

(繼承來源 Control)
OnPointerWheelChanged(PointerRoutedEventArgs)

PointerWheelChanged 事件發生之前呼叫。

(繼承來源 Control)
OnPreviewKeyDown(KeyRoutedEventArgs)

PreviewKeyDown 事件發生之前呼叫。

(繼承來源 Control)
OnPreviewKeyUp(KeyRoutedEventArgs)

PreviewKeyUp 事件發生之前呼叫。

(繼承來源 Control)
OnProcessKeyboardAccelerators(ProcessKeyboardAcceleratorEventArgs)

在應用程式中處理 鍵盤快捷方式 (或快捷鍵) 之前呼叫。 每當應用程式程式代碼或內部進程呼叫 ProcessKeyboardAccelerators 時叫用。 覆寫此方法以影響預設加速器處理。

(繼承來源 UIElement)
OnRightTapped(RightTappedRoutedEventArgs)

發生 RightTapped 事件之前呼叫。

(繼承來源 Control)
OnTapped(TappedRoutedEventArgs)

點選 事件發生之前呼叫。

(繼承來源 Control)
PopulatePropertyInfo(String, AnimationPropertyInfo)

定義可以產生動畫效果的屬性。

(繼承來源 UIElement)
PopulatePropertyInfoOverride(String, AnimationPropertyInfo)

在衍生類別中覆寫時,定義可產生動畫效果的屬性。

(繼承來源 UIElement)
PrepareConnectedAnimation(String, Object, String)

傳回與指定之索引鍵、數據項和源項目相關聯的連接動畫。

(繼承來源 ListViewBase)
PrepareContainerForItemOverride(DependencyObject, Object)

準備指定項目 (Element) 以顯示指定項目 (Item)。

(繼承來源 ItemsControl)
ReadLocalValue(DependencyProperty)

如果已設定本機值,則傳回相依性屬性的本機值。

(繼承來源 DependencyObject)
RegisterPropertyChangedCallback(DependencyProperty, DependencyPropertyChangedCallback)

註冊通知函式,以接聽此 DependencyObject 實例上特定 DependencyProperty 的變更。

(繼承來源 DependencyObject)
ReleasePointerCapture(Pointer)

釋放指標擷取,以便透過這個 UIElement擷取一個特定指標。

(繼承來源 UIElement)
ReleasePointerCaptures()

釋放這個專案保留的所有指標擷取。

(繼承來源 UIElement)
RemoveFocusEngagement()

從支援遊戲控制器互動的焦點條件約束中釋放控件, (IsFocusEngaged 為 true) 。

(繼承來源 Control)
RemoveHandler(RoutedEvent, Object)

從這個 UIElement 移除指定的路由事件處理程式。 一般而言,有問題的處理程式是由 AddHandler 所新增。

(繼承來源 UIElement)
ScrollIntoView(Object)

捲動清單以將指定的數據項帶入檢視中。

(繼承來源 ListViewBase)
ScrollIntoView(Object, ScrollIntoViewAlignment)

捲動清單,以使用指定的對齊方式將指定的數據項帶入檢視。

(繼承來源 ListViewBase)
SelectAll()

選取檢視中的所有專案。

(繼承來源 ListViewBase)
SelectRange(ItemIndexRange)

選取 ItemIndexRange 所描述的項目區塊。

(繼承來源 ListViewBase)
SetBinding(DependencyProperty, BindingBase)

使用提供的系結物件,將系結附加至 FrameworkElement

(繼承來源 FrameworkElement)
SetDesiredContainerUpdateDuration(TimeSpan)

設定 當 ListViewBase 在初始載入或捲動期間以數據項更新 UI 時,兩個轉譯傳遞之間的目標時間上限。

(繼承來源 ListViewBase)
SetValue(DependencyProperty, Object)

設定 DependencyObject 上相依性屬性的本機值。

(繼承來源 DependencyObject)
StartAnimation(ICompositionAnimationBase)

開始專案上的指定動畫。

(繼承來源 UIElement)
StartBringIntoView()

起始 XAML 架構的要求,以將專案帶入其內含的任何可捲動區域中的檢視。

(繼承來源 UIElement)
StartBringIntoView(BringIntoViewOptions)

使用指定的選項,起始 XAML 架構的要求,以將專案帶入檢視。

(繼承來源 UIElement)
StartDragAsync(ExpPointerPoint)

表示在數據列和數據行中顯示數據項的控制件。

(繼承來源 UIElement)
StartDragAsync(PointerPoint)

啟始拖放作業。

重要

如果使用者以系統管理員身分以提升許可權模式執行應用程式,則不支援。

(繼承來源 UIElement)
StartViewChangeFrom(SemanticZoomLocation, SemanticZoomLocation)

ListViewBase 實例是來源檢視,而暫止的目的地檢視是可能不同的實作檢視時,初始化與檢視變更相關的專案操作。

(繼承來源 ListViewBase)
StartViewChangeTo(SemanticZoomLocation, SemanticZoomLocation)

當來源檢視是不同的檢視,而暫止的目的地檢視是 ListViewBase 實例時,初始化與檢視變更相關的專案操作。

(繼承來源 ListViewBase)
StopAnimation(ICompositionAnimationBase)

停止專案上的指定動畫。

(繼承來源 UIElement)
TransformToVisual(UIElement)

傳回轉換對象,這個物件可用來將 座標從UIElement 轉換成指定的物件。

(繼承來源 UIElement)
TryInvokeKeyboardAccelerator(ProcessKeyboardAcceleratorEventArgs)

嘗試搜尋 UIElement 的整個可視化樹狀結構,以叫用 鍵盤快捷方式 (或快捷鍵)

(繼承來源 UIElement)
TryStartConnectedAnimationAsync(ConnectedAnimation, Object, String)

嘗試啟動動畫。

(繼承來源 ListViewBase)
UnregisterPropertyChangedCallback(DependencyProperty, Int64)

取消先前透過呼叫 RegisterPropertyChangedCallback 註冊的變更通知。

(繼承來源 DependencyObject)
UpdateLayout()

確保 UIElement 子物件的所有位置都已針對版面配置正確更新。

(繼承來源 UIElement)

事件

AccessKeyDisplayDismissed

發生於不應再顯示存取金鑰時。

(繼承來源 UIElement)
AccessKeyDisplayRequested

發生於使用者要求顯示存取金鑰時。

(繼承來源 UIElement)
AccessKeyInvoked

發生於使用者完成存取金鑰序列時。

(繼承來源 UIElement)
ActualThemeChanged

發生於 ActualTheme 屬性值變更時。

(繼承來源 FrameworkElement)
BringIntoViewRequested

在這個專案或其中一個子代上呼叫 StartBringIntoView 時發生。

(繼承來源 UIElement)
CharacterReceived

發生於輸入佇列收到單一、撰寫的字元時。

(繼承來源 UIElement)
ChoosingGroupHeaderContainer

發生於要為數據群組選擇專案容器時。

(繼承來源 ListViewBase)
ChoosingItemContainer

發生於要為數據項選擇專案容器時。

(繼承來源 ListViewBase)
ContainerContentChanging

發生於與 UI 容器相關聯的數據項變更時。

(繼承來源 ListViewBase)
ContextCanceled

發生於內容輸入手勢繼續進入操作手勢時,通知專案不應開啟內容飛出視窗。

(繼承來源 UIElement)
ContextRequested

發生於使用者已完成內容輸入手勢時,例如按兩下滑鼠右鍵。

(繼承來源 UIElement)
DataContextChanged

發生於 FrameworkElement.DataContext 屬性的值變更時。

(繼承來源 FrameworkElement)
DoubleTapped

發生於在此元素的點擊測試區域上發生未處理的 DoubleTap 互動時。

(繼承來源 UIElement)
DragEnter

當輸入系統報告基礎拖曳事件,並將這個項目當做目標時發生。

(繼承來源 UIElement)
DragItemsCompleted

發生於包含檢視中其中一個專案的拖曳作業結束時。

(繼承來源 ListViewBase)
DragItemsStarting

發生於起始包含檢視中其中一個專案的拖曳作業時。

(繼承來源 ListViewBase)
DragLeave

當輸入系統報告基礎拖曳事件,並將這個項目當做原點時發生。

(繼承來源 UIElement)
DragOver

在輸入系統回報以此項目作為可能置放目標的基礎拖曳事件時發生。

(繼承來源 UIElement)
DragStarting

發生於起始拖曳作業時。

(繼承來源 UIElement)
Drop

輸入系統報告其下以這個項目作為置放目標的置放事件時發生。

(繼承來源 UIElement)
DropCompleted

發生於以這個專案做為結束來源的拖放作業時。

(繼承來源 UIElement)
EffectiveViewportChanged

發生於 FrameworkElement的有效檢視區 變更時。

(繼承來源 FrameworkElement)
FocusDisengaged

當使用者按下遊戲控制器上的 B/上一頁按鈕時,會從控件放開焦點時發生。

(繼承來源 Control)
FocusEngaged

發生於使用者按下遊戲控制器上的 A/Select 按鈕時,焦點受限於控件。

(繼承來源 Control)
GettingFocus

發生於 UIElement 收到焦點之前。 此事件會同步引發,以確保事件反升時不會移動焦點。

(繼承來源 UIElement)
GotFocus

發生於 UIElement 收到焦點時。 此事件會以異步方式引發,因此焦點可以在反升完成之前再次移動。

(繼承來源 UIElement)
Holding

發生於在此元素的點擊測試區域上發生未處理的 保留 互動時。

(繼承來源 UIElement)
IsEnabledChanged

發生於 IsEnabled 屬性變更時。

(繼承來源 Control)
ItemClick

當清單檢視中的專案收到互動,且 IsItemClickEnabled 屬性為 true 時發生。

(繼承來源 ListViewBase)
KeyDown

UIElement 有焦點時按下鍵盤按鍵時發生。

(繼承來源 UIElement)
KeyUp

發生於 UIElement 有焦點時放開鍵盤按鍵時。

(繼承來源 UIElement)
LayoutUpdated

發生於可視化樹狀結構的版面配置變更時,因為配置相關屬性變更值或重新整理版面配置的其他動作。

(繼承來源 FrameworkElement)
Loaded

發生於 架構Element 已建構並新增至物件樹狀結構,並準備好進行互動時。

(繼承來源 FrameworkElement)
Loading

FrameworkElement 開始載入時發生。

(繼承來源 FrameworkElement)
LosingFocus

發生於 UIElement 失去焦點之前。 此事件會同步引發,以確保事件反升時不會移動焦點。

(繼承來源 UIElement)
LostFocus

發生於 UIElement 失去焦點時。 此事件會以異步方式引發,因此焦點可以在反升完成之前再次移動。

(繼承來源 UIElement)
ManipulationCompleted

發生於 UIElement 上的操作完成時。

(繼承來源 UIElement)
ManipulationDelta

輸入裝置在操作期間變更位置時發生。

(繼承來源 UIElement)
ManipulationInertiaStarting

在操作和慣性開始的時候,只要輸入裝置不與 UIElement 物件接觸便發生。

(繼承來源 UIElement)
ManipulationStarted

當輸入裝置開始在 UIElement 進行操作時發生。

(繼承來源 UIElement)
ManipulationStarting

發生於第一次建立操作處理器時。

(繼承來源 UIElement)
NoFocusCandidateFound

發生於用戶嘗試透過索引標籤或方向箭號移動焦點 () ,但焦點不會移動,因為不會在移動方向找到任何焦點候選專案。

(繼承來源 UIElement)
PointerCanceled

發生於讓聯繫人異常失去聯繫人的指標時。

(繼承來源 UIElement)
PointerCaptureLost

發生於這個專案先前保留的指標擷取移至另一個專案或其他地方時。

(繼承來源 UIElement)
PointerEntered

發生於指標進入這個項目的點擊測試區域時。

(繼承來源 UIElement)
PointerExited

發生於指標離開這個項目的點擊測試區域時。

(繼承來源 UIElement)
PointerMoved

當指標在指標保留在這個項目的點擊測試區域中時移動時發生。

(繼承來源 UIElement)
PointerPressed

發生於指標裝置在這個專案內起始 Press 動作時。

(繼承來源 UIElement)
PointerReleased

發生於先前起始 按下 動作的指標裝置放開時,同時在此元素內。 請注意, 按下動作的 結尾不保證會引發 PointerReleased 事件;其他事件可能會改為引發。 如需詳細資訊,請參閱。

(繼承來源 UIElement)
PointerWheelChanged

發生於指標滾輪的差異值變更時。

(繼承來源 UIElement)
PreviewKeyDown

UIElement 有焦點時按下鍵盤按鍵時發生。

(繼承來源 UIElement)
PreviewKeyUp

發生於 UIElement 有焦點時放開鍵盤按鍵時。

(繼承來源 UIElement)
ProcessKeyboardAccelerators

發生於按下 鍵盤快捷方式 (或快捷鍵) 時。

(繼承來源 UIElement)
RightTapped

發生於在指標位於 元素上方時發生右鍵輸入回應時。

(繼承來源 UIElement)
SelectionChanged

發生於目前選取的項目變更時。

(繼承來源 Selector)
SizeChanged

發生於 ActualHeightActualWidth 屬性變更 FrameworkElement 上的值時。

(繼承來源 FrameworkElement)
Tapped

發生於未處理的 選互動發生於這個項目的點擊測試區域。

(繼承來源 UIElement)
Unloaded

當這個物件不再連接到主物件樹狀結構時發生。

(繼承來源 FrameworkElement)

適用於

另請參閱