ScrollChangedEventArgs.ViewportHeight プロパティ
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
ScrollViewer のビューポートの高さの更新された値を取得します。
public:
property double ViewportHeight { double get(); };
public double ViewportHeight { get; }
member this.ViewportHeight : double
Public ReadOnly Property ViewportHeight As Double
プロパティ値
ScrollViewer の更新されたビューポートの高さを表す Double。
例
次の例は、 プロパティの値を取得する方法を ViewportHeight 示しています。
private void sChanged(object sender, ScrollChangedEventArgs e)
{
if (svrContent.CanContentScroll == true)
{
tBlock1.Foreground = System.Windows.Media.Brushes.Red;
tBlock1.Text = "ScrollChangedEvent just Occurred";
tBlock2.Text = "ExtentHeight is now " + e.ExtentHeight.ToString();
tBlock3.Text = "ExtentWidth is now " + e.ExtentWidth.ToString();
tBlock4.Text = "ExtentHeightChange was " + e.ExtentHeightChange.ToString();
tBlock5.Text = "ExtentWidthChange was " + e.ExtentWidthChange.ToString();
tBlock6.Text = "HorizontalOffset is now " + e.HorizontalOffset.ToString();
tBlock7.Text = "VerticalOffset is now " + e.VerticalOffset.ToString();
tBlock8.Text = "HorizontalChange was " + e.HorizontalChange.ToString();
tBlock9.Text = "VerticalChange was " + e.VerticalChange.ToString();
tBlock10.Text = "ViewportHeight is now " + e.ViewportHeight.ToString();
tBlock11.Text = "ViewportWidth is now " + e.ViewportWidth.ToString();
tBlock12.Text = "ViewportHeightChange was " + e.ViewportHeightChange.ToString();
tBlock13.Text = "ViewportWidthChange was " + e.ViewportWidthChange.ToString();
}
else
{
tBlock1.Text = "";
}
Private Sub sChanged(ByVal sender As Object, ByVal args As ScrollChangedEventArgs)
If (sv1.CanContentScroll = True) Then
tBlock1.Foreground = System.Windows.Media.Brushes.Red
tBlock1.Text = "ScrollChangedEvent just Occurred"
tBlock3.Text = "ExtentWidth is now " + args.ExtentWidth.ToString()
tBlock4.Text = "ExtentHeightChange was " + args.ExtentHeightChange.ToString()
tBlock5.Text = "ExtentWidthChange was " + args.ExtentWidthChange.ToString()
tBlock6.Text = "HorizontalOffset is now " + args.HorizontalOffset.ToString()
tBlock7.Text = "VerticalOffset is now " + args.VerticalOffset.ToString()
tBlock8.Text = "HorizontalChange was " + args.HorizontalChange.ToString()
tBlock9.Text = "VerticalChange was " + args.VerticalChange.ToString()
tBlock10.Text = "ViewportHeight is now " + args.ViewportHeight.ToString()
tBlock11.Text = "ViewportWidth is now " + args.ViewportWidth.ToString()
tBlock12.Text = "ViewportHeightChange was " + args.ViewportHeightChange.ToString()
tBlock13.Text = "ViewportWidthChange was " + args.ViewportWidthChange.ToString()
Else
tBlock1.Text = ""
End If
適用対象
GitHub で Microsoft と共同作業する
このコンテンツのソースは GitHub にあります。そこで、issue や pull request を作成および確認することもできます。 詳細については、共同作成者ガイドを参照してください。
.NET