ScrollView.ContentOrientation Properti
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Mendapatkan atau menetapkan nilai yang menunjukkan apakah konten lebih suka menggulir secara horizontal atau vertikal.
public:
property ScrollingContentOrientation ContentOrientation { ScrollingContentOrientation get(); void set(ScrollingContentOrientation value); };
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="ScrollView::s_defaultContentOrientation")]
/// [set: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="ScrollView::s_defaultContentOrientation")]
ScrollingContentOrientation ContentOrientation();
void ContentOrientation(ScrollingContentOrientation value);
/// [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="ScrollView::s_defaultContentOrientation")]
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="ScrollView::s_defaultContentOrientation")]
/// [set: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="ScrollView::s_defaultContentOrientation")]
ScrollingContentOrientation ContentOrientation();
void ContentOrientation(ScrollingContentOrientation value);
public ScrollingContentOrientation ContentOrientation { [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="ScrollView::s_defaultContentOrientation")] get; [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="ScrollView::s_defaultContentOrientation")] set; }
[Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="ScrollView::s_defaultContentOrientation")]
public ScrollingContentOrientation ContentOrientation { [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="ScrollView::s_defaultContentOrientation")] get; [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="ScrollView::s_defaultContentOrientation")] set; }
var scrollingContentOrientation = scrollView.contentOrientation;
scrollView.contentOrientation = scrollingContentOrientation;
Public Property ContentOrientation As ScrollingContentOrientation
Nilai Properti
Arah gulir konten yang disukai. Default adalah Vertical
.
- Atribut
-
Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValueAttribute
Keterangan
Properti ContentOrientation
memengaruhi ScrollPresenter
MeasureOverride
perilaku:
Vertical
Ketika orientasi diterapkan, lebarScrollPresenter.Content
yang tersedia diatur ke lebar yangScrollPresenter
tersedia dari . Jika tidak, lebar yangScrollPresenter.Content
tersedia adalah tak terbatas.Horizontal
Ketika orientasi diterapkan, tinggi yang tersedia diaturScrollPresenter.Content
ke tinggi yang tersedia dariScrollPresenter
. Jika tidak, tinggi yang tersedia adalahScrollPresenter.Content
tak terbatas.
Berlaku untuk
Saran dan Komentar
https://aka.ms/ContentUserFeedback.
Segera hadir: Sepanjang tahun 2024 kami akan menghentikan penggunaan GitHub Issues sebagai mekanisme umpan balik untuk konten dan menggantinya dengan sistem umpan balik baru. Untuk mengetahui informasi selengkapnya, lihat:Kirim dan lihat umpan balik untuk