[英]Get First Visible Index of Itemcontrol in UWP
我正在尝试在UWP的Itemcontrol中获取项目的第一个可见索引。
这是我的XAML
<ItemsControl ItemsSource="{Binding ISODrawingPages}" Tag="{Binding SourceFilePath, Mode=TwoWay}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Image Source="{Binding BitmapImage, Mode=TwoWay}"
Margin="20"
RenderTransformOrigin="0.5,0.5"
Stretch="Uniform"
MaxWidth="{Binding MaxWidth, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}">
<Image.RenderTransform>
<RotateTransform Angle="{Binding DegreeOfRotation, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"/>
</Image.RenderTransform>
</Image>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
我从下面的链接尝试了ItemcontrolExtenion以获取第一个可见索引,但它始终返回索引0,并且我尝试获取所有可见索引,但它也总是返回所有项目
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.