Example #1
0
			private void OnUIAColumnsCollectionChanged (object sender, 
			                                            CollectionChangeEventArgs args)
			{
				if (listView.View != SWF.View.Details)
					return;

				SWF.ColumnHeader column = (SWF.ColumnHeader) args.Element;

				if (args.Action == CollectionChangeAction.Add) {
					ListViewListItemEditProvider editProvider 
						= new ListViewListItemEditProvider (column, this);
					editProvider.Initialize ();
					providers [column] = editProvider;
					AddChildProvider (editProvider);
				} else if (args.Action == CollectionChangeAction.Remove) {
					ListViewListItemEditProvider editProvider;
					if (providers.TryGetValue (column, out editProvider)) {
						RemoveChildProvider (editProvider);
						editProvider.Terminate ();
						providers.Remove (column);
					}
				} else {
					foreach (ListViewListItemEditProvider provider in providers.Values)
						provider.Terminate ();
					providers.Clear ();

					OnNavigationChildrenCleared ();
				}
			}
Example #2
0
			private void AddEditChildren ()
			{
				foreach (SWF.ColumnHeader column in listView.Columns) {
					ListViewListItemEditProvider editProvider 
						= new ListViewListItemEditProvider (column, this);
					editProvider.Initialize ();
					providers [column] = editProvider;

					AddChildProvider (editProvider);
				}
			}