/// <summary> /// if indexentries.count is zero return /// else fills the index entries /// </summary> /// <param name="o"></param> /// <param name="e"></param> private void OnDataContextChanged(IndexItemsControl o, AvaloniaPropertyChangedEventArgs e) { if (_indexEntries.Count == 0) { CreateBaseSections(); } UpdateData(e.NewValue); }
/// <summary> /// /// </summary> /// <param name="o"></param> /// <param name="e"></param> private void OnShowEmptyItemsChanged(IndexItemsControl o, AvaloniaPropertyChangedEventArgs e) { if (_contentIndexList == null || e.NewValue == null) { return; } _contentIndexList.ShowEmptyItems = (bool)e.NewValue; }
/// <summary> /// clears the <see cref="_indexEntries"/> /// and raises the datacontext changed event /// </summary> /// <param name="o"></param> /// <param name="e"></param> private void OnIndexSectionItemsChanged(IndexItemsControl o, object e) { CreateBaseSections(); UpdateData(DataContext); }