Win10 UWP xaml 延迟加载元素
xaml新增 x:DeferLoadStrategy 里面只有 Lazy ,查询了百度看到MSP_甄心cherish大神说的 xaml使用 x:DeferLoadStrategy="Lazy" 延迟加载元素 我写了代码 <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> <Grid.RowDefinitions> <RowDefinition/> <RowDefinition/> <RowDefinition Height="auto"/> </Grid.RowDefinitions> <Image x:Name="ximg1" Source="/assets/1.jpg" Grid.Row="0" Margin="10,10,10,10"/> <Image x:Name="ximg2" Source="/assets/2.jpg" Grid.Row="1" Margin="10,10,10,10" x:DeferLoadStrategy="Lazy"/> <Button Content="显示" Grid.Row="2" Margin="10,10,10,10" HorizontalAlignment="Right" Click="Button_Click"/> </Grid>