private static async void Target_ContainerContentChanging(Windows.UI.Xaml.Controls.ListViewBase sender, Windows.UI.Xaml.Controls.ContainerContentChangingEventArgs args)
        {
            if (args.Item is IDeferInitialize updatable)
            {
                if (updatable.IsInitialized)
                {
                    return;
                }
                updatable.IsInitialized = true;
                await updatable.DeferInitializeAsync();

                // Handled = trueを指定すると、UIの描画が始まる模様
                // データ受信などが完了してない状態ではHandledを変更しない
                //args.Handled = true;
            }
        }
        private static void Target_ContainerContentChanging(Windows.UI.Xaml.Controls.ListViewBase sender, Windows.UI.Xaml.Controls.ContainerContentChangingEventArgs args)
        {
            var dispatcher = sender.Dispatcher;

            if (args.Item is IDeferInitialize updatable)
            {
                if (updatable.IsInitialized)
                {
                    return;
                }
                updatable.IsInitialized = true;

                _ = dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
                {
                    updatable.DeferInitializeAsync();
                });


                // Handled = trueを指定すると、UIの描画が始まる模様
                // データ受信などが完了してない状態ではHandledを変更しない
                //args.Handled = true;
            }
        }
예제 #3
0
 /// <summary>
 /// Gets the <see cref="DataTemplate"/> associated with the specified <see cref="Windows.UI.Xaml.Controls.ListViewBase"/>
 /// </summary>
 /// <param name="obj">The <see cref="Windows.UI.Xaml.Controls.ListViewBase"/> to get the associated <see cref="DataTemplate"/> from</param>
 /// <returns>The <see cref="DataTemplate"/> associated with the <see cref="Windows.UI.Xaml.Controls.ListViewBase"/></returns>
 public static DataTemplate GetAlternateItemTemplate(Windows.UI.Xaml.Controls.ListViewBase obj)
 {
     return((DataTemplate)obj.GetValue(AlternateItemTemplateProperty));
 }
예제 #4
0
 /// <summary>
 /// Sets the alternate <see cref="Brush"/> associated with the specified <see cref="DependencyObject"/>
 /// </summary>
 /// <param name="obj">The <see cref="Windows.UI.Xaml.Controls.ListViewBase"/> to associate the <see cref="Brush"/> with</param>
 /// <param name="value">The <see cref="Brush"/> for binding to the <see cref="Windows.UI.Xaml.Controls.ListViewBase"/></param>
 public static void SetAlternateColor(Windows.UI.Xaml.Controls.ListViewBase obj, Brush value)
 {
     obj.SetValue(AlternateColorProperty, value);
 }
예제 #5
0
 /// <summary>
 /// Gets the alternate <see cref="Brush"/> associated with the specified <see cref="Windows.UI.Xaml.Controls.ListViewBase"/>
 /// </summary>
 /// <param name="obj">The <see cref="Windows.UI.Xaml.Controls.ListViewBase"/> to get the associated <see cref="Brush"/> from</param>
 /// <returns>The <see cref="Brush"/> associated with the <see cref="Windows.UI.Xaml.Controls.ListViewBase"/></returns>
 public static Brush GetAlternateColor(Windows.UI.Xaml.Controls.ListViewBase obj)
 {
     return((Brush)obj.GetValue(AlternateColorProperty));
 }
예제 #6
0
 /// <summary>
 /// Sets the stretch <see cref="StretchDirection"/> associated with the specified <see cref="Windows.UI.Xaml.Controls.ListViewBase"/>
 /// </summary>
 /// <param name="obj">The <see cref="Windows.UI.Xaml.Controls.ListViewBase"/> to associate the <see cref="StretchDirection"/> with</param>
 /// <param name="value">The <see cref="StretchDirection"/> for binding to the <see cref="Windows.UI.Xaml.Controls.ListViewBase"/></param>
 public static void SetStretchItemContainerDirection(Windows.UI.Xaml.Controls.ListViewBase obj, StretchDirection value)
 {
     obj.SetValue(StretchItemContainerDirectionProperty, value);
 }
예제 #7
0
 /// <summary>
 /// Gets the stretch <see cref="StretchDirection"/> associated with the specified <see cref="Windows.UI.Xaml.Controls.ListViewBase"/>
 /// </summary>
 /// <param name="obj">The <see cref="Windows.UI.Xaml.Controls.ListViewBase"/> to get the associated <see cref="StretchDirection"/> from</param>
 /// <returns>The <see cref="StretchDirection"/> associated with the <see cref="Windows.UI.Xaml.Controls.ListViewBase"/></returns>
 public static StretchDirection GetStretchItemContainerDirection(Windows.UI.Xaml.Controls.ListViewBase obj)
 {
     return((StretchDirection)obj.GetValue(StretchItemContainerDirectionProperty));
 }
예제 #8
0
 /// <summary>
 /// Sets the <see cref="DataTemplate"/> associated with the specified <see cref="Windows.UI.Xaml.Controls.ListViewBase"/>
 /// </summary>
 /// <param name="obj">The <see cref="Windows.UI.Xaml.Controls.ListViewBase"/> to associate the <see cref="DataTemplate"/> with</param>
 /// <param name="value">The <see cref="DataTemplate"/> for binding to the <see cref="Windows.UI.Xaml.Controls.ListViewBase"/></param>
 public static void SetAlternateItemTemplate(Windows.UI.Xaml.Controls.ListViewBase obj, DataTemplate value)
 {
     obj.SetValue(AlternateItemTemplateProperty, value);
 }