private void OnItemsSourceChanged(DependencyObject sender, DependencyProperty dp) { groupCollection = null; if (this.ItemsSource != null && ItemsSource is IGroupCollection) { groupCollection = (ItemsSource as IGroupCollection); } if (groupHeadersCanvas != null) { groupHeadersCanvas.Children.Clear(); } foreach (var item in groupDic) { item.Value.VisualElement.ClearValue(ContentControl.ContentTemplateProperty); item.Value.TempElement.ClearValue(ContentControl.ContentTemplateProperty); } groupDic.Clear(); if (currentTopGroupHeader != null) { currentTopGroupHeader.DataContext = null; currentTopGroupHeader.Visibility = Visibility.Collapsed; } groupHeaderDelta = 30; defaultListViewItemMargin = new Thickness(0); isGotoGrouping = false; groupheaders.Clear(); }
private void OnItemsSourceChanged(DependencyObject sender, DependencyProperty dp) { if (this.ItemsSource != null && ItemsSource is IGroupCollection) { groupCollection = (ItemsSource as IGroupCollection); } if (groupHeadersGrid != null) { groupHeadersGrid.Children.Clear(); } groupDic.Clear(); if (currentTopGroupHeader != null) { currentTopGroupHeader.DataContext = null; currentTopGroupHeader.Visibility = Visibility.Collapsed; if (groupHeadersGrid != null) { groupHeadersGrid.Children.Add(currentTopGroupHeader); } } else { if (groupHeadersGrid != null) { currentTopGroupHeader = CreateGroupHeader(null); currentTopGroupHeader.Visibility = Visibility.Collapsed; groupHeadersGrid.Children.Add(currentTopGroupHeader); } } }
public DefaultAddGroupElementCommand(GroupName defaultName, IConditional <string, GroupName> names, IGroupCollection <T> collection) : base(new AddGroupElementCommand <T>(collection, new GroupName <T>(defaultName, names)) .ToSelect() .UnlessIsOf(new GroupingAwareCommand <T>(collection).ToSelect()) .ToCommand()) { }
/// <summary> /// Return matching groups /// </summary> /// <param name="col"></param> /// <param name="properties"></param> /// <returns></returns> private IGroupCollection FilterGroupCollection(IGroupCollection col, IDictionary <string, object> properties) { GroupCollection retCol = new GroupCollection(); foreach (IGroup item in col) { if (Match(item.Properties, properties)) { retCol.Add(item); } } return(retCol); }
internal void OnItemsSourceChanged() { if (this.ItemsSource != null && ItemsSource is IGroupCollection) { groupCollection = (ItemsSource as IGroupCollection); } if (groupHeadersGrid != null) { groupHeadersGrid.Children.Clear(); } visibleGroupHeaders.Clear(); base.ItemsSource = this.ItemsSource; }
private void OnItemsSourceChanged(DependencyObject sender, DependencyProperty dp) { groupCollection = null; if (this.ItemsSource != null && ItemsSource is IGroupCollection) { groupCollection = (ItemsSource as IGroupCollection); } if (currentTopGroupHeader != null) { currentTopGroupHeader.DataContext = null; currentTopGroupHeader.Visibility = Visibility.Collapsed; } }
IGroupCollection IRoleProvider.FindGroups(string userName, IDictionary <string, object> properties) { //Connect to webservice using init value set from config.... BackEndProvider bp = new BackEndProvider(); bp.Initialize(_url); IGroupCollection groups = bp.GetGroups(userName, properties); return(groups); //Implement all other methods that has not been implemented in this sample in the same way.... //Get User/Group objects from back end and return objects that implement IUser/IGroup etc. }
private void OnItemsSourceChanged(DependencyObject sender, DependencyProperty dp) { groupCollection = null; if (this.ItemsSource != null && ItemsSource is IGroupCollection) { groupCollection = (ItemsSource as IGroupCollection); } if (currentTopGroupHeader != null) { currentTopGroupHeader.DataContext = null; currentTopGroupHeader.Visibility = Visibility.Collapsed; } groupheaders.Clear(); }
public AddGroupElementCommand(IGroupCollection <T> collection, ISelect <T, GroupName> name) : this(name.Select(collection).Select(ItemCommands <T> .Default)) { }
public static IPagedCollection <IGroup> Execute(this IGroupCollection groups) { return(AsyncHelper.RunSync(async() => await groups.ExecuteAsync())); }
public static async Task <IEnumerable <IGroup> > ByDisplayNamesAsync(this IGroupCollection groups, params string[] displayNames) { return(await groups.OfType <IGroup>().ByDisplayNamesAsync(displayNames).ConfigureAwait(false)); }
public static IEnumerable <IGroup> ByDisplayNames(this IGroupCollection groups, params string[] displayNames) { return(groups.OfType <IGroup>().ByDisplayNames(displayNames)); }
public GroupingAwareCommand(IGroupCollection <T> collection) => _collection = collection;