static void OnAutoResizeChangedChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            var lv = d as ListView;

            if (lv == null)
                return;

            if ((bool)e.NewValue)
            {
                var handler = new ItemContainerGenerator_ItemsChangedHander(lv, (_lv) =>
                {
                    if (_lv == null)
                        return;

                    var gv = _lv.View as GridView;

                    if (gv == null)
                        return;

                    foreach (var col in gv.Columns)
                    {
                        if (double.IsNaN(col.Width))
                            col.Width = col.ActualWidth;

                        col.Width = double.NaN;
                    }
                });

                SetINTERNAL_ItemContainerGeneratorEventHandler(lv, handler);
            }
            else
            {
                var handler = GetINTERNAL_ItemContainerGeneratorEventHandler(lv);
                if (handler != null)
                    handler.Dispose();
            }
        }
 static void SetINTERNAL_ItemContainerGeneratorEventHandler(
     System.Windows.Controls.ListView element,
     ItemContainerGenerator_ItemsChangedHander value)
 {
     element.SetValue(INTERNAL_ItemContainerGeneratorEventHandlerProperty, value);
 }