SizeChangedEventArgs 類別

定義

提供 與 FrameworkElement.SizeChanged 事件相關的資料。

public ref class SizeChangedEventArgs sealed : RoutedEventArgs
/// [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 SizeChangedEventArgs final : RoutedEventArgs
[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 sealed class SizeChangedEventArgs : RoutedEventArgs
Public NotInheritable Class SizeChangedEventArgs
Inherits RoutedEventArgs
繼承
Object Platform::Object IInspectable RoutedEventArgs SizeChangedEventArgs
屬性

備註

PreviousSize值是以元素上的 ActualHeightActualWidth值為基礎,而配置變更會啟發SizeChanged事件。 NewSize值是以 處理版面配置變更後的 和 ActualWidth 值為基礎 ActualHeight

有另一個名為 的事件,該事件 SizeChanged 是由 Window 類別所定義。 Window.SizeChanged的事件處理常式會針對資料使用WindowSizeChangedEventArgs類別。 Window.SizeChanged 可能會發生在 FrameworkElement.SizeChanged 發生的相同情況中;如需詳細資訊,請參閱 FrameworkElement.SizeChanged

屬性

NewSize

取得報告大小變更之 物件的新大小。

OriginalSource

取得引發事件之 物件的參考。 這通常是控制項的範本部分,而不是在應用程式 UI 中宣告的專案。

(繼承來源 RoutedEventArgs)
PreviousSize

取得報告大小變更之物件的先前大小。

適用於

另請參閱