WPF ListBox full screen show image and scroll up and down via page up or down key

 <ListBox.ItemTemplate>
     <DataTemplate>
         <Grid> 
             <Image 
                    Source="{Binding ImgUrl}"
                    RenderOptions.BitmapScalingMode="LowQuality"
                    Width="{Binding ActualWidth,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type Window}}}"
                    Height="{Binding ActualHeight,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type Window}}}"/>
         </Grid>
     </DataTemplate>
 </ListBox.ItemTemplate>

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

posted @ 2024-09-23 00:06  FredGrit  阅读(13)  评论(0)    收藏  举报