ContentPresenter 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
顯示 ContentControl的內容。
public ref class ContentPresenter : System::Windows::FrameworkElement
[System.Windows.Localizability(System.Windows.LocalizationCategory.None, Readability=System.Windows.Readability.Unreadable)]
public class ContentPresenter : System.Windows.FrameworkElement
[<System.Windows.Localizability(System.Windows.LocalizationCategory.None, Readability=System.Windows.Readability.Unreadable)>]
type ContentPresenter = class
inherit FrameworkElement
Public Class ContentPresenter
Inherits FrameworkElement
- 繼承
- 衍生
- 屬性
範例
下圖顯示 一個 ButtonStyle ,該 使 的 為 ControlTemplateButton。 定義ControlTemplate為元素Button中Grid出現的 Ellipse 。 ContentPresenter Button Content標記應在 內垂直與水平Grid均顯示並置中。
<Style TargetType="Button">
<!--Set to true to not get any properties from the themes.-->
<Setter Property="OverridesDefaultStyle" Value="True"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Grid>
<Ellipse Fill="{TemplateBinding Background}"/>
<ContentPresenter HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
下圖顯示了套用時的 Button 外觀:
備註
你通常會用 ContentPresenter 在 ControlTemplate a ContentControl 的 中指定內容要加入的位置。 每種ContentControl類型預設都有 。ContentPresenterControlTemplate
當物件ContentPresenter位於 的 時ControlTemplateContentControl,、ContentTemplateSelectorContentContentTemplate、與屬性的值來自於 的相同名稱ContentControl的性質。 你可以讓 ContentPresenter 屬性從模板父的屬性中取得這些屬性的值,方法是設定 ContentSource 該屬性或綁定到它們上。
該ContentPresenter使用以下邏輯來顯示:Content
如果 ContentTemplate 上的ContentPresenter屬性是 設定,則 將 ContentPresenter 套用到 Content 該DataTemplate屬性,結果UIElement及其子元素(如有)會被顯示。 欲了解更多物件 DataTemplate 相關資訊,請參閱 資料模板概覽。
若 ContentTemplateSelector 上的ContentPresenter屬性為 設定,則對ContentPresenter該Content屬性套用適當的 DataTemplate ,結果UIElement及其子元素(如有)會被顯示。
若 與 DataTemplate 類型 相關聯 Content,則 ContentPresenter 將 應用於 DataTemplate 該 Content 屬性,結果 UIElement 及其子元素(如有)會被顯示。
若 Content 是UIElement物件,則顯示 。UIElement 如果已經 UIElement 有父母,則會發生例外。
如果存在 將 TypeConverter 的 Content 類型轉換成 UIElement,則 ContentPresenter 會使用該 TypeConverter 類型,結果 UIElement 會被顯示出來。
如果有 能 TypeConverter 將 的 Content 型別轉換成字串,就 ContentPresenter 利用它 TypeConverter 並建立 來 TextBlock 包含該字串。 TextBlock顯示出來。
若內容為 XmlElement,屬性 InnerText 值以 顯示為 TextBlock。
呼叫 ContentPresenterToString 的方法 Content 和 會產生 a TextBlock 來包含由 返回的 ToString字串。 TextBlock顯示出來。
建構函式
| 名稱 | Description |
|---|---|
| ContentPresenter() |
初始化 ContentPresenter 類別的新執行個體。 |
欄位
| 名稱 | Description |
|---|---|
| ContentProperty |
識別 Content 依賴性質。 |
| ContentSourceProperty |
識別 ContentSource 依賴性質。 |
| ContentStringFormatProperty |
識別 ContentStringFormat 依賴性質。 |
| ContentTemplateProperty |
識別 ContentTemplate 依賴性質。 |
| ContentTemplateSelectorProperty |
識別 ContentTemplateSelector 依賴性質。 |
| RecognizesAccessKeyProperty |
識別 RecognizesAccessKey 依賴性質。 |
屬性
| 名稱 | Description |
|---|---|
| ActualHeight |
取得這個項目的轉譯高度。 (繼承來源 FrameworkElement) |
| ActualWidth |
取得這個元素的轉譯寬度。 (繼承來源 FrameworkElement) |
| AllowDrop |
取得或設定值,指出這個元素是否可以當做拖放作業的目標使用。 這是相依性屬性。 (繼承來源 UIElement) |
| AreAnyTouchesCaptured |
取得值,這個值表示是否至少擷取一個觸控到這個專案。 (繼承來源 UIElement) |
| AreAnyTouchesCapturedWithin |
取得值,這個值表示是否至少擷取一個觸控至這個專案,或是擷取至其可視化樹狀結構中的任何子專案。 (繼承來源 UIElement) |
| AreAnyTouchesDirectlyOver |
取得值,這個值表示是否在這個元素上按下至少一個觸控。 (繼承來源 UIElement) |
| AreAnyTouchesOver |
取得值,這個值表示是否至少在這個專案或其可視化樹狀結構中的任何子專案上按下一個觸控。 (繼承來源 UIElement) |
| BindingGroup |
取得或設定 BindingGroup ,該元素所用的。 (繼承來源 FrameworkElement) |
| BitmapEffect |
已淘汰.
已淘汰.
取得或設定直接套用至這個項目轉譯內容的點陣圖效果。 這是相依性屬性。 (繼承來源 UIElement) |
| BitmapEffectInput |
已淘汰.
已淘汰.
取得或設定位圖效果的輸入來源,該效果會直接套用至這個專案的轉譯內容。 這是相依性屬性。 (繼承來源 UIElement) |
| CacheMode |
取得或設定 的快取表示 UIElement。 (繼承來源 UIElement) |
| Clip |
取得或設定用來定義項目內容的外框的幾何。 這是相依性屬性。 (繼承來源 UIElement) |
| ClipToBounds |
取得或設定值,指出是否要裁剪這個元素的內容(或來自這個專案的子項目的內容),以符合包含專案的大小。 這是相依性屬性。 (繼承來源 UIElement) |
| CommandBindings |
會得到與此元素相關的物件集合 CommandBinding 。 A CommandBinding 啟用此元素的指令處理,並宣告指令、其事件與該元素所附加的處理器之間的連結。 (繼承來源 UIElement) |
| Content |
取得或設定用於產生子元素 ContentPresenter的資料。 |
| ContentSource |
取得或設定自動別名期間要使用的基底名稱。 |
| ContentStringFormat |
取得或設定一個複合字串,指定若以字串形式顯示的 Content 屬性,該格式化該方式。 |
| ContentTemplate |
取得或設定用來顯示控件內容的範本。 |
| ContentTemplateSelector |
取得或設定 , DataTemplateSelector使應用程式撰寫者能提供自訂邏輯,選擇用於顯示控制項內容的範本。 |
| ContextMenu |
取得或設定每當透過使用者介面 (UI) 從這個專案內要求操作功能表時,應該出現的操作功能表元素。 (繼承來源 FrameworkElement) |
| Cursor |
取得或設定游標,這個游標會在滑鼠指標位於這個專案上方時顯示。 (繼承來源 FrameworkElement) |
| DataContext |
取得或設定專案參與數據系結時的數據內容。 (繼承來源 FrameworkElement) |
| DefaultStyleKey |
取得或設定索引鍵,當使用或定義主題樣式時,用來參考這個控件的樣式。 (繼承來源 FrameworkElement) |
| DependencyObjectType |
會取得 DependencyObjectType 包裹此實例 CLR 類型的 。 (繼承來源 DependencyObject) |
| DesiredSize |
取得此元素在版面配置程式量值階段期間計算的大小。 (繼承來源 UIElement) |
| Dispatcher |
了解 Dispatcher 這與此 DispatcherObject 有關。 (繼承來源 DispatcherObject) |
| Effect |
取得或設定點陣效應套用到 UIElement。 這是相依性屬性。 (繼承來源 UIElement) |
| FlowDirection |
取得或設定文字和其他使用者介面 (UI) 元素在控制其配置的任何父元素內流動的方向。 (繼承來源 FrameworkElement) |
| Focusable |
取得或設定值,這個值表示專案是否可以接收焦點。 這是相依性屬性。 (繼承來源 UIElement) |
| FocusVisualStyle |
取得或設定屬性,這個屬性可讓您自定義在擷取鍵盤焦點時套用至這個項目的外觀、效果或其他樣式特性。 (繼承來源 FrameworkElement) |
| ForceCursor |
取得或設定一個值,指示是否 FrameworkElement 應該強制使用者介面(UI)依照屬性宣告 Cursor 的方式渲染游標。 (繼承來源 FrameworkElement) |
| HasAnimatedProperties |
取得值,指出這個專案是否有任何動畫屬性。 (繼承來源 UIElement) |
| HasEffectiveKeyboardFocus |
會得到一個表示你 UIElement 是否有焦點的值。 (繼承來源 UIElement) |
| Height |
取得或設定項目的建議高度。 (繼承來源 FrameworkElement) |
| HorizontalAlignment |
取得或設定在父元素內撰寫時套用至這個專案的水準對齊特性,例如面板或專案控件。 (繼承來源 FrameworkElement) |
| InheritanceBehavior |
取得或設定屬性值繼承、資源索引鍵查閱和 RelativeSource FindAncestor 查閱的範圍限制。 (繼承來源 FrameworkElement) |
| InputBindings |
取得與這個專案相關聯的輸入系結集合。 (繼承來源 UIElement) |
| InputScope |
取得或設定此輸入的 FrameworkElement上下文。 (繼承來源 FrameworkElement) |
| IsArrangeValid |
取得值,指出這個元素配置中子元素的計算大小和位置是否有效。 (繼承來源 UIElement) |
| IsEnabled |
取得或設定值,指出使用者介面 (UI) 中是否啟用這個專案。 這是相依性屬性。 (繼承來源 UIElement) |
| IsEnabledCore |
得到一個值,該值在衍生類別中成為的 IsEnabled 回傳值。 (繼承來源 UIElement) |
| IsFocused |
取得值,這個值會判斷這個專案是否具有邏輯焦點。 這是相依性屬性。 (繼承來源 UIElement) |
| IsHitTestVisible |
取得或設定值,這個值會宣告這個元素是否可以從其轉譯內容的某些部分傳回作為點擊測試結果。 這是相依性屬性。 (繼承來源 UIElement) |
| IsInitialized |
會獲得一個值,表示該元素是否已被初始化,無論是在 XAML 處理器處理過程中,或是明確呼叫其 EndInit() 方法時。 (繼承來源 FrameworkElement) |
| IsInputMethodEnabled |
取得值,指出是否啟用輸入法編輯器 (IME) 等輸入法系統來處理這個項目的輸入。 (繼承來源 UIElement) |
| IsKeyboardFocused |
取得值,指出這個專案是否具有鍵盤焦點。 這是相依性屬性。 (繼承來源 UIElement) |
| IsKeyboardFocusWithin |
取得值,指出鍵盤焦點是否位於專案或其可視化樹狀結構子專案內的任何位置。 這是相依性屬性。 (繼承來源 UIElement) |
| IsLoaded |
取得值,這個值表示是否已載入這個專案以供簡報使用。 (繼承來源 FrameworkElement) |
| IsManipulationEnabled |
取得或設定一個值,指示操作事件是否在此啟用 UIElement。 (繼承來源 UIElement) |
| IsMeasureValid |
取得值,指出配置量值傳回的目前大小是否有效。 (繼承來源 UIElement) |
| IsMouseCaptured |
取得值,指出是否將滑鼠擷取至這個專案。 這是相依性屬性。 (繼承來源 UIElement) |
| IsMouseCaptureWithin |
取得值,這個值會決定滑鼠擷取是由這個專案或子專案在其可視化樹狀結構中保留。 這是相依性屬性。 (繼承來源 UIElement) |
| IsMouseDirectlyOver |
取得值,這個值表示滑鼠指標的位置是否對應至點擊測試結果,以將元素組合納入考慮。 這是相依性屬性。 (繼承來源 UIElement) |
| IsMouseOver |
取得值,指出滑鼠指標是否位於這個專案上方(包括可視化樹狀結構中的子專案)。 這是相依性屬性。 (繼承來源 UIElement) |
| IsSealed |
取得值,這個值表示這個實例目前是否為密封狀態(只讀)。 (繼承來源 DependencyObject) |
| IsStylusCaptured |
取得值,指出手寫筆是否由這個專案擷取。 這是相依性屬性。 (繼承來源 UIElement) |
| IsStylusCaptureWithin |
取得值,這個值會判斷手寫筆擷取是由這個專案所保存,還是專案界限及其可視化樹狀結構內的專案。 這是相依性屬性。 (繼承來源 UIElement) |
| IsStylusDirectlyOver |
取得值,這個值表示手寫筆位置是否對應至點擊測試結果,這會考慮元素組合。 這是相依性屬性。 (繼承來源 UIElement) |
| IsStylusOver |
取得值,指出手寫筆游標是否位於這個專案上(包括視覺子專案)。 這是相依性屬性。 (繼承來源 UIElement) |
| IsVisible |
取得值,指出這個元素是否顯示在使用者介面 (UI) 中。 這是相依性屬性。 (繼承來源 UIElement) |
| Language |
取得或設定套用至 專案的當地語系化/全球化語言資訊。 (繼承來源 FrameworkElement) |
| LayoutTransform |
取得或設定執行版面配置時,應該套用至這個項目的圖形轉換。 (繼承來源 FrameworkElement) |
| LogicalChildren |
取得這個專案之邏輯子專案的列舉值。 (繼承來源 FrameworkElement) |
| Margin |
取得或設定專案的外部邊界。 (繼承來源 FrameworkElement) |
| MaxHeight |
取得或設定專案的最大高度條件約束。 (繼承來源 FrameworkElement) |
| MaxWidth |
取得或設定專案的最大寬度條件約束。 (繼承來源 FrameworkElement) |
| MinHeight |
取得或設定專案的最低高度條件約束。 (繼承來源 FrameworkElement) |
| MinWidth |
取得或設定專案的最小寬度條件約束。 (繼承來源 FrameworkElement) |
| Name |
取得或設定項目的識別名稱。 此名稱會提供參考,讓程式代碼後置,例如事件處理程式程式代碼,可以在 XAML 處理器在處理期間建構標記專案之後參考它。 (繼承來源 FrameworkElement) |
| Opacity |
在使用者介面(UI)渲染時,取得或設定對整體 UIElement 套用的不透明度因子。 這是相依性屬性。 (繼承來源 UIElement) |
| OpacityMask |
取得或設定不透明度遮罩,作為 Brush 一套實作,適用於該元素渲染內容的任意 alpha 通道遮罩。 這是相依性屬性。 (繼承來源 UIElement) |
| OverridesDefaultStyle |
取得或設定值,這個值表示這個專案是否包含主題樣式的樣式屬性。 (繼承來源 FrameworkElement) |
| Parent |
取得這個項目的邏輯父元素。 (繼承來源 FrameworkElement) |
| PersistId |
已淘汰.
取得可唯一識別這個專案的值。 (繼承來源 UIElement) |
| RecognizesAccessKey |
取得或設定一個值,指示是否 ContentPresenter 應該在其風格中使用 AccessText 。 |
| RenderSize |
取得這個元素的最終轉譯大小(或設定)。 (繼承來源 UIElement) |
| RenderTransform |
取得或設定會影響這個項目轉譯位置的轉換資訊。 這是相依性屬性。 (繼承來源 UIElement) |
| RenderTransformOrigin |
取得或設定任何可能渲染轉換的中心點,該轉換由 宣 RenderTransform告 ,相對於元素的邊界。 這是相依性屬性。 (繼承來源 UIElement) |
| Resources |
取得或設定本機定義的資源字典。 (繼承來源 FrameworkElement) |
| SnapsToDevicePixels |
取得或設定值,這個值會決定這個元素的轉譯是否應該在轉譯期間使用裝置特定的像素設定。 這是相依性屬性。 (繼承來源 UIElement) |
| Style |
取得或設定這個元素在轉譯時所使用的樣式。 (繼承來源 FrameworkElement) |
| StylusPlugIns |
取得與這個項目相關聯的所有手寫筆外掛程式(自定義)物件的集合。 (繼承來源 UIElement) |
| Tag |
取得或設定可用來儲存這個專案之自定義資訊的任意物件值。 (繼承來源 FrameworkElement) |
| TemplatedParent |
取得這個專案之範本父系的參考。 如果元素不是透過範本建立,則此屬性不相關。 (繼承來源 FrameworkElement) |
| ToolTip |
取得或設定使用者介面 (UI) 中這個元素所顯示的工具提示物件。 (繼承來源 FrameworkElement) |
| TouchesCaptured |
取得擷取至這個專案的所有觸控裝置。 (繼承來源 UIElement) |
| TouchesCapturedWithin |
取得擷取至這個專案的所有觸控裝置,或其可視化樹狀結構中的任何子專案。 (繼承來源 UIElement) |
| TouchesDirectlyOver |
取得位於這個專案上的所有觸控裝置。 (繼承來源 UIElement) |
| TouchesOver |
取得位於這個元素上的所有觸控裝置或其可視化樹狀結構中的任何子專案。 (繼承來源 UIElement) |
| Triggers |
取得直接在此專案或子專案上建立的觸發程式集合。 (繼承來源 FrameworkElement) |
| Uid |
取得或設定這個專案的唯一標識碼(用於當地語系化)。 這是相依性屬性。 (繼承來源 UIElement) |
| UseLayoutRounding |
取得或設定值,這個值表示配置四捨五入是否應該套用至配置期間這個專案的大小和位置。 (繼承來源 FrameworkElement) |
| VerticalAlignment |
取得或設定在父元素內,例如面板或專案控件的父元素內時,套用至這個專案的垂直對齊特性。 (繼承來源 FrameworkElement) |
| Visibility |
取得或設定這個項目的使用者介面 (UI) 可見性。 這是相依性屬性。 (繼承來源 UIElement) |
| VisualBitmapEffect |
已淘汰.
已淘汰.
取得或設定 BitmapEffect 的值。Visual (繼承來源 Visual) |
| VisualBitmapEffectInput |
已淘汰.
已淘汰.
取得或設定 BitmapEffectInput 的值。Visual (繼承來源 Visual) |
| VisualBitmapScalingMode |
取得或設定 BitmapScalingMode 。Visual (繼承來源 Visual) |
| VisualCacheMode |
取得或設定 的快取表示 Visual。 (繼承來源 Visual) |
| VisualChildrenCount |
取得這個專案內的視覺子項目數目。 (繼承來源 FrameworkElement) |
| VisualClearTypeHint |
取得或設定 ,ClearTypeHint決定 ClearType 在 中如何被渲染。Visual (繼承來源 Visual) |
| VisualClip |
會取得或設定 的 Visual 剪輯區域作為 Geometry 一個值。 (繼承來源 Visual) |
| VisualEdgeMode |
取得或設定 的 Visual 邊模態作為 EdgeMode 一個值。 (繼承來源 Visual) |
| VisualEffect |
取得或設定點陣效應套用到 Visual。 (繼承來源 Visual) |
| VisualOffset |
取得或設定視覺物件的位移值。 (繼承來源 Visual) |
| VisualOpacity |
取得或設定 的不透明度 Visual。 (繼承來源 Visual) |
| VisualOpacityMask |
取得或設定 Brush 代表不 Visual透明度遮罩的值。 (繼承來源 Visual) |
| VisualParent |
取得可視化物件的可視化樹狀結構父代。 (繼承來源 Visual) |
| VisualScrollableAreaClip |
為 取得或設定一個可切換的可捲動區域。Visual (繼承來源 Visual) |
| VisualTextHintingMode |
取得或設定 TextHintingMode 的 Visual。 (繼承來源 Visual) |
| VisualTextRenderingMode |
取得或設定 TextRenderingMode 的 Visual。 (繼承來源 Visual) |
| VisualTransform | (繼承來源 Visual) |
| VisualXSnappingGuidelines |
取得或設定 x 座標 (垂直) 指導方針集合。 (繼承來源 Visual) |
| VisualYSnappingGuidelines |
取得或設定 Y 座標 (水平) 指導方針集合。 (繼承來源 Visual) |
| Width |
取得或設定項目的寬度。 (繼承來源 FrameworkElement) |
方法
事件
| 名稱 | Description |
|---|---|
| ContextMenuClosing |
發生於專案上的任何操作功能表關閉之前。 (繼承來源 FrameworkElement) |
| ContextMenuOpening |
發生於開啟專案上的任何操作功能表時。 (繼承來源 FrameworkElement) |
| DataContextChanged |
發生於這個項目的數據內容變更時。 (繼承來源 FrameworkElement) |
| DragEnter |
當輸入系統報告具有此元素作為拖曳目標的基礎拖曳事件時發生。 (繼承來源 UIElement) |
| DragLeave |
當輸入系統報告具有此元素作為拖曳原點的基礎拖曳事件時發生。 (繼承來源 UIElement) |
| DragOver |
當輸入系統報告基礎拖曳事件時,此專案會作為潛在的置放目標發生。 (繼承來源 UIElement) |
| Drop |
當輸入系統報告具有這個項目作為置放目標的基礎置放事件時發生。 (繼承來源 UIElement) |
| FocusableChanged |
發生於 Focusable 屬性的值變更時。 (繼承來源 UIElement) |
| GiveFeedback |
當輸入系統報告涉及這個項目的基礎拖放事件時發生。 (繼承來源 UIElement) |
| GotFocus |
發生於這個專案取得邏輯焦點時。 (繼承來源 UIElement) |
| GotKeyboardFocus |
發生於鍵盤焦點放在這個專案上時。 (繼承來源 UIElement) |
| GotMouseCapture |
發生於這個專案擷取滑鼠時。 (繼承來源 UIElement) |
| GotStylusCapture |
發生於這個專案擷取手寫筆時。 (繼承來源 UIElement) |
| GotTouchCapture |
發生於擷取至這個項目的觸控時。 (繼承來源 UIElement) |
| Initialized |
當初始化時 FrameworkElement 會發生。 此事件與財產價值 IsInitialized 從 |
| IsEnabledChanged |
當該元素屬性的值 IsEnabled 改變時,會發生這種情況。 (繼承來源 UIElement) |
| IsHitTestVisibleChanged |
當依賴性質對該元素的值 IsHitTestVisible 改變時,會發生這種情況。 (繼承來源 UIElement) |
| IsKeyboardFocusedChanged |
當該屬性在此元素上的價值 IsKeyboardFocused 改變時,就會發生這種情況。 (繼承來源 UIElement) |
| IsKeyboardFocusWithinChanged |
當該屬性在此元素上的價值 IsKeyboardFocusWithin 改變時,就會發生這種情況。 (繼承來源 UIElement) |
| IsMouseCapturedChanged |
當該屬性在此元素上的價值 IsMouseCaptured 改變時,就會發生這種情況。 (繼承來源 UIElement) |
| IsMouseCaptureWithinChanged |
當該元素的值 IsMouseCaptureWithinProperty 改變時,會發生這種情況。 (繼承來源 UIElement) |
| IsMouseDirectlyOverChanged |
當該屬性在此元素上的價值 IsMouseDirectlyOver 改變時,就會發生這種情況。 (繼承來源 UIElement) |
| IsStylusCapturedChanged |
當該屬性在此元素上的價值 IsStylusCaptured 改變時,就會發生這種情況。 (繼承來源 UIElement) |
| IsStylusCaptureWithinChanged |
當該屬性在此元素上的價值 IsStylusCaptureWithin 改變時,就會發生這種情況。 (繼承來源 UIElement) |
| IsStylusDirectlyOverChanged |
當該屬性在此元素上的價值 IsStylusDirectlyOver 改變時,就會發生這種情況。 (繼承來源 UIElement) |
| IsVisibleChanged |
當該屬性在此元素上的價值 IsVisible 改變時,就會發生這種情況。 (繼承來源 UIElement) |
| KeyDown |
當焦點位於這個專案上時按下按鍵時發生。 (繼承來源 UIElement) |
| KeyUp |
當焦點位於這個專案上時釋放索引鍵時發生。 (繼承來源 UIElement) |
| LayoutUpdated |
當與當前 Dispatcher 相關的各種視覺元素的佈局改變時,會發生這種情況。 (繼承來源 UIElement) |
| Loaded |
發生於專案配置、轉譯及準備好進行互動時。 (繼承來源 FrameworkElement) |
| LostFocus |
發生於這個專案失去邏輯焦點時。 (繼承來源 UIElement) |
| LostKeyboardFocus |
當鍵盤不再聚焦於這個項目時發生。 (繼承來源 UIElement) |
| LostMouseCapture |
發生於這個專案失去滑鼠擷取時。 (繼承來源 UIElement) |
| LostStylusCapture |
發生於這個專案失去手寫筆擷取時。 (繼承來源 UIElement) |
| LostTouchCapture |
發生於這個專案失去觸控擷取時。 (繼承來源 UIElement) |
| ManipulationBoundaryFeedback |
發生於操作遇到界限時。 (繼承來源 UIElement) |
| ManipulationCompleted |
當對物體完成操作與慣性 UIElement 時,會發生這種情況。 (繼承來源 UIElement) |
| ManipulationDelta |
當輸入裝置在操作期間變更位置時發生。 (繼承來源 UIElement) |
| ManipulationInertiaStarting |
當輸入裝置在操作過程中失去與物體 UIElement 接觸,慣性開始時,就會發生這種情況。 (繼承來源 UIElement) |
| ManipulationStarted |
當輸入裝置開始對 UIElement 物件進行操作時,會發生這種情況。 (繼承來源 UIElement) |
| ManipulationStarting |
第一次建立操作處理器時發生。 (繼承來源 UIElement) |
| MouseDown |
發生於指標位於這個專案上方時按下任何滑鼠按鈕時。 (繼承來源 UIElement) |
| MouseEnter |
發生於滑鼠指標進入這個專案的界限時。 (繼承來源 UIElement) |
| MouseLeave |
發生於滑鼠指標離開這個項目的界限時。 (繼承來源 UIElement) |
| MouseLeftButtonDown |
當滑鼠指標位於這個專案上方時按下滑鼠左鍵時發生。 (繼承來源 UIElement) |
| MouseLeftButtonUp |
當滑鼠指標位於這個專案上方時放開滑鼠左鍵時發生。 (繼承來源 UIElement) |
| MouseMove |
發生於滑鼠指標在這個專案上方移動時。 (繼承來源 UIElement) |
| MouseRightButtonDown |
發生於滑鼠指標位於這個專案上方時按下滑鼠右鍵時。 (繼承來源 UIElement) |
| MouseRightButtonUp |
發生於滑鼠指標位於這個專案上方時放開滑鼠右鍵時。 (繼承來源 UIElement) |
| MouseUp |
發生於此元素上放開任何滑鼠按鈕時。 (繼承來源 UIElement) |
| MouseWheel |
當使用者在滑鼠指標位於這個專案上方時旋轉滑鼠滾輪時發生。 (繼承來源 UIElement) |
| PreviewDragEnter |
當輸入系統報告具有此元素作為拖曳目標的基礎拖曳事件時發生。 (繼承來源 UIElement) |
| PreviewDragLeave |
當輸入系統報告具有此元素作為拖曳原點的基礎拖曳事件時發生。 (繼承來源 UIElement) |
| PreviewDragOver |
當輸入系統報告基礎拖曳事件時,此專案會作為潛在的置放目標發生。 (繼承來源 UIElement) |
| PreviewDrop |
當輸入系統報告具有這個項目作為置放目標的基礎置放事件時發生。 (繼承來源 UIElement) |
| PreviewGiveFeedback |
發生於啟動拖放作業時。 (繼承來源 UIElement) |
| PreviewGotKeyboardFocus |
發生於鍵盤焦點放在這個專案上時。 (繼承來源 UIElement) |
| PreviewKeyDown |
當焦點位於這個專案上時按下按鍵時發生。 (繼承來源 UIElement) |
| PreviewKeyUp |
當焦點位於這個專案上時釋放索引鍵時發生。 (繼承來源 UIElement) |
| PreviewLostKeyboardFocus |
當鍵盤不再聚焦於這個項目時發生。 (繼承來源 UIElement) |
| PreviewMouseDown |
發生於指標位於這個專案上方時按下任何滑鼠按鈕時。 (繼承來源 UIElement) |
| PreviewMouseLeftButtonDown |
當滑鼠指標位於這個專案上方時按下滑鼠左鍵時發生。 (繼承來源 UIElement) |
| PreviewMouseLeftButtonUp |
當滑鼠指標位於這個專案上方時放開滑鼠左鍵時發生。 (繼承來源 UIElement) |
| PreviewMouseMove |
當滑鼠指標位於這個專案上方時,滑鼠指標移動時發生。 (繼承來源 UIElement) |
| PreviewMouseRightButtonDown |
發生於滑鼠指標位於這個專案上方時按下滑鼠右鍵時。 (繼承來源 UIElement) |
| PreviewMouseRightButtonUp |
發生於滑鼠指標位於這個專案上方時放開滑鼠右鍵時。 (繼承來源 UIElement) |
| PreviewMouseUp |
發生於滑鼠指標位於這個專案上方時放開任何滑鼠按鈕時。 (繼承來源 UIElement) |
| PreviewMouseWheel |
當使用者在滑鼠指標位於這個專案上方時旋轉滑鼠滾輪時發生。 (繼承來源 UIElement) |
| PreviewQueryContinueDrag |
發生於拖放作業期間鍵盤或滑鼠按鈕狀態有所變更時。 (繼承來源 UIElement) |
| PreviewStylusButtonDown |
當指標位於這個專案上方時按下手寫筆按鈕時發生。 (繼承來源 UIElement) |
| PreviewStylusButtonUp |
當指標位於這個專案上方時放開手寫筆按鈕時發生。 (繼承來源 UIElement) |
| PreviewStylusDown |
當手寫筆在這個專案上方觸碰數位板時發生。 (繼承來源 UIElement) |
| PreviewStylusInAirMove |
當手寫筆在元素上移動而不實際接觸數位板時發生。 (繼承來源 UIElement) |
| PreviewStylusInRange |
當手寫筆足夠接近數位板時發生,而在這個元素上。 (繼承來源 UIElement) |
| PreviewStylusMove |
當手寫筆在 專案上方移動時發生。 觸控筆必須在數位化器偵測到時移動才能提升此事件,否則會 PreviewStylusInAirMove 被提升。 (繼承來源 UIElement) |
| PreviewStylusOutOfRange |
當手寫筆離數位板太遠而無法偵測時發生。 (繼承來源 UIElement) |
| PreviewStylusSystemGesture |
發生於使用者執行數個手寫筆手勢之一時。 (繼承來源 UIElement) |
| PreviewStylusUp |
當使用者在手寫筆超過這個專案時,將手寫筆從數位板上引發手寫筆時發生。 (繼承來源 UIElement) |
| PreviewTextInput |
發生於這個專案以與裝置無關的方式取得文字時。 (繼承來源 UIElement) |
| PreviewTouchDown |
當手指位於這個專案上方時,手指觸碰螢幕時發生。 (繼承來源 UIElement) |
| PreviewTouchMove |
當手指位於這個專案上方時,手指在螢幕上移動時發生。 (繼承來源 UIElement) |
| PreviewTouchUp |
當手指位於這個專案上方時,手指從螢幕上抬起時發生。 (繼承來源 UIElement) |
| QueryContinueDrag |
發生於拖放作業期間鍵盤或滑鼠按鈕狀態有所變更時。 (繼承來源 UIElement) |
| QueryCursor |
發生於要求顯示游標時。 每次滑鼠指標移至新位置時,都會在元素上引發這個事件,這表示游標物件可能需要根據其新位置變更。 (繼承來源 UIElement) |
| RequestBringIntoView |
當 對此元素被調用時 BringIntoView(Rect) ,會發生。 (繼承來源 FrameworkElement) |
| SizeChanged |
當ActualHeightActualWidth該元素的屬性值改變時,會發生這種情況。 (繼承來源 FrameworkElement) |
| SourceUpdated |
發生於這個專案上任何現有屬性系結的來源值變更時。 (繼承來源 FrameworkElement) |
| StylusButtonDown |
當指標位於這個專案上方時按下手寫筆按鈕時發生。 (繼承來源 UIElement) |
| StylusButtonUp |
當指標位於這個專案上方時放開手寫筆按鈕時發生。 (繼承來源 UIElement) |
| StylusDown |
當手寫筆觸碰數位板時,手寫筆位於這個專案上方時發生。 (繼承來源 UIElement) |
| StylusEnter |
當手寫筆進入這個專案的界限時發生。 (繼承來源 UIElement) |
| StylusInAirMove |
當手寫筆在元素上移動而不實際接觸數位板時發生。 (繼承來源 UIElement) |
| StylusInRange |
當手寫筆足夠接近數位板時發生,而在這個元素上。 (繼承來源 UIElement) |
| StylusLeave |
當手寫筆離開專案的界限時發生。 (繼承來源 UIElement) |
| StylusMove |
手寫筆在這個項目上移動時發生。 手寫筆必須在數位板上移動,才能引發此事件。 否則, StylusInAirMove 則是升高。 (繼承來源 UIElement) |
| StylusOutOfRange |
發生於手寫筆離數位板太遠而無法偵測到此元素時。 (繼承來源 UIElement) |
| StylusSystemGesture |
發生於使用者執行數個手寫筆手勢之一時。 (繼承來源 UIElement) |
| StylusUp |
當使用者在這個元素上方時,將手寫筆從數位板上引發時發生。 (繼承來源 UIElement) |
| TargetUpdated |
發生於這個專案上任何屬性系結的目標值變更時。 (繼承來源 FrameworkElement) |
| TextInput |
發生於這個專案以與裝置無關的方式取得文字時。 (繼承來源 UIElement) |
| ToolTipClosing |
發生於專案上的任何工具提示關閉之前。 (繼承來源 FrameworkElement) |
| ToolTipOpening |
在開啟專案的任何工具提示時發生。 (繼承來源 FrameworkElement) |
| TouchDown |
當手指位於這個專案上方時,手指觸碰螢幕時發生。 (繼承來源 UIElement) |
| TouchEnter |
發生於觸控從外部移至這個專案界限內時。 (繼承來源 UIElement) |
| TouchLeave |
當觸控從內部移至這個專案界限外時發生。 (繼承來源 UIElement) |
| TouchMove |
當手指位於這個專案上方時,手指在螢幕上移動時發生。 (繼承來源 UIElement) |
| TouchUp |
當手指位於這個專案上方時,手指從螢幕上抬起時發生。 (繼承來源 UIElement) |
| Unloaded |
發生於從已載入專案的專案樹狀結構中移除專案時。 (繼承來源 FrameworkElement) |
明確介面實作
| 名稱 | Description |
|---|---|
| IQueryAmbient.IsAmbientPropertyAvailable(String) |
關於此成員的描述,請參見方法。IsAmbientPropertyAvailable(String) (繼承來源 FrameworkElement) |