Bagikan melalui


Expander.ExpandDirection Properti

Definisi

Mendapatkan atau menetapkan nilai yang menunjukkan arah di mana area konten diperluas.

Dokumentasi ini berlaku untuk WinUI 2 untuk UWP (untuk WinUI di SDK Aplikasi Windows, lihat namespace SDK Aplikasi Windows).

public:
 property ExpandDirection ExpandDirection { ExpandDirection get(); void set(ExpandDirection value); };
/// [Windows.Foundation.Metadata.Experimental]
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="winrt::ExpandDirection::Down")]
/// [get: Windows.Foundation.Metadata.Experimental]
/// [set: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
/// [set: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="winrt::ExpandDirection::Down")]
/// [set: Windows.Foundation.Metadata.Experimental]
ExpandDirection ExpandDirection();

void ExpandDirection(ExpandDirection value);
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="winrt::ExpandDirection::Down")]
/// [set: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
/// [set: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="winrt::ExpandDirection::Down")]
ExpandDirection ExpandDirection();

void ExpandDirection(ExpandDirection value);
/// [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
/// [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="winrt::ExpandDirection::Down")]
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="winrt::ExpandDirection::Down")]
/// [set: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
/// [set: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="winrt::ExpandDirection::Down")]
ExpandDirection ExpandDirection();

void ExpandDirection(ExpandDirection value);
[Windows.Foundation.Metadata.Experimental]
public ExpandDirection ExpandDirection { [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)] [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="winrt::ExpandDirection::Down")] [Windows.Foundation.Metadata.Experimental] get; [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)] [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="winrt::ExpandDirection::Down")] [Windows.Foundation.Metadata.Experimental] set; }
public ExpandDirection ExpandDirection { [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)] [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="winrt::ExpandDirection::Down")] get; [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)] [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="winrt::ExpandDirection::Down")] set; }
[Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
[Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="winrt::ExpandDirection::Down")]
public ExpandDirection ExpandDirection { [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)] [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="winrt::ExpandDirection::Down")] get; [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)] [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="winrt::ExpandDirection::Down")] set; }
Public Property ExpandDirection As ExpandDirection

Nilai Properti

Nilai enumerasi yang menunjukkan arah di mana area konten diperluas. Defaultnya adalah Down.

Atribut
Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallbackAttribute Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValueAttribute ExperimentalAttribute

Contoh

Tip

Untuk informasi selengkapnya, panduan desain, dan contoh kode, lihat Expander.

Aplikasi Galeri WinUI 3 dan Galeri WinUI 2 mencakup contoh interaktif sebagian besar kontrol, fitur, dan fungsi WinUI 3 dan WinUI 2.

Jika sudah diinstal, buka dengan mengklik tautan berikut: Galeri WinUI 3 atau Galeri WinUI 2.

Jika tidak diinstal, Anda dapat mengunduh Galeri WinUI 3 dan Galeri WinUI 2 dari Microsoft Store.

Anda juga bisa mendapatkan kode sumber untuk keduanya dari GitHub (gunakan cabang utama untuk WinUI 3 dan cabang winui2 untuk WinUI 2).

Keterangan

Kontrol Expander dapat memperluas Up atau Down.

Berlaku untuk