6 types derived from ModelItem
System.Activities.Presentation (6)
System.Activities.Presentation\System\Activities\Presentation\Base\Interaction\Model\ModelItemCollection.cs (2)
34public abstract class ModelItemCollection : ModelItem, IList<ModelItem>, IList, INotifyCollectionChanged {
System.Activities.Presentation\System\Activities\Presentation\Base\Interaction\Model\ModelItemDictionary.cs (3)
37public abstract class ModelItemDictionary : ModelItem, IDictionary<ModelItem, ModelItem>, IDictionary, INotifyCollectionChanged {
System.Activities.Presentation\System\Activities\Presentation\Model\ModelItemImpl.cs (1)
25class ModelItemImpl : ModelItem, IModelTreeItem, ICustomTypeDescriptor, IDynamicMetaObjectProvider
1532 references to ModelItem
System.Activities.Presentation (1532)
Microsoft.Tools.Common\Microsoft\Activities\Presentation\ExpressionSettingHelper.cs (1)
32ModelItem rootItem = modelTreeManager.Root;
System.Activities.Presentation\System\Activities\Presentation\ActivityDelegateInfo.cs (2)
14public ActivityDelegateInfo(ModelItem modelItem, string propertyName) 21public ModelItem ModelItem { get; private set; }
System.Activities.Presentation\System\Activities\Presentation\ActivityDelegatePresenter.cs (11)
27public static readonly DependencyProperty ActivityDelegateProperty = DependencyProperty.Register("ActivityDelegate", typeof(ModelItem), typeof(ActivityDelegatePresenter), new PropertyMetadata(new PropertyChangedCallback(ActivityDelegatePresenter.OnActivityDelegateChanged))); 28public static readonly DependencyProperty HandlerProperty = DependencyProperty.Register("Handler", typeof(ModelItem), typeof(ActivityDelegatePresenter), new PropertyMetadata(new PropertyChangedCallback(ActivityDelegatePresenter.OnHandlerChanged))); 29public static readonly DependencyProperty ArgumentsProperty = DependencyProperty.Register("Arguments", typeof(ObservableCollection<ModelItem>), typeof(ActivityDelegatePresenter)); 43this.Arguments = new ObservableCollection<ModelItem>(); 46public ModelItem Handler 50return (ModelItem)GetValue(HandlerProperty); 59public ModelItem ActivityDelegate 63return (ModelItem)GetValue(ActivityDelegateProperty); 85public ObservableCollection<ModelItem> Arguments 89return (ObservableCollection<ModelItem>)GetValue(ArgumentsProperty); 167ModelItem modelItem = this.EditingContext.Services.GetService<ModelTreeManager>().WrapAsModelItem(instance);
System.Activities.Presentation\System\Activities\Presentation\ActivityDelegateUtilities.cs (1)
64public static List<ActivityDelegateInfo> CreateActivityDelegateInfo(ModelItem activity)
System.Activities.Presentation\System\Activities\Presentation\ActivityDesigner.cs (2)
84this.PopulateActivityDelegates((ModelItem)newItem); 87private void PopulateActivityDelegates(ModelItem modelItem)
System.Activities.Presentation\System\Activities\Presentation\ActivityDesignerOptionsAttribute.cs (1)
34public Func<ModelItem, DrawingBrush> OutlineViewIconProvider
System.Activities.Presentation\System\Activities\Presentation\Annotations\AnnotationManager.cs (2)
24private ModelItem modelItem; 72private ModelItem ModelItem
System.Activities.Presentation\System\Activities\Presentation\Annotations\FloatingAnnotationView.xaml.cs (3)
18public static readonly DependencyProperty ModelItemProperty = DependencyProperty.Register("ModelItem", typeof(ModelItem), typeof(FloatingAnnotationView)); 53public ModelItem ModelItem 55get { return (ModelItem)GetValue(ModelItemProperty); }
System.Activities.Presentation\System\Activities\Presentation\Annotations\IFloatingAnnotation.cs (1)
26ModelItem ModelItem
System.Activities.Presentation\System\Activities\Presentation\Base\Core\GenericTypeParameterConverter.cs (4)
61if (value is ModelItem) 63value = ((ModelItem)value).GetCurrentValue(); 79if (value is ModelItem) 81value = ((ModelItem)value).GetCurrentValue();
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\ExtensibilityAccessor.cs (9)
83ModelItem item = value as ModelItem; 319public static TypeConverter GetTypeConverter(ModelItem item) 531public static List<ModelProperty> GetSubProperties(ModelItem item) 610ModelItem valueItem = property.Value; 723private static List<ModelProperty> GetTypeConverterSubProperties(ModelItem item) 735private static List<ModelProperty> GetTypeConverterSubPropertiesHelper(ModelItem item, TypeConverter customConverter) 785private static List<ModelProperty> GetAllSubProperties(ModelItem item) 855public static T GetAttribute<T>(ModelItem item) where T : Attribute
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\Model\ModelPropertyIndexer.cs (3)
30private ModelItem _modelItem; 45ModelItem modelItem, 234internal ModelItem ModelItem
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\Model\ModelPropertyMerger.cs (6)
42public static IEnumerable<IList<ModelProperty>> GetMergedProperties(IEnumerable<ModelItem> items, int itemCount) 64public static string GetMergedDefaultProperty(IEnumerable<ModelItem> items) 74foreach (ModelItem item in items) 237private IEnumerable<ModelItem> _items; 240public ModelItemExpander(IEnumerable<ModelItem> items, int itemCount) 258foreach (ModelItem item in _items)
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\Model\ModelPropertyValueCollection.cs (14)
47foreach (ModelItem item in collection) 107ModelItem item; 123private PropertyValue InsertExternal(ModelItem item, int index) 139private PropertyValue InsertHelper(ModelItem item, int index) 197private bool RemoveExternal(ModelItem item) 263private void ReplaceExternal(ModelItem oldItem, ModelItem newItem) 448foreach (ModelItem item in e.NewItems) 455foreach (ModelItem item in e.OldItems) 473ModelItem oldItem = e.OldItems[i] as ModelItem; 474ModelItem newItem = e.NewItems[i] as ModelItem; 519private ModelPropertyIndexer CreateModelPropertyIndexer(ModelItem item, int index)
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\PropertyInspector.xaml.cs (13)
48private ModelItem _lastParent; 149ModelItem selection = _displayedSelection.PrimarySelection; 550foreach (ModelItem item in _lastNotifiedSelection.SelectedObjects) 632ModelItem newParent = GetCommonParent(_displayedSelection); 642private static ModelItem GetCommonParent(View.Selection selection) 649ModelItem parent = null; 650foreach (ModelItem item in selection.SelectedObjects) 688IEnumerator<ModelItem> ea = a.SelectedObjects.GetEnumerator(); 689IEnumerator<ModelItem> eb = b.SelectedObjects.GetEnumerator(); 904private static Type FindCommonType(IEnumerable<ModelItem> modelItems) 910foreach (ModelItem selectedItem in modelItems) 926private static bool AreHomogenous(IEnumerable<ModelItem> items) 931foreach (ModelItem item in items)
System.Activities.Presentation\System\Activities\Presentation\Base\Interaction\Model\ModelFactory.cs (4)
35public static ModelItem CreateItem(EditingContext context, Type itemType, params object[] arguments) { 59public static ModelItem CreateItem(EditingContext context, Type itemType, CreateOptions options, params object[] arguments) { 80public static ModelItem CreateItem(EditingContext context, object item) { 104public static ModelItem CreateStaticMemberItem(EditingContext context, Type type, string memberName) {
System.Activities.Presentation\System\Activities\Presentation\Base\Interaction\Model\ModelItem.cs (3)
83public abstract ModelItem Parent { get; } 88public abstract IEnumerable<ModelItem> Parents { get; } 95public abstract ModelItem Root { get; }
System.Activities.Presentation\System\Activities\Presentation\Base\Interaction\Model\ModelItemCollection.cs (14)
49public abstract ModelItem this[int index] { get; set; } 96public abstract void Add(ModelItem item); 106public abstract ModelItem Add(object value); 120public abstract bool Contains(ModelItem item); 134private static ModelItem ConvertType(object value) { 136return (ModelItem)value; 142"value", typeof(ModelItem).FullName))); 155public abstract void CopyTo(ModelItem[] array, int arrayIndex); 161public abstract IEnumerator<ModelItem> GetEnumerator(); 169public abstract int IndexOf(ModelItem item); 180public abstract void Insert(int index, ModelItem item); 192public abstract ModelItem Insert(int index, object value); 219public abstract bool Remove(ModelItem item); 249typeof(IEnumerable<ModelItem>),
System.Activities.Presentation\System\Activities\Presentation\Base\Interaction\Model\ModelItemDictionary.cs (57)
54public abstract ModelItem this[ModelItem key] { get; set; } 66public abstract ModelItem this[object key] { get; set; } 99public abstract ICollection<ModelItem> Keys { get; } 114public abstract ICollection<ModelItem> Values { get; } 127public abstract void Add(ModelItem key, ModelItem value); 138public abstract ModelItem Add(object key, object value); 151protected virtual void CopyTo(KeyValuePair<ModelItem, ModelItem>[] array, int arrayIndex) { 152foreach (KeyValuePair<ModelItem, ModelItem> kv in this) { 160protected virtual bool Contains(KeyValuePair<ModelItem, ModelItem> item) { 161ModelItem value; 170public abstract bool ContainsKey(ModelItem key); 183private static ModelItem ConvertType(object value) { 185return (ModelItem)value; 191"value", typeof(ModelItem).FullName))); 200public abstract IEnumerator<KeyValuePair<ModelItem, ModelItem>> GetEnumerator(); 208public abstract bool Remove(ModelItem key); 225public abstract bool TryGetValue(ModelItem key, out ModelItem value); 234public abstract bool TryGetValue(object key, out ModelItem value); 243typeof(ModelItem), 301foreach (KeyValuePair<ModelItem, ModelItem> kv in this) { 323foreach (KeyValuePair<ModelItem, ModelItem> kv in this) { 355KeyValuePair<ModelItem, ModelItem>[] typedArray = new KeyValuePair<ModelItem, ModelItem>[len]; 394foreach (KeyValuePair<ModelItem, ModelItem> kv in this) { 403void ICollection<KeyValuePair<ModelItem, ModelItem>>.Add(KeyValuePair<ModelItem, ModelItem> item) { 407bool ICollection<KeyValuePair<ModelItem, ModelItem>>.Contains(KeyValuePair<ModelItem, ModelItem> item) { 411void ICollection<KeyValuePair<ModelItem, ModelItem>>.CopyTo(KeyValuePair<ModelItem, ModelItem>[] array, int arrayIndex) { 421bool ICollection<KeyValuePair<ModelItem, ModelItem>>.Remove(KeyValuePair<ModelItem, ModelItem> item) { 422ModelItem value; 438private IEnumerator<KeyValuePair<ModelItem, ModelItem>> _real; 440internal DictionaryEnumerator(IEnumerator<KeyValuePair<ModelItem, ModelItem>> real) {
System.Activities.Presentation\System\Activities\Presentation\Base\Interaction\Model\ModelProperty.cs (3)
133public abstract ModelItem Value { get; } 144public abstract ModelItem Parent { get; } 169public abstract ModelItem SetValue(object value);
System.Activities.Presentation\System\Activities\Presentation\Base\Interaction\Services\ModelChangedEventArgs.cs (2)
29public abstract IEnumerable<ModelItem> ItemsAdded { get; } 35public abstract IEnumerable<ModelItem> ItemsRemoved { get; }
System.Activities.Presentation\System\Activities\Presentation\Base\Interaction\Services\ModelChangeInfo.cs (4)
24public abstract ModelItem Subject { get; } 34public abstract ModelItem Key { get; } 39public abstract ModelItem OldValue { get; } 44public abstract ModelItem Value { get; }
System.Activities.Presentation\System\Activities\Presentation\Base\Interaction\Services\ModelChangeInfoImpl.cs (29)
14private ModelItem subject; 16private ModelItem key; 17private ModelItem oldValue; 18private ModelItem value; 20private ModelChangeInfoImpl(ModelChangeType modelChangeType, ModelItem subject, string propertyName, ModelItem key, ModelItem oldValue, ModelItem value) 35public override ModelItem Subject 45public override ModelItem Key 50public override ModelItem OldValue 55public override ModelItem Value 60public static ModelChangeInfoImpl CreatePropertyChanged(ModelItem subject, string propertyName, ModelItem oldValue, ModelItem newValue) 65public static ModelChangeInfoImpl CreateCollectionItemAdded(ModelItem subject, ModelItem item) 70public static ModelChangeInfoImpl CreateCollectionItemRemoved(ModelItem subject, ModelItem item) 75public static ModelChangeInfoImpl CreateDictionaryKeyValueAdded(ModelItem subject, ModelItem key, ModelItem value) 80public static ModelChangeInfoImpl CreateDictionaryKeyValueRemoved(ModelItem subject, ModelItem key, ModelItem value) 85public static ModelChangeInfoImpl CreateDictionaryValueChanged(ModelItem subject, ModelItem key, ModelItem oldValue, ModelItem newValue)
System.Activities.Presentation\System\Activities\Presentation\Base\Interaction\Services\ViewService.cs (2)
36public abstract ModelItem GetModel(DependencyObject view); 50public abstract DependencyObject GetView(ModelItem model);
System.Activities.Presentation\System\Activities\Presentation\ContextMenuUtilities.cs (5)
29public static void OnAddAnnotationCommandCanExecute(CanExecuteRoutedEventArgs e, EditingContext editingContext, ModelItem modelItem) 52public static void OnDeleteAnnotationCommandCanExecute(CanExecuteRoutedEventArgs e, EditingContext editingContext, ModelItem modelItem) 97public static void OnAddAnnotationCommandExecuted(ExecutedRoutedEventArgs e, ModelItem modelItem) 123public static void OnEditAnnotationCommandExecuted(ExecutedRoutedEventArgs e, ModelItem modelItem) 134public static void OnDeleteAnnotationCommandExecuted(ExecutedRoutedEventArgs e, ModelItem modelItem)
System.Activities.Presentation\System\Activities\Presentation\Converters\ArgumentToExpressionConverter.cs (5)
24ModelItem argumentModelItem = value as ModelItem; 46ModelItem valueExpressionModelItem = value as ModelItem; 87if (targetType == typeof(ModelItem))
System.Activities.Presentation\System\Activities\Presentation\Converters\ArgumentToExpressionModelItemConverter.cs (4)
22ModelItem convertedValue = null; 31ModelItem argumentModelItem = property.Value; 55ModelItem valueExpressionModelItem = value as ModelItem;
System.Activities.Presentation\System\Activities\Presentation\Converters\ModelItemToAnnotationEnabledConverter.cs (2)
16ModelItem modelItem = value as ModelItem;
System.Activities.Presentation\System\Activities\Presentation\Converters\ModelPropertyEntryToModelItemConverter.cs (16)
38ModelItem item = null; 39ModelItem propertyParentItem = null; 63ModelItem item = null; 64ModelItem propertyParentItem = null; 100void GetPropertyData(PropertyEntry property, out ModelItem activityItem, out ModelItem propertyParentItem, out EditingContext context) 102activityItem = (ModelItem)this.propertyEntryConverter.Convert(property, typeof(ModelItem), false, null); 103propertyParentItem = (ModelItem)this.propertyEntryConverter.Convert(property, typeof(ModelItem), true, null); 116ModelItem modelItem = null; 117ModelItem propertyParentItem = null; 146DependencyProperty.Register("ModelItem", typeof(ModelItem), typeof(Container), new UIPropertyMetadata(null)); 157public Container(ModelItem item, EditingContext context, DependencyObject viewElement, PropertyValue value) 165public ModelItem ModelItem 167get { return (ModelItem)GetValue(ModelItemProperty); }
System.Activities.Presentation\System\Activities\Presentation\Converters\ModelPropertyEntryToOwnerActivityConverter.cs (2)
30internal static ModelItem Convert(ModelPropertyEntry modelPropertyEntry, bool returnParentActivity) 32ModelItem convertedValue = null;
System.Activities.Presentation\System\Activities\Presentation\Converters\ModelToObjectValueConverter.cs (2)
20if (value is ModelItem) 22convertedValue = ((ModelItem)value).GetCurrentValue();
System.Activities.Presentation\System\Activities\Presentation\Converters\ObjectToModelValueConverter.cs (2)
22ModelItem convertedValue = null; 43returnValue[0] = ((ModelItem)value).GetCurrentValue();
System.Activities.Presentation\System\Activities\Presentation\Converters\OutlineViewTextConverter.cs (2)
28ModelItem modelItem = values[1] as ModelItem;
System.Activities.Presentation\System\Activities\Presentation\CutCopyPasteHelper.cs (25)
186List<ModelItem> modelItemsToCut = new List<ModelItem>(currentSelection.SelectedObjects); 190internal static void DoCut(List<ModelItem> modelItemsToCut, EditingContext context) 236List<ModelItem> modelItemsToCopy = new List<ModelItem>(currentSelection.SelectedObjects); 240private static void DoCopy(List<ModelItem> modelItemsToCopy, EditingContext context) 268static void CutCopyOperation(List<ModelItem> modelItemsToCutCopy, EditingContext context, bool isCutOperation) 276Dictionary<ICompositeView, List<ModelItem>> notifyDictionary = new Dictionary<ICompositeView, List<ModelItem>>(); 278foreach (ModelItem modelItem in modelItemsToCutCopy) 309HashSet<ModelItem> parentModelItems = CutCopyPasteHelper.GetSelectableParentModelItems(modelItem); 315notifyDictionary[container] = new List<ModelItem>(); 341foreach (ModelItem modelItem in notifyDictionary[container]) 371internal static HashSet<ModelItem> GetSelectableParentModelItems(ModelItem modelItem) 378HashSet<ModelItem> parentModelItems = new HashSet<ModelItem>(); 423ModelItem modelItem = context.Items.GetValue<Selection>().PrimarySelection; 436if (clipboardObjects.Count == 3 && clipboardObjects[1] is Func<ModelItem, object, object>) 438var factoryMethod = (Func<ModelItem, object, object>)clipboardObjects[1]; 453static ICompositeView GetClickedContainer(ModelItem clickedModelItem, Point clickPoint) 476static ICompositeView GetContainerForPaste(ModelItem pasteModelItem, Point clickPoint) 566internal static void PutCallbackOnClipBoard(Func<ModelItem, object, object> callbackMethod, Type callbackResultType, object context) 702private static bool CanCopy(ModelItem item) 743ModelItem primarySelection = context.Items.GetValue<Selection>().PrimarySelection;
System.Activities.Presentation\System\Activities\Presentation\Debugger\DebuggerService.cs (43)
28ModelItem selectedModelItem; 31ModelItem currentModelItem; 32ModelItem currentModelItemContext; 45Dictionary<ModelItem, SourceLocation> modelItemToSourceLocation; 46Dictionary<SourceLocation, ModelItem> sourceLocationToModelItem; 48Dictionary<ModelItem, BreakpointTypes> breakpoints; // The map contains breakpoint that has its ModelItem on the modelTree. 49Dictionary<ModelItem, BreakpointTypes> transientBreakpoints; // The map contains breakpoint that has its ModelItem not on the modelTree. 71this.modelItemToSourceLocation = new Dictionary<ModelItem, SourceLocation>(); 72this.sourceLocationToModelItem = new Dictionary<SourceLocation, ModelItem>(); 73this.breakpoints = new Dictionary<ModelItem, BreakpointTypes>(); 75this.transientBreakpoints = new Dictionary<ModelItem, BreakpointTypes>(); 113ModelItem previousModelItem = this.currentModelItem; 130ModelItem mi = this.GetModelItemFromSourceLocation(exactLocation, /* forceCreate */ true); 137void BringToViewCurrentLocation(ModelItem previousModelItem) 147void PostBringToViewCurrentLocation(ModelItem previousModelItem) 181ModelItem previousModelItem = this.currentModelItemContext; 237void BringToView(ModelItem modelItem) 298foreach (ModelItem removedModelItem in e.EditingScope.ItemsRemoved) 304private void DeleteModelItem(ModelItem modelItem) 331ModelItem modelItem; 341bool IsCurrentLocation(ModelItem modelItem) 347bool IsCurrentContext(ModelItem modelItem) 360void TryActivateUnmappedBreakpoint(SourceLocation sourceLocation, ModelItem modelItem) 378ModelItem modelItem = this.GetModelItemFromSourceLocation(unmappedLocation); 387bool IsBreakpointOfType(ModelItem modelItem, BreakpointTypes breakpointType) 399void SetBreakpointType(ModelItem modelItem, BreakpointTypes newBreakpointType) 538foreach (KeyValuePair<ModelItem, BreakpointTypes> entry in this.breakpoints) 566ModelItem modelItem = this.GetModelItemFromSourceLocation(sourceLocation); 601ModelItem[] oldModelItems = new ModelItem[this.breakpoints.Keys.Count]; 607foreach (ModelItem modelItem in oldModelItems) 652ModelItem modelItem = this.modelTreeManager.GetModelItem(kvp.Key); 668ModelItem modelItem = this.modelTreeManager.GetModelItem(unresolvedObject); 686ModelItem modelItem = e.View.ModelItem; 732List<KeyValuePair<ModelItem, SourceLocation>> resolvedEntries = this.modelItemToSourceLocation.Where(entry => !IsUnresolved(entry.Value)).ToList(); 733foreach (KeyValuePair<ModelItem, SourceLocation> resolvedEntry in resolvedEntries) 749foreach (ModelItem key in this.modelSearchService.GetObjectsWithSourceLocation()) 800private void SetPropertyValue(ModelItem oldModelItem, AttachedProperty property, ModelItem newModelItem) 815private SourceLocation GetSourceLocationFromModelItem(ModelItem modelItem) 826private ModelItem GetModelItemFromSourceLocation(SourceLocation sourceLocation) 831private ModelItem GetModelItemFromSourceLocation(SourceLocation sourceLocation, bool forceCreate) 833ModelItem modelItem = null;
System.Activities.Presentation\System\Activities\Presentation\DeleteHelper.cs (5)
48Dictionary<ICompositeView, List<ModelItem>> containerToModelItemsDict = new Dictionary<ICompositeView, List<ModelItem>>(); 49List<ModelItem> modelItemsPerContainer; 50foreach (var item in toDelete) 57modelItemsPerContainer = new List<ModelItem>();
System.Activities.Presentation\System\Activities\Presentation\DesignObjectWrapper.cs (6)
79protected DesignObjectWrapper(ModelItem reflectedObject) 85internal void Initialize(ModelItem reflectedObject) 109public ModelItem ReflectedObject 127public ModelItem Content 509PropertySetter = (instance, value) => { instance.Content = (ModelItem)value; }, 510PropertyType = typeof(ModelItem),
System.Activities.Presentation\System\Activities\Presentation\DragDropHelper.cs (47)
82List<ModelItem> draggedModelItems = new List<ModelItem>(); 150ModelItem draggedActivityModelItem = draggedViewElement.ModelItem; 154List<ModelItem> draggedModelItems = new List<ModelItem>(); 229ModelItem droppedModelItem = draggedDataObject.GetData(ModelItemDataFormat) as ModelItem; 284IEnumerable<ModelItem> modelItems = draggedDataObject.GetData(ModelItemsDataFormat) as IEnumerable<ModelItem>; 285foreach (ModelItem modelItem in modelItems) 295ModelItem modelItem = draggedDataObject.GetData(ModelItemDataFormat) as ModelItem; 327IEnumerable<ModelItem> droppedModelItems = e.Data.GetData(ModelItemsDataFormat) as IEnumerable<ModelItem>; 328foreach (ModelItem modelItem in droppedModelItems) 335object droppedObject = e.Data.GetData(ModelItemDataFormat) as ModelItem; 368internal static void ValidateItemsAreOnView(IList<ModelItem> items, ICollection<ModelItem> modelItemsOnView) 513public static ModelItem GetDraggedModelItem(DragEventArgs e) 518internal static ModelItem GetDraggedModelItemInternal(DragEventArgs e) 520IEnumerable<ModelItem> draggedModelItems = GetDraggedModelItems(e); 528public static IEnumerable<ModelItem> GetDraggedModelItems(DragEventArgs e) 530IEnumerable<ModelItem> draggedModelItems = e.Data.GetData(ModelItemsDataFormat) as IEnumerable<ModelItem>; 537ModelItem draggedItem = e.Data.GetData(ModelItemDataFormat) as ModelItem; 540return new ModelItem[] { draggedItem }; 543return new ModelItem[] { }; 593Dictionary<ICompositeView, List<ModelItem>> viewItemListDictionary = new Dictionary<ICompositeView, List<ModelItem>>(); 598ModelItem modelItem = obj as ModelItem; 615viewItemListDictionary.Add(container, new List<ModelItem>()); 622foreach (KeyValuePair<ICompositeView, List<ModelItem>> pair in viewItemListDictionary) 625List<ModelItem> sortedList = view2 == null ? 626pair.Value : view2.SortSelectedItems(new List<ModelItem>(pair.Value)); 773IEnumerable<ModelItem> draggedModelItems = e.Data.GetData(ModelItemsDataFormat) as IEnumerable<ModelItem>; 776foreach (ModelItem draggedModelItem in draggedModelItems) 787ModelItem draggedModelItem = e.Data.GetData(ModelItemDataFormat) as ModelItem; 797internal static IEnumerable<ModelItem> GetModelItemsToDrag(IEnumerable<ModelItem> modelItems) 799HashSet<ModelItem> modelItemsToDrag = new HashSet<ModelItem>(); 800foreach (ModelItem modelItem in modelItems) 802HashSet<ModelItem> parentModelItems = CutCopyPasteHelper.GetSelectableParentModelItems(modelItem);
System.Activities.Presentation\System\Activities\Presentation\DynamicActivityPropertyUtilities.cs (1)
15foreach (ModelItem entry in properties)
System.Activities.Presentation\System\Activities\Presentation\EditingContextUtilities.cs (1)
23public static ModelItem GetSingleSelectedModelItem(EditingContext editingContext)
System.Activities.Presentation\System\Activities\Presentation\ExpandButtonVisibilityConverter.cs (2)
26ModelItem modelItem = values[1] as ModelItem;
System.Activities.Presentation\System\Activities\Presentation\ExpressionHelper.cs (1)
29internal static string GetExpressionString(Activity expression, ModelItem owner)
System.Activities.Presentation\System\Activities\Presentation\Expressions\ExpressionActivityEditor.cs (6)
24public static readonly DependencyProperty ExpressionProperty = DependencyProperty.Register("Expression", typeof(ModelItem), typeof(ExpressionActivityEditor), 30public static readonly DependencyProperty OwnerActivityProperty = DependencyProperty.Register("OwnerActivity", typeof(ModelItem), typeof(ExpressionActivityEditor), 70public ModelItem Expression 72get { return (ModelItem)GetValue(ExpressionProperty); } 95public ModelItem OwnerActivity 97get { return (ModelItem)GetValue(OwnerActivityProperty); }
System.Activities.Presentation\System\Activities\Presentation\ExpressionSelection.cs (3)
12ModelItem modelItem; 18public ExpressionSelection(ModelItem modelItem) 23public ModelItem ModelItem
System.Activities.Presentation\System\Activities\Presentation\FreeFormEditing\AutoConnectHelper.cs (1)
232ModelItem draggedModelItem = DragDropHelper.GetDraggedModelItemInternal(e);
System.Activities.Presentation\System\Activities\Presentation\ICompositeView.cs (4)
14void OnItemMoved(ModelItem modelItem); 15object OnItemsCut(List<ModelItem> itemsToCut); 16object OnItemsCopied(List<ModelItem> itemsToCopy); 18void OnItemsDelete(List<ModelItem> itemsToDelete);
System.Activities.Presentation\System\Activities\Presentation\IExpandChild.cs (1)
11ModelItem ExpandedChild
System.Activities.Presentation\System\Activities\Presentation\IMultipleDragEnabledCompositeView.cs (3)
25List<ModelItem> SortSelectedItems(List<ModelItem> selectedItems); 34void OnItemsMoved(List<ModelItem> movedItems);
System.Activities.Presentation\System\Activities\Presentation\Metadata\ActivityArgumentHelper.cs (6)
360ModelItem expressionModelItem = modelTreeManager.GetModelItem(this.ExpressionToReplace); 363ModelItem argumentModelItem = expressionModelItem.Parent; 364ModelItem parentObject = argumentModelItem.Parent; 372ModelItem oldArgumentModel = argumentProperty.Value; 373ModelItem newArgumentModel = argumentProperty.SetValue(this.NewArgument); 376ModelItem newExpressionModel = newArgumentModel.Properties["Expression"].Value;
System.Activities.Presentation\System\Activities\Presentation\Model\AttachablePropertyChange.cs (1)
13public ModelItem Owner { get; set; }
System.Activities.Presentation\System\Activities\Presentation\Model\AttachedProperty.cs (9)
59public abstract object GetValue(ModelItem modelItem); 60public abstract void SetValue(ModelItem modelItem, object value); 61public abstract void ResetValue(ModelItem modelItem); 63public void NotifyPropertyChanged(ModelItem modelItem) 76public Func<ModelItem, T> Getter 82public Action<ModelItem, T> Setter 97public override object GetValue(ModelItem modelItem) 102public override void SetValue(ModelItem modelItem, object Value) 112public override void ResetValue(ModelItem modelItem)
System.Activities.Presentation\System\Activities\Presentation\Model\AttachedPropertyDescriptor.cs (2)
17ModelItem owner; 19public AttachedPropertyDescriptor(AttachedProperty AttachedProperty, ModelItem owner)
System.Activities.Presentation\System\Activities\Presentation\Model\BackPointer.cs (4)
11public BackPointer(ModelItem sourceVertex, ModelItem destinationVertex) 16public BackPointer(string propertyName, ModelItem sourceVertex, ModelItem destinationVertex)
System.Activities.Presentation\System\Activities\Presentation\Model\CollectionChange.cs (1)
16public ModelItem Item { get; set; }
System.Activities.Presentation\System\Activities\Presentation\Model\DictionaryChange.cs (2)
19public ModelItem Key { get; set; } 21public ModelItem Value { get; set; }
System.Activities.Presentation\System\Activities\Presentation\Model\DictionaryEditChange.cs (4)
16public ModelItem Key { get; set; } 18public ModelItem OldValue { get; set; } 20public ModelItem NewValue { get; set; } 35ModelItem oldValue = this.Dictionary[this.Key];
System.Activities.Presentation\System\Activities\Presentation\Model\Edge.cs (4)
11public Edge(ModelItem sourceVertex, ModelItem destinationVertex) 16public Edge(string propertyName, ModelItem sourceVertex, ModelItem destinationVertex)
System.Activities.Presentation\System\Activities\Presentation\Model\EditingScope.cs (12)
23private HashSet<ModelItem> itemsAdded; 24private HashSet<ModelItem> itemsRemoved; 35this.itemsAdded = new HashSet<ModelItem>(); 36this.itemsRemoved = new HashSet<ModelItem>(); 86internal ReadOnlyCollection<ModelItem> ItemsAdded 90return new ReadOnlyCollection<ModelItem>(this.itemsAdded.ToList()); 94internal ReadOnlyCollection<ModelItem> ItemsRemoved 98return new ReadOnlyCollection<ModelItem>(this.itemsRemoved.ToList()); 129internal void HandleModelItemsAdded(IEnumerable<ModelItem> modelItems) 131foreach (ModelItem addedItem in modelItems) 145internal void HandleModelItemsRemoved(IEnumerable<ModelItem> modelItems) 147foreach (ModelItem removedItem in modelItems)
System.Activities.Presentation\System\Activities\Presentation\Model\FakeModelItemImpl.cs (2)
21public override ModelItem Root 39ModelItem currentValue;
System.Activities.Presentation\System\Activities\Presentation\Model\FakeModelPropertyImpl.cs (4)
51public override ModelItem Value 55ModelItem result = null; 68public override ModelItem SetValue(object value) 132ModelItem existing = null;
System.Activities.Presentation\System\Activities\Presentation\Model\GenericArgumentsUpdater.cs (3)
39private static void UpdateTypeArgument(ModelItem modelItem, Type value) 47ModelItem newModelItem = ModelFactory.CreateItem(modelItem.GetEditingContext(), Activator.CreateInstance(newModelItemType)); 74private static Type GetTypeArgument(ModelItem modelItem)
System.Activities.Presentation\System\Activities\Presentation\Model\IModelTreeItem.cs (6)
15ModelItem ModelItem 20Dictionary<string, ModelItem> ModelPropertyStore 30IEnumerable<ModelItem> ItemBackPointers { get; } 38void SetParent(ModelItem dataModelItem); 44void RemoveParent(ModelItem oldParent); 48void RemoveSource(ModelItem parent, string propertyName);
System.Activities.Presentation\System\Activities\Presentation\Model\LinkBase.cs (8)
13public LinkBase(ModelItem sourceVertex, ModelItem destinationVertex) 18public LinkBase(string propertyName, ModelItem sourceVertex, ModelItem destinationVertex) 23private LinkBase(LinkType linkType, string propertyName, ModelItem sourceVertex, ModelItem destinationVertex) 39public ModelItem DestinationVertex { get; private set; } 41public ModelItem SourceVertex { get; private set; }
System.Activities.Presentation\System\Activities\Presentation\Model\ModelChangedEventArgsImpl.cs (8)
14List<ModelItem> itemsAdded; 15List<ModelItem> itemsRemoved; 19public ModelChangedEventArgsImpl(List<ModelItem> itemsAdded, List<ModelItem> itemsRemoved, List<ModelProperty> propertiesChanged) 24public ModelChangedEventArgsImpl(List<ModelItem> itemsAdded, List<ModelItem> itemsRemoved, List<ModelProperty> propertiesChanged, ModelChangeInfo modelChangeInfo) 33public override IEnumerable<ModelItem> ItemsAdded 42public override IEnumerable<ModelItem> ItemsRemoved
System.Activities.Presentation\System\Activities\Presentation\Model\ModelItemCollectionImpl.cs (52)
26List<ModelItem> modelItems; 27Dictionary<string, ModelItem> modelPropertyStore; 30List<ModelItem> parents; 34List<ModelItem> subTreeNodesThatNeedBackLinkPatching; 36ModelItem manuallySetParent; 38public ModelItemCollectionImpl(ModelTreeManager modelTreeManager, Type itemType, Object instance, ModelItem parent) 46this.parents = new List<ModelItem>(1); 53this.modelPropertyStore = new Dictionary<string, ModelItem>(); 54this.subTreeNodesThatNeedBackLinkPatching = new List<ModelItem>(); 55this.modelItems = new List<ModelItem>(); 137public override ModelItem Parent 158public override ModelItem Root 182public override IEnumerable<ModelItem> Parents 188List<ModelItem> list = new List<ModelItem>(); 209internal List<ModelItem> Items 217internal Dictionary<string, ModelItem> ModelPropertyStore 242ModelItem IModelTreeItem.ModelItem 250Dictionary<string, ModelItem> IModelTreeItem.ModelPropertyStore 267public override ModelItem this[int index] 284public override ModelItem Add(object value) 286ModelItem item = value as ModelItem; 299public override void Add(ModelItem item) 339ModelItem item = value as ModelItem; 347public override bool Contains(ModelItem item) 352public override void CopyTo(ModelItem[] array, int arrayIndex) 369public override IEnumerator<ModelItem> GetEnumerator() 371foreach (ModelItem modelItem in modelItems) 385IEnumerable<ModelItem> IModelTreeItem.ItemBackPointers 395void IModelTreeItem.SetParent(ModelItem dataModelItem) 421public override int IndexOf(ModelItem item) 430public override ModelItem Insert(int index, object value) 432ModelItem item = value as ModelItem; 445public override void Insert(int index, ModelItem item) 464ModelItem movingItem = this.Items[fromIndex]; 471ModelItem item = value as ModelItem; 475foreach (ModelItem childItem in this.Items) 491public override bool Remove(ModelItem item) 508internal void AddCore(ModelItem item) 542List<ModelItem> modelItemsRemoved = new List<ModelItem>(this.modelItems); 545foreach (ModelItem item in modelItemsRemoved.Distinct()) 560internal void InsertCore(int index, ModelItem item) 586internal void RemoveCore(ModelItem item) 619ModelItem item = this.modelItems[index]; 646ModelItem modelItem = this.modelTreeManager.WrapAsModelItem(item); 657void IModelTreeItem.RemoveParent(ModelItem oldParent) 682void IModelTreeItem.RemoveSource(ModelItem parent, string propertyName)
System.Activities.Presentation\System\Activities\Presentation\Model\ModelItemDictionaryImpl.cs (108)
26private NullableKeyDictionary<ModelItem, ModelItem> modelItems; 27internal ModelItem updateKeySavedValue; 28Dictionary<string, ModelItem> modelPropertyStore; 31List<ModelItem> parents; 35List<ModelItem> subTreeNodesThatNeedBackLinkPatching; 37ModelItem manuallySetParent; 40public ModelItemDictionaryImpl(ModelTreeManager modelTreeManager, Type itemType, Object instance, ModelItem parent) 48this.parents = new List<ModelItem>(1); 55this.modelPropertyStore = new Dictionary<string, ModelItem>(); 56this.subTreeNodesThatNeedBackLinkPatching = new List<ModelItem>(); 57this.modelItems = new NullableKeyDictionary<ModelItem, ModelItem>(); 111ModelItem key = null; 114ModelItem value = this.WrapObject(valueObj); 122ModelItem newKey = null; 124ModelItem oldKey = null; 135ModelItem value = this.modelItems[oldKey]; 157new KeyValuePair<ModelItem, ModelItem>(newKey, value), 158new KeyValuePair<ModelItem, ModelItem>(oldKey, value))); 178foreach (ModelItem item in e.NewItems) 180ModelItem key = item.Properties["Key"] == null ? null : item.Properties["Key"].Value; 181ModelItem value = item.Properties["Value"] == null ? null : item.Properties["Value"].Value; 187foreach (ModelItem item in e.OldItems) 190ModelItem key = null; 201foreach (ModelItem item in e.NewItems) 204ModelItem key = null; 207ModelItem value = item.Properties["Value"] == null ? null : item.Properties["Value"].Value; 237public override ICollection<ModelItem> Keys 242public override ICollection<ModelItem> Values 298public override ModelItem Parent 307public override ModelItem Root 337public ModelItem ModelItem 342public Dictionary<string, ModelItem> ModelPropertyStore 353public override IEnumerable<ModelItem> Parents 359List<ModelItem> list = new List<ModelItem>(); 401public override ModelItem this[ModelItem key] 414ModelItem oldValue = null; 426public override ModelItem this[object key] 430ModelItem keyItem = null; 446ModelItem keyItem = null; 452public override void Add(ModelItem key, ModelItem value) 461public override ModelItem Add(object key, object value) 467ModelItem keyModelItem = key as ModelItem ?? this.WrapObject(key); 468ModelItem valueModelItem = value as ModelItem ?? this.WrapObject(value); 478public override bool ContainsKey(ModelItem key) 480return this.modelItems.Keys.Contains<ModelItem>(key); 485ModelItem keyItem = key as ModelItem; 495public override IEnumerator<KeyValuePair<ModelItem, ModelItem>> GetEnumerator() 500public override bool Remove(ModelItem key) 508ModelItem keyItem = null; 517public override bool TryGetValue(ModelItem key, out ModelItem value) 522public override bool TryGetValue(object key, out ModelItem value) 524ModelItem keyItem = null; 569void IModelTreeItem.SetParent(ModelItem dataModelItem) 602void IModelTreeItem.RemoveParent(ModelItem oldParent) 615IEnumerable<ModelItem> IModelTreeItem.ItemBackPointers 637void IModelTreeItem.RemoveSource(ModelItem parent, string propertyName) 651internal void EditCore(ModelItem key, ModelItem value) 656private void EditCore(ModelItem key, ModelItem value, bool updateInstance) 660ModelItem oldValue = this.modelItems[key]; 676foreach (ModelItem item in ItemsCollectionModelItemCollection) 678ModelItem keyInCollection = item.Properties["Key"].Value; 727new KeyValuePair<ModelItem, ModelItem>(key, value), 728new KeyValuePair<ModelItem, ModelItem>(key, oldValue))); 737internal void AddCore(ModelItem key, ModelItem value) 742private void AddCore(ModelItem key, ModelItem value, bool updateInstance) 762ModelItem mutableKVPairItem = this.modelTreeManager.WrapAsModelItem(mutableKVPair); 790new KeyValuePair<ModelItem, ModelItem>(key, value))); 810IList removed = this.modelItems.ToList<KeyValuePair<ModelItem, ModelItem>>(); 829List<ModelItem> removedItems = new List<ModelItem>(this.modelItems.Keys.Concat(this.modelItems.Values).Distinct()); 832foreach (ModelItem item in removedItems.Distinct()) 852internal void RemoveCore(ModelItem key) 857private bool IsInKeysOrValuesCollection(ModelItem modelItem) 859foreach (ModelItem item in this.modelItems.Keys) 867foreach (ModelItem item in this.modelItems.Values) 878private void RemoveCore(ModelItem key, bool updateInstance) 884ModelItem value = this.modelItems[key]; 906ModelItem itemToBeRemoved = null; 907foreach (ModelItem item in itemsCollectionImpl) 909ModelItem keyInCollection = item.Properties["Key"].Value; 950new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, new KeyValuePair<ModelItem, ModelItem>(key, value))); 967ModelItem key = (keyObject == null) ? null : this.WrapObject(keyObject); 968ModelItem value = this.WrapObject(instance.GetValueFromCurrent(current)); 987ModelItem WrapObject(object value) 993private bool KeyAsModelItem(object value, bool createNew, out ModelItem keyModelItem) 995keyModelItem = value as ModelItem; 1002keyModelItem = this.modelItems.Keys.SingleOrDefault<ModelItem>(p =>
System.Activities.Presentation\System\Activities\Presentation\Model\ModelItemExtensions.cs (78)
26public static EditingContext GetEditingContext(this ModelItem modelItem) 37internal static ModelItem FindParentModelItem(this ModelItem item, Type parentType) 48ModelItem result = null; 61internal static bool SwitchKeys(this ModelItemDictionary dictionary, ModelItem oldKey, ModelItem newKey) 82ModelItem value = dictionary[oldKey]; 92internal static bool SwitchKeys(this ModelItemDictionary dictionary, object oldKey, object newKey, out ModelItem newKeyItem) 112if (typeof(ModelItem).IsAssignableFrom(oldKey.GetType()) && typeof(ModelItem).IsAssignableFrom(newKey.GetType())) 114result = SwitchKeys(dictionary, (ModelItem)oldKey, (ModelItem)newKey); 115newKeyItem = (ModelItem)newKey; 119if (typeof(ModelItem).IsAssignableFrom(oldKey.GetType())) 121oldKey = ((ModelItem)oldKey).GetCurrentValue(); 127if (typeof(ModelItem).IsAssignableFrom(newKey.GetType())) 129newKey = ((ModelItem)newKey).GetCurrentValue(); 138ModelItem value = dictionary[oldKey]; 141newKeyItem = dictionary.Keys.First<ModelItem>(p => object.Equals(p.GetCurrentValue(), newKey)); 149internal static bool TryGetPropertyValue(this ModelItem item, out ModelItemCollection value, params string[] path) 151ModelItem temp; 163internal static bool TryGetPropertyValue(this ModelItem item, out ModelItemDictionary value, params string[] path) 165ModelItem temp; 177internal static bool TryGetPropertyValue(this ModelItem item, out ModelItem value, params string[] path) 214internal static bool TrySetPropertyValue(this ModelItem item, object value, out ModelItem wrappedValue, params string[] path) 263internal static bool HasAnnotation(this ModelItem modelItem) 279public static string GetModelPath(this ModelItem modelItem) 287HashSet<ModelItem> visited = new HashSet<ModelItem>(); 344public static ModelItem GetModelItemFromPath(string path, ModelItem root) 354ModelItem foundModelItem = null; 366ModelItem next = GetModelItemFromSegment(foundModelItem, segment); 387private static ModelItem GetModelItemFromSegment(ModelItem currentModelItem, string segment) 389ModelItem modelItemFromSegment = null; 432internal static IEnumerable<ModelItem> GetParentEnumerator(this ModelItem item) 437internal static IEnumerable<ModelItem> GetParentEnumerator(this ModelItem item, Func<ModelItem, bool> continueEnumerationPredicate) 455internal static string GetUniqueName(this ModelItemCollection collection, string nameDefaultPrefix, Func<ModelItem, string> nameGetter) 457return collection.GetUniqueName<ModelItem>(nameDefaultPrefix, nameGetter); 460internal static string GetUniqueName(this ModelItemDictionary dictionary, string nameDefaultPrefix, Func<ModelItem, string> nameGetter) 515internal static bool IsAssignableFrom<T>(this ModelItem item) where T : class 525internal static Activity GetRootActivity(this ModelItem item) 538public static bool IsParentOf(this ModelItem item, ModelItem child) 550child.GetParentEnumerator(p => { isParent = ModelItem.Equals(p, item); return !isParent; }).LastOrDefault(); 554public static void Focus(this ModelItem item) 559internal static void Highlight(this ModelItem item) 564internal static void Highlight(this ModelItem item, Rect rectToBringIntoView) 569public static void Focus(this ModelItem item, int level) 582internal static ModelItem FindParent(this ModelItem item, Predicate<ModelItem> predicate) 584ModelItem parent = item.Parent; 598ModelItem itemToFocus; 606ModelItem[] itemsToExpand; 656Action<ModelItem> onElementFocusingDelegate; 661private ModelItemFocusHelper(ModelItem itemToFocus, int maxExpandLevel, bool shouldGetKeyboardFocus, Rect rectToBringIntoView) 674static bool IsRootedAt(ModelItem item, ModelItem root) 678ModelItem currentItem = item; 686public static void Focus(ModelItem itemToFocus, int maxExpandLevel) 691internal static void Focus(ModelItem itemToFocus, int maxExpandLevel, bool shouldGetKeyboardFocus) 696internal static void Focus(ModelItem itemToFocus, int maxExpandLevel, bool shouldGetKeyboardFocus, Rect rectToBringIntoView) 793var firstVisibleItem = visualItems.FirstOrDefault(p => null != p.View && ((UIElement)p.View).IsVisible); 802this.itemsToExpand = visualItems.TakeWhile(p => firstVisibleItem != p).Concat(new ModelItem[] { firstVisibleItem }).ToArray(); 820void Expand(ModelItem currentItem) 845if (!ModelItem.Equals(currentItem, this.itemsToExpand[index])) 857if (ModelItem.Equals(this.itemsToExpand[j], currentItem)) 916var modelItem = (null != virtualContainer ? virtualContainer.ModelItem : (viewElement != null ? viewElement.ModelItem : null)); 944.FirstOrDefault(p => ModelItem.Equals(this.itemToFocus, p.ModelItem) || p.ModelItem.IsParentOf(this.itemToFocus)); 954void OnFocusElement(ModelItem currentItem) 1003ModelItem item = this.itemToFocus;
System.Activities.Presentation\System\Activities\Presentation\Model\ModelItemHelper.cs (1)
30internal static bool CanCreateImmediateEditingScope(ModelItem modelItem)
System.Activities.Presentation\System\Activities\Presentation\Model\ModelItemImpl.cs (23)
30Dictionary<string, ModelItem> modelPropertyStore; 33internal ObservableCollection<ModelItem> parents; 34ReadOnlyObservableCollection<ModelItem> internalParents; 39List<ModelItem> subTreeNodesThatNeedBackLinkPatching; 41ModelItem manuallySetParent; 44public ModelItemImpl(ModelTreeManager modelTreeManager, Type itemType, object instance, ModelItem parent) 49this.parents = new ObservableCollection<ModelItem>(); 50this.internalParents = new ReadOnlyObservableCollection<ModelItem>(parents); 58this.modelPropertyStore = new Dictionary<string, ModelItem>(); 59this.subTreeNodesThatNeedBackLinkPatching = new List<ModelItem>(); 101public ModelItem ModelItem 129public override ModelItem Parent 150public override ModelItem Root 176public override IEnumerable<ModelItem> Parents 182List<ModelItem> list = new List<ModelItem>(); 195internal ReadOnlyObservableCollection<ModelItem> InternalParents 238Dictionary<string, ModelItem> IModelTreeItem.ModelPropertyStore 290void IModelTreeItem.SetParent(ModelItem dataModelItem) 303IEnumerable<ModelItem> IModelTreeItem.ItemBackPointers 418void IModelTreeItem.RemoveParent(ModelItem oldParent) 443void IModelTreeItem.RemoveSource(ModelItem parent, string propertyName) 494ModelItem valueModelitem = modelProperty.Value;
System.Activities.Presentation\System\Activities\Presentation\Model\ModelItemsAddedEventArgs.cs (2)
15public ModelItemsAddedEventArgs(IEnumerable<ModelItem> modelItemsAdded) 21public IEnumerable<ModelItem> ModelItemsAdded { get; private set; }
System.Activities.Presentation\System\Activities\Presentation\Model\ModelItemsRemovedEventArgs.cs (2)
14public ModelItemsRemovedEventArgs(IEnumerable<ModelItem> modelItemsRemoved) 20public IEnumerable<ModelItem> ModelItemsRemoved { get; private set; }
System.Activities.Presentation\System\Activities\Presentation\Model\ModelPropertyCollectionImpl.cs (3)
21ModelItem parent; 24public ModelPropertyCollectionImpl(ModelItem parent) 61ModelProperty CreateProperty(ModelItem parent, PropertyDescriptor propertyDescriptor)
System.Activities.Presentation\System\Activities\Presentation\Model\ModelPropertyDescriptor.cs (1)
100ModelItem value = this.itemProperty.Value;
System.Activities.Presentation\System\Activities\Presentation\Model\ModelPropertyImpl.cs (7)
18ModelItem parent; 22public ModelPropertyImpl(ModelItem parent, PropertyDescriptor propertyDescriptor, bool isAttached) 152public override ModelItem Parent 168public override ModelItem Value 192public override ModelItem SetValue(object value) 223internal object SetValueCore(ModelItem newValueModelItem) 226ModelItem oldValueModelItem = this.Value;
System.Activities.Presentation\System\Activities\Presentation\Model\ModelSearchServiceImpl.cs (42)
47ModelItem lastNavigatedItem; 49ModelItem itemToFocus; 117IEnumerable<ModelItem> itemsToSearch = this.GetItemsOnDesigner(preOrder: true, excludeRoot: true, excludeErrorActivity: true, excludeExpression: true, includeOtherObjects: false); 118foreach (ModelItem item in itemsToSearch) 133foreach (ModelItem modelItem in itemsToSearch) 217internal IEnumerable<ModelItem> GetItemsOnDesigner(bool preOrder, bool excludeRoot, bool excludeErrorActivity, bool excludeExpression, bool includeOtherObjects) 220IList<ModelItem> items = 227delegate(ModelItem modelItem) 236IEnumerable<ModelItem> itemsToSearch = null; 239itemsToSearch = items.Where<ModelItem>(item => !ModelUtilities.IsModelItemKeyValuePair(item.ItemType) 244itemsToSearch = items.Where<ModelItem>(item => 250itemsToSearch = itemsToSearch.Except<ModelItem>(new ModelItem[] { modelService.Root }); 255static private bool IsErrorActivity(ModelItem item) 273ModelItem item, ModelProperty property, string text, string propertyPath) 286void AddEntriesForVariables(ModelItem modelItem) 291foreach (ModelItem variable in variables) 319private void AddEntriesForPropertyReference(string valueText, ModelItem modelItem, 325private void AddEntriesForPropertyValue(object value, ModelItem modelItem, 340void AddBrowsableProperties(ModelItem modelItem) 362ModelItem selectedArgument = this.GetTopmostSelectedArgument(selection, arguments); 363foreach (ModelItem argument in arguments) 395private ModelItem GetTopmostSelectedArgument(Selection selection, ModelItemCollection arguments) 397foreach (ModelItem argument in arguments) 399foreach (ModelItem candidateArgument in selection.SelectedObjects) 478void AddEntriesForProperty(ModelProperty property, ModelItem modelItem, string propertyPath) 532public ModelItem FindModelItem(int startLine, int startColumn, int endLine, int endColumn) 538public ModelItem FindModelItemOfViewState(int startLine, int startColumn, int endLine, int endColumn) 544public SourceLocation FindSourceLocation(ModelItem modelItem) 554private ModelItem FindModelItemForNavigate(int startLine, int startColumn, int endLine, int endColumn) 558ModelItem modelItem = this.FindModelItemOfViewState(startLine, startColumn, endLine, endColumn); 569ModelItem itemToFocus = this.FindModelItemForNavigate(startLine, startColumn, endLine, endColumn); 586public bool NavigateTo(ModelItem itemToFocus) 606private static SearchableEntry CreateSearchableEntryNoRecursive(ModelItem modelItem) 628private static SearchableEntry CreateSearchableEntryForArgumentOrVariable(ModelItem itemToFocus) 631ModelUtilities.ReverseTraverse(itemToFocus, (ModelItem modelItem) => 701private bool ShouldShowSearchToolTip(ModelItem item) 707private void HighlightModelItem(ModelItem itemToFocus) 726private ModelItem FindModelItemToFocus(ModelItem itemToFocus) 734ModelUtilities.ReverseTraverse(itemToFocus, (ModelItem modelItem) => 765private static bool CanFocusOnModelItem(ModelItem itemToFocus, WorkflowViewService viewService)
System.Activities.Presentation\System\Activities\Presentation\Model\ModelService.cs (15)
34public abstract ModelItem Root { get; } 58protected abstract ModelItem CreateItem(Type itemType, CreateOptions options, params object[] arguments); 69protected abstract ModelItem CreateItem(object item); 83protected abstract ModelItem CreateStaticMemberItem(Type type, string memberName); 103public abstract IEnumerable<ModelItem> Find(ModelItem startingItem, Type type); 124public abstract IEnumerable<ModelItem> Find(ModelItem startingItem, Predicate<Type> match); 143public ModelItem FromName(ModelItem scope, string name) { 168public abstract ModelItem FromName(ModelItem scope, string name, StringComparison comparison); 174internal ModelItem InvokeCreateItem(Type itemType, CreateOptions options, params object[] arguments) { 181internal ModelItem InvokeCreateStaticMemberItem(Type type, string memberName) { 189internal ModelItem InvokeCreateItem(object item) {
System.Activities.Presentation\System\Activities\Presentation\Model\ModelServiceImpl.cs (22)
30public override ModelItem Root 38public override IEnumerable<ModelItem> Find(ModelItem startingItem, Predicate<Type> match) 40return ModelTreeManager.Find(startingItem, delegate(ModelItem m) { return match(m.ItemType); }, false); 43public override IEnumerable<ModelItem> Find(ModelItem startingItem, Type type) 55return ModelTreeManager.Find(startingItem, delegate(ModelItem modelItem) 61public override ModelItem FromName(ModelItem scope, string name, StringComparison comparison) 68internal void OnModelItemAdded(ModelItem modelItem, ModelChangeInfo changeInfo) 74List<ModelItem> modelItemsAdded = new List<ModelItem>(1); 81internal void OnModelItemRemoved(ModelItem modelItem, ModelChangeInfo changInfo) 86List<ModelItem> modelItemsRemoved = new List<ModelItem>(1); 104internal void OnModelItemsRemoved(IEnumerable<ModelItem> modelItems) 109List<ModelItem> modelItemsRemoved = new List<ModelItem>(); 130protected override ModelItem CreateItem(object instance) 135protected override ModelItem CreateItem(Type itemType, CreateOptions options, params object[] arguments) 141protected override ModelItem CreateStaticMemberItem(Type type, string memberName) 146internal ModelItem WrapAsModelItem(object instance)
System.Activities.Presentation\System\Activities\Presentation\Model\ModelTreeItemHelper.cs (1)
28public void RemoveExtraPropertyBackPointer(ModelItem parent, string propertyName)
System.Activities.Presentation\System\Activities\Presentation\Model\ModelTreeManager.cs (134)
37ModelItem rootItem; 65public ModelItem Root 111public ModelItem CreateModelItem(ModelItem parent, object instance) 117ModelItem retval; 207ModelItem oldRoot = this.rootItem; 225ModelItem newValueModelItem = null; 238internal void CollectionAdd(ModelItemCollectionImpl dataModelItemCollection, ModelItem item) 243internal void CollectionInsert(ModelItemCollectionImpl dataModelItemCollection, int index, ModelItem item) 261List<ModelItem> removedItems = new List<ModelItem>(); 265foreach (ModelItem modelItem in removedItems) 274internal void NotifyCollectionInsert(ModelItem item, ModelChangeInfo changeInfo) 279internal void CollectionRemove(ModelItemCollectionImpl dataModelItemCollection, ModelItem item) 286ModelItem item = dataModelItemCollection[index]; 290private void CollectionRemove(ModelItemCollectionImpl dataModelItemCollection, ModelItem item, int index) 304internal void NotifyCollectionRemove(ModelItem item, ModelChangeInfo changeInfo) 313ModelItem[] keys = modelDictionary.Keys.ToArray<ModelItem>(); 317foreach (ModelItem key in keys) 325internal void DictionaryEdit(ModelItemDictionaryImpl dataModelItemDictionary, ModelItem key, ModelItem newValue, ModelItem oldValue) 340internal void DictionaryAdd(ModelItemDictionaryImpl dataModelItemDictionary, ModelItem key, ModelItem value) 355internal void OnPropertyEdgeAdded(string propertyName, ModelItem from, ModelItem to) 360internal void OnItemEdgeAdded(ModelItem from, ModelItem to) 365internal void OnPropertyEdgeRemoved(string propertyName, ModelItem from, ModelItem to) 370internal void OnItemEdgeRemoved(ModelItem from, ModelItem to) 375internal void DictionaryRemove(ModelItemDictionaryImpl dataModelItemDictionary, ModelItem key) 379ModelItem value = dataModelItemDictionary[key]; 392internal static IEnumerable<ModelItem> Find(ModelItem startingItem, Predicate<ModelItem> matcher, bool skipCollapsedAndUnrootable) 402Predicate<ModelItem> shouldSearchThroughProperties = (currentModelItem) => (!skipCollapsedAndUnrootable) 406List<ModelItem> foundItems = new List<ModelItem>(); 407Queue<ModelItem> modelItems = new Queue<ModelItem>(); 409HashSet<ModelItem> alreadyVisited = new HashSet<ModelItem>(); 412ModelItem currentModelItem = modelItems.Dequeue(); 423List<ModelItem> neighbors = GetNeighbors(currentModelItem, shouldSearchThroughProperties); 425foreach (ModelItem neighbor in neighbors) 438private static List<ModelItem> GetNeighbors(ModelItem currentModelItem, Predicate<ModelItem> extraShouldSearchThroughProperties) 440List<ModelItem> neighbors = new List<ModelItem>(); 451foreach (ModelItem modelItem in collection) 464foreach (KeyValuePair<ModelItem, ModelItem> kvp in dictionary) 466ModelItem miKey = kvp.Key; 472ModelItem miValue = kvp.Value; 515internal static ModelItem FindFirst(ModelItem startingItem, Predicate<ModelItem> matcher) 520internal static ModelItem FindFirst(ModelItem startingItem, Predicate<ModelItem> matcher, Predicate<ModelItem> extraShouldSearchThroughProperties) 525ModelItem foundItem = null; 526Queue<ModelItem> modelItems = new Queue<ModelItem>(); 528HashSet<ModelItem> alreadyVisited = new HashSet<ModelItem>(); 531ModelItem currentModelItem = modelItems.Dequeue(); 543List<ModelItem> neighbors = GetNeighbors(currentModelItem, extraShouldSearchThroughProperties); 545foreach (ModelItem neighbor in neighbors) 561internal ModelItem GetValue(ModelPropertyImpl dataModelProperty) 566ModelItem value; 590this.graphManager.OnPropertyEdgeAdded(dataModelProperty.Name, (ModelItem)parent, value); 597internal ModelItem SetValue(ModelPropertyImpl modelProperty, object value) 600ModelItem newValueModelItem = null; 605Dictionary<string, ModelItem> modelPropertyStore = ((IModelTreeItem)modelProperty.Parent).ModelPropertyStore; 606Dictionary<string, ModelItem> removedModelItems = new Dictionary<string, ModelItem>(modelPropertyStore); 609foreach (KeyValuePair<string, ModelItem> kvp in removedModelItems) 618if (value is ModelItem) 620newValueModelItem = (ModelItem)value; 723internal ModelItem WrapAsModelItem(object instance) 725ModelItem modelItem = GetModelItem(instance); 734internal ModelItem GetModelItem(object instance) 739public ModelItem GetModelItem(object instance, bool shouldExpandModelTree) 746ModelItem modelItem = null; 751modelItem = (ModelItem)mappedModelItem.Target; 862internal static IList<ModelItem> DepthFirstSearch(ModelItem currentItem, Predicate<Type> filter, Predicate<ModelItem> shouldTraverseSubTree, bool preOrder) 864IList<ModelItem> foundItems = new List<ModelItem>(); 865HashSet<ModelItem> alreadyVisitedItems = new HashSet<ModelItem>(); 870private static void RecursiveDepthFirstSearch(ModelItem currentItem, Predicate<Type> filter, Predicate<ModelItem> shouldTraverseSubTree, IList<ModelItem> foundItems, HashSet<ModelItem> alreadyVisitedItems, bool preOrder) 902List<ModelItem> neighbors = GetNeighbors(currentItem, (m) => true); 903foreach (ModelItem neighbor in neighbors) 920private void OnModelItemsAdded(IEnumerable<ModelItem> addedModelItems) 930private void OnModelItemsRemoved(IEnumerable<ModelItem> removedModelItems) 940internal class ModelGraphManager : GraphManager<ModelItem, Edge, BackPointer> 951public void OnPropertyEdgeAdded(string propertyName, ModelItem from, ModelItem to) 956public void OnItemEdgeAdded(ModelItem from, ModelItem to) 961public void OnPropertyEdgeRemoved(string propertyName, ModelItem from, ModelItem to) 966public void OnItemEdgeRemoved(ModelItem from, ModelItem to) 971public new void OnRootChanged(ModelItem oldRoot, ModelItem newRoot) 976protected override ModelItem Root 981protected override IEnumerable<ModelItem> GetVertices() 985ModelItem modelItem = weakReference.Target as ModelItem; 994protected override IEnumerable<Edge> GetOutEdges(ModelItem vertex) 1000foreach (KeyValuePair<string, ModelItem> kvp in ((IModelTreeItem)vertex).ModelPropertyStore) 1011foreach (ModelItem modelItem in collection.Distinct()) 1023List<ModelItem> items = new List<ModelItem>(dictionary.Keys); 1026foreach (ModelItem modelItem in items.Distinct()) 1038protected override IEnumerable<BackPointer> GetBackPointers(ModelItem vertex) 1042foreach (ModelItem parent in ((IModelTreeItem)vertex).ItemBackPointers) 1060protected override ModelItem GetDestinationVertexFromEdge(Edge edge) 1065protected override ModelItem GetSourceVertexFromEdge(Edge edge) 1070protected override ModelItem GetDestinationVertexFromBackPointer(BackPointer backPointer) 1121ModelItem from = edge.SourceVertex; 1171protected override void OnVerticesBecameReachable(IEnumerable<ModelItem> reachableVertices) 1177protected override void OnVerticesBecameUnreachable(IEnumerable<ModelItem> unreachableVertices)
System.Activities.Presentation\System\Activities\Presentation\Model\ModelTypeConverter.cs (8)
64ModelItem item = value as ModelItem; 83ModelItem item = value as ModelItem; 123ModelItem item = value as ModelItem; 217ModelItem item = value as ModelItem;
System.Activities.Presentation\System\Activities\Presentation\Model\ModelTypeDescriptorContextWrapper.cs (6)
47ModelItem item = instance as ModelItem; 69ModelItem item = this.context.Instance as ModelItem; 120private ModelItem _item; 122internal WrappedPropertyDescriptor(PropertyDescriptor parent, ModelItem item)
System.Activities.Presentation\System\Activities\Presentation\Model\ModelUtilities.cs (14)
16internal static bool IsSwitchCase(ModelItem modelItem) 45internal static TypeConverter GetConverter(ModelTreeManager modelTreeManager, ModelItem item) 51internal static PropertyDescriptor GetDefaultProperty(ModelItem item) 67internal static PropertyDescriptorCollection WrapProperties(ModelItem item) 78internal static ModelItem ReverseFindFirst(ModelItem start, Predicate<ModelItem> matcher) 83ModelItem result = null; 84ModelUtilities.ReverseTraverse(start, (ModelItem current) => 98internal static void ReverseTraverse(ModelItem start, Predicate<ModelItem> shouldContinue) 103HashSet<ModelItem> visited = new HashSet<ModelItem>(); 104ModelItem current = start;
System.Activities.Presentation\System\Activities\Presentation\Model\MorphHelper.cs (5)
16public delegate object PropertyValueMorphHelper(ModelItem originalValue, ModelProperty newModelProperty); 60public static void MorphObject(ModelItem oldModelItem, ModelItem newModelitem) 91public static void MorphProperties(ModelItem oldModelItem, ModelItem newModelitem)
System.Activities.Presentation\System\Activities\Presentation\Model\PropertyChange.cs (4)
16public ModelItem Owner { get; set; } 20public ModelItem OldValue { get; set; } 22public ModelItem NewValue { get; set; } 40ModelItem oldValue = dataModelProperty.Value;
System.Activities.Presentation\System\Activities\Presentation\Model\PropertyReferenceChange.cs (1)
13public ModelItem Owner { get; set; }
System.Activities.Presentation\System\Activities\Presentation\Model\SearchableEntry.cs (1)
12internal ModelItem ModelItem { get; set; }
System.Activities.Presentation\System\Activities\Presentation\NamespaceSettingsHandler.cs (2)
104ModelItem rootModel = sender as ModelItem;
System.Activities.Presentation\System\Activities\Presentation\ObjectReferenceService.cs (1)
100ModelItem modelItem = this.modelSearchService.FindModelItem(startLine, startColumn, endLine, endColumn);
System.Activities.Presentation\System\Activities\Presentation\ShowExpandedMultiValueConverter.cs (2)
25ModelItem modelItem = (ModelItem)values[0];
System.Activities.Presentation\System\Activities\Presentation\TypeNameConverter.cs (2)
20ModelItem modelItem = value as ModelItem;
System.Activities.Presentation\System\Activities\Presentation\UndoUnit.cs (2)
16ModelItem designerRoot; 44ModelItem currentDesignerRoot = ((WorkflowViewElement)designerView.RootDesigner).ModelItem;
System.Activities.Presentation\System\Activities\Presentation\Validation\ValidationService.cs (18)
229ValidationState GetValidationState(ModelItem modelItem) 241string GetValidationMessage(ModelItem modelItem) 261ValidationErrorState GetValidationError(ModelItem modelItem) 323ModelItem rootItem = this.modelService.Root; 419ModelItem rootModelItem = this.modelService.Root; 521internal static ModelItem FindModelItem(ModelTreeManager modelTreeManager, object sourceDetail) 686ModelItem errorModelItem = this.modelTreeManager.GetModelItem(errorItem); 693private void NotifyValidationPropertiesChanged(ModelItem modelItem) 712private static ModelItem FindActivityModelItem(ModelTreeManager modelTreeManager, Activity errorTarget) 715ModelItem lowestModelItem = null; 728ModelItem foundItem = null; 746private static ModelItem FindActivityModelItemFromRoot(ModelTreeManager modelTreeManager, Activity errorTarget) 748ModelItem root = modelTreeManager.Root; 752ModelItem propertiesModelItem = property == null ? null : property.Value; 753ModelItem foundItem = null; 814ModelItem modelItem; 886ModelItem modelItem = this.modelTreeManager.GetModelItem(sourceDetail) ?? FindModelItem(this.modelTreeManager, sourceDetail); 900ModelItem parent = modelItem.Parent;
System.Activities.Presentation\System\Activities\Presentation\VariableExpressionConverter.cs (2)
24if (value is ModelItem) 26convertedValue = ((ModelItem)value).GetCurrentValue();
System.Activities.Presentation\System\Activities\Presentation\View\ActivityTypeDesigner.xaml.cs (2)
129public ModelItem ExpandedChild 133ModelItem modelItemToSelect = null;
System.Activities.Presentation\System\Activities\Presentation\View\ArgumentDesigner.xaml.cs (39)
41typeof(ModelItem), 59ModelItem lastSelection; 98public ModelItem ActivitySchema 100get { return (ModelItem)GetValue(ActivitySchemaProperty); } 136ModelItem argument = this.GetArgumentCollection().Add(property); 179foreach (ModelItem argument in arguments) 193ModelItem current = this.Context.Items.GetValue<Selection>().PrimarySelection; 213internal void SelectArgument(ModelItem argument) 245List<ModelItem> newSelection = new List<ModelItem>(); 248foreach (ModelItem item in oldSelection.SelectedObjects) 271void OnActivitySchemaChanged(ModelItem newSchemaItem) 305foreach (ModelItem item in selection.SelectedObjects) 361foreach (ModelItem argument in e.NewItems) 364.FirstOrDefault(p => (ModelItem.Equals(p.ReflectedObject, argument))); 375foreach (ModelItem argument in e.OldItems) 377var wrapper = this.argumentWrapperCollection.FirstOrDefault(p => ModelItem.Equals(p.ReflectedObject, argument)); 513ModelItem oldItem = e.OldValue as ModelItem; 514ModelItem newItem = e.NewValue as ModelItem; 539ModelItem argument = argumentWrapper.ReflectedObject; 616List<ModelItem> list = new List<ModelItem>(); 626foreach (ModelItem modelItem in list) 772internal DesignTimeArgument(ModelItem argument, ArgumentDesigner editor) 858PropertyType = typeof(ModelItem), 1109ModelItem value = this.ReflectedObject.Properties[DesignTimeArgument.ArgumentDefaultValueProperty].Value; 1121ModelItem expression = result as ModelItem; 1142foreach (ModelItem item in attributes) 1173foreach (ModelItem toRemove in attributes.Where<ModelItem>(p => typeof(RequiredArgumentAttribute).IsAssignableFrom(p.ItemType))) 1183bool required = isRequired is ModelItem ? (bool)(((ModelItem)isRequired).GetCurrentValue()) : (bool)isRequired; 1201internal ModelItem GetOwnerSchemaProperty() 1302argumentCollection.Any<ModelItem>(p => string.Equals(p.Properties["Name"].ComputedValue, name) && !ModelItem.Equals(p, this.ReflectedObject)); 1360ModelItem expression = null;
System.Activities.Presentation\System\Activities\Presentation\View\BreadCrumbTextConverter.cs (6)
28if (values[0] is ModelItem) 30ModelItem boundModelItem = values[0] as ModelItem; 39if (values[1] is ModelItem) 41ModelItem displayNameProperty = (ModelItem)values[1];
System.Activities.Presentation\System\Activities\Presentation\View\DataGridHelper.cs (1)
1016internal static ModelItem GetSingleSelectedObject(DataGrid dataGrid)
System.Activities.Presentation\System\Activities\Presentation\View\DesignerView.Commands.cs (9)
237ModelItem target = null; 266ModelItem target = null; 1093ModelItem rootItem = ((WorkflowViewElement)this.RootDesigner).ModelItem; 1604foreach (ModelItem item in ModelTreeManager.Find(modelTreeManager.Root, new Predicate<ModelItem>(ModelItemExtensions.HasAnnotation), false)) 1628foreach (ModelItem item in ModelTreeManager.Find(modelTreeManager.Root, new Predicate<ModelItem>(ModelItemExtensions.HasAnnotation), false)) 1658foreach (ModelItem item in ModelTreeManager.Find(modelTreeManager.Root, new Predicate<ModelItem>(ModelItemExtensions.HasAnnotation), false))
System.Activities.Presentation\System\Activities\Presentation\View\DesignerView.xaml.cs (37)
58DependencyProperty.RegisterReadOnly("ActivitySchema", typeof(ModelItem), typeof(DesignerView), new UIPropertyMetadata(OnActivitySchemaChanged)); 81Dictionary<ModelItem, ModelItem> selectionMap = new Dictionary<ModelItem, ModelItem>(); 286public ModelItem ActivitySchema 288get { return (ModelItem)GetValue(ActivitySchemaProperty); } 419public void MakeRootDesigner(ModelItem modelItem) 429internal void MakeRootDesigner(ModelItem modelItem, bool setAsSelection) 434internal void ForceMakeRootDesigner(ModelItem modelItem) 442ModelItem rootModelItem = null; 450IEnumerable<ModelItem> items = ModelTreeManager.Find(rootModelItem, delegate(ModelItem current) 455IEnumerable<ModelItem> itemsToSelect = items 459.Where<ModelItem>(item => !ModelUtilities.IsModelItemKeyValuePair(item.ItemType) || ModelUtilities.IsSwitchCase(item)) 460.Except<ModelItem>(new ModelItem[] { rootModelItem }); 491static void UpdateAncestorFlag(ModelItem oldRoot, ModelItem newRoot) 507ModelItem parent = newRoot.Parent; 524ModelItem parent = oldRoot.Parent; 537internal void MakeRootDesigner(ModelItem modelItem, bool setAsSelection, bool checkIfCanBeMadeRoot) 539ModelItem currentRootModelItem = (this.RootDesigner != null) ? ((WorkflowViewElement)this.RootDesigner).ModelItem : null; 563Dictionary<ModelItem, ModelItem> newSelectionMap = new Dictionary<ModelItem, ModelItem>(); 564ModelItem newRootModelItem = modelItem; 915if (null != listBoxItem && listBoxItem.Content is ModelItem) 924this.MakeRootDesigner((ModelItem)listBoxItem.Content); 1060void SetAsRootDesignerView(ModelItem root, bool setAsSelection) 1072ModelItem selection = root; 1075ModelItem prevSelection = selectionMap[root]; 1357foreach (ModelItem item in selection.SelectedObjects) 1384var modelItemList = new List<ModelItem>(); 1387ModelItem item = ModelItemExtensions.GetModelItemFromPath(path, modelTreeManager.Root); 1432ModelItem item = ModelItemExtensions.GetModelItemFromPath(path, modelTreeManager.Root);
System.Activities.Presentation\System\Activities\Presentation\View\ExpressionTextBox.xaml.cs (8)
35public static readonly DependencyProperty ExpressionProperty = DependencyProperty.Register("Expression", typeof(ModelItem), typeof(ExpressionTextBox), 41public static readonly DependencyProperty OwnerActivityProperty = DependencyProperty.Register("OwnerActivity", typeof(ModelItem), typeof(ExpressionTextBox), 87public ModelItem Expression 89get { return (ModelItem)GetValue(ExpressionProperty); } 107public ModelItem OwnerActivity 109get { return (ModelItem)GetValue(OwnerActivityProperty); } 471ModelItem rootItem = this.Context.Services.GetService<ModelService>().Root; 821ActivityWithResult expression = (value as ModelItem).GetCurrentValue() as ActivityWithResult;
System.Activities.Presentation\System\Activities\Presentation\View\ExpressionValueEditor.cs (3)
29ModelItem item = (ModelItem)converter.Convert(propertyValue.ParentProperty, typeof(ModelItem), false, null);
System.Activities.Presentation\System\Activities\Presentation\View\IExpressionEditorService.cs (4)
17IExpressionEditorInstance CreateExpressionEditor(AssemblyContextControlItem assemblies, ImportedNamespaceContextItem importedNamespaces, List<ModelItem> variables, string text, Type expressionType); 18IExpressionEditorInstance CreateExpressionEditor(AssemblyContextControlItem assemblies, ImportedNamespaceContextItem importedNamespaces, List<ModelItem> variables, string text, Type expressionType, Size initialSize); 19IExpressionEditorInstance CreateExpressionEditor(AssemblyContextControlItem assemblies, ImportedNamespaceContextItem importedNamespaces, List<ModelItem> variables, string text); 20IExpressionEditorInstance CreateExpressionEditor(AssemblyContextControlItem assemblies, ImportedNamespaceContextItem importedNamespaces, List<ModelItem> variables, string text, Size initialSize);
System.Activities.Presentation\System\Activities\Presentation\View\ImportDesigner.xaml.cs (10)
59ModelItem lastSelection; 233ModelItem import = item as ModelItem; 244ModelItem importItem; 275bool TryGetWrapper(string imported, out ModelItem importItem) 278foreach (ModelItem item in this.importsModelItem) 296foreach (ModelItem namespaceModel in e.NewItems) 303foreach (ModelItem namespaceModel in e.OldItems) 316private void ValidateNamespaceModelAndUpdateContextItem(ModelItem namespaceModel) 735foreach (ModelItem namespaceModel in this.importsModelItem)
System.Activities.Presentation\System\Activities\Presentation\View\ImportedNamespaceContextItem.cs (1)
47foreach (ModelItem import in importsModelItem)
System.Activities.Presentation\System\Activities\Presentation\View\ModelPropertyPathExpanderConverter.cs (1)
31ModelItem convertedValue = property.Parent;
System.Activities.Presentation\System\Activities\Presentation\View\ParserContext.cs (5)
24ModelItem baseModelItem; 32public ParserContext(ModelItem modelItem) 71public bool Initialize(ModelItem modelItem) 117List<ModelItem> declaredVariables = VisualBasicEditor.GetVariablesInScope(this.baseModelItem); 119foreach (ModelItem modelItem in declaredVariables)
System.Activities.Presentation\System\Activities\Presentation\View\RubberBandSelector.cs (3)
269List<ModelItem> selectedModelItems = new List<ModelItem>(); 319ModelItem item = curSelection.PrimarySelection;
System.Activities.Presentation\System\Activities\Presentation\View\Selection.cs (38)
26private ICollection<ModelItem> _selectedObjects; 32_selectedObjects = new ModelItem[0]; 42public Selection(IEnumerable<ModelItem> selectedObjects) { 47List<ModelItem> selection = new List<ModelItem>(); 60public Selection(IEnumerable<ModelItem> selectedObjects, Predicate<ModelItem> match) { 64List<ModelItem> selection = new List<ModelItem>(); 65foreach (ModelItem o in selectedObjects) { 84List<ModelItem> selection = new List<ModelItem>(); 86ModelItem item = o as ModelItem; 103public Selection(IEnumerable selectedObjects, Predicate<ModelItem> match) { 107List<ModelItem> selection = new List<ModelItem>(); 109ModelItem item = o as ModelItem; 125public Selection(params ModelItem[] selectedObjects) 126: this((IEnumerable<ModelItem>)selectedObjects) { 134public ModelItem PrimarySelection { 136foreach (ModelItem obj in _selectedObjects) { 147public IEnumerable<ModelItem> SelectedObjects { 183public static Selection Select(EditingContext context, ModelItem itemToSelect) { 197foreach (ModelItem obj in existing.SelectedObjects) { 199List<ModelItem> list = new List<ModelItem>(existing.SelectedObjects); 222public static Selection SelectOnly(EditingContext context, ModelItem itemToSelect) { 230IEnumerator<ModelItem> en = existing.SelectedObjects.GetEnumerator(); 269public static Selection Toggle(EditingContext context, ModelItem itemToToggle) { 279List<ModelItem> list = new List<ModelItem>(existing.SelectedObjects); 302public static Selection Union(EditingContext context, ModelItem itemToAdd) { 315List<ModelItem> list = new List<ModelItem>(existing.SelectedObjects); 336internal static bool IsSelection(ModelItem item) 346internal static bool IsPrimarySelection(ModelItem item)
System.Activities.Presentation\System\Activities\Presentation\View\TreeView\ChangeNotificationTracker.cs (7)
17public Dictionary<ModelItem, HashSet<string>> TrackedModelItem { get; set; } 75this.TrackedModelItem = new Dictionary<ModelItem, HashSet<string>>(); 80public void Add(ModelItem modelItem, ModelProperty property) 85public void Add(ModelItem modelItem, string propertyName) 115foreach (ModelItem modelItem in TrackedModelItem.Keys) 141ModelItem modelItem = sender as ModelItem;
System.Activities.Presentation\System\Activities\Presentation\View\TreeView\DesignerTreeAutoExpandHelper.cs (7)
19internal static TreeViewItemViewModel Expand(TreeViewItemModelItemViewModel rootTreeViewItem, ModelItem modelItemToExpandTo) 33if (GetExpandingPath(modelItemToExpandTo, pathStack, new HashSet<ModelItem>())) 56where (child is TreeViewItemModelItemViewModel && ((TreeViewItemModelItemViewModel)child).VisualValue == item as ModelItem) 58|| (child is TreeViewItemKeyValuePairModelItemViewModel && ((TreeViewItemKeyValuePairModelItemViewModel)child).VisualValue.Value == item as ModelItem) 82private static bool GetExpandingPath(ModelItem modelItem, Stack pathStack, HashSet<ModelItem> itemSet) 121foreach (ModelItem item in modelItem.Parents)
System.Activities.Presentation\System\Activities\Presentation\View\TreeView\DesignerTreeView.xaml.cs (1)
30public void SetRootDesigner(ModelItem modelItem)
System.Activities.Presentation\System\Activities\Presentation\View\TreeView\DesignerTreeViewItem.cs (1)
141private void HighlightModelItemOnDesigner(ModelItem selectedModelItem)
System.Activities.Presentation\System\Activities\Presentation\View\TreeView\TreeViewItemKeyValuePairModelItemViewModel.cs (4)
15internal sealed class TreeViewItemKeyValuePairModelItemViewModel : TreeViewItemViewModel<KeyValuePair<ModelItem, ModelItem>> 17public TreeViewItemKeyValuePairModelItemViewModel(TreeViewItemViewModel parent, KeyValuePair<ModelItem, ModelItem> value) : base(parent)
System.Activities.Presentation\System\Activities\Presentation\View\TreeView\TreeViewItemModelItemViewModel.cs (6)
23internal sealed class TreeViewItemModelItemViewModel : TreeViewItemViewModel<ModelItem> 27public TreeViewItemModelItemViewModel(TreeViewItemViewModel parent, ModelItem modelItem, bool lazyLoad) 68public TreeViewItemModelItemViewModel(TreeViewItemViewModel parent, ModelItem modelItem) 76public override ModelItem VisualValue 274private static bool ModelItemHasDesigner(ModelItem modelItem) 416private TreeViewItemState UpdateModelItemState(ModelItem modelItem)
System.Activities.Presentation\System\Activities\Presentation\View\TreeView\TreeViewItemViewModel.cs (14)
25HashSet<ModelItem> uniqueChildren = null; 239if (typeof(ModelItem).IsAssignableFrom(value.GetType())) 241viewModel = new TreeViewItemModelItemViewModel(parent, value as ModelItem); 247else if (typeof(KeyValuePair<ModelItem, ModelItem>).IsAssignableFrom(value.GetType())) 249viewModel = new TreeViewItemKeyValuePairModelItemViewModel(parent, (KeyValuePair<ModelItem, ModelItem>)value); 254internal static void AddModelItem(TreeViewItemViewModel parent, ModelItem item, ModelProperty trackingProperty) 284foreach (ModelItem item in collection) 305ModelItem item = null; 311internal static void AddModelProperty(TreeViewItemViewModel parent, ModelItem item, ModelProperty trackingProperty, ModelProperty property) 458internal static bool IsPromotedProperty(ModelItem modelItem, ModelProperty property) 463internal static bool IsPromotedProperty(ModelItem modelItem, string propertyName) 473internal static void AddChild(TreeViewItemViewModel parent, ModelItem item, object value, bool duplicatedNodeVisible, string childNodePrefix, ModelProperty trackingProperty)
System.Activities.Presentation\System\Activities\Presentation\View\TreeView\UniqueModelItemHelper.cs (24)
27internal static HashSet<ModelItem> FindUniqueChildren(ModelProperty property) 29HashSet<ModelItem> retval = new HashSet<ModelItem>(); 32ModelItem target = property.Parent; 33ModelItem expected = property.Value; 34HashSet<ModelItem> visited = new HashSet<ModelItem>(); 86foreach (KeyValuePair<ModelItem, ModelItem> child in dictionary) 111foreach (ModelItem child in collection) 130private static void EnqueueParents(ModelItem item, Queue<ModelItem> queue) 132Dictionary<ModelItem, int> nonSources = new Dictionary<ModelItem, int>(); 136foreach (ModelItem parent in item.Parents) 166foreach (KeyValuePair<ModelItem, int> kvp in nonSources.Where((kvp) => 0 < kvp.Value)) 176private static bool UniqueRoute(ModelItem item, ModelItem targetParent, ModelItem expectedParent) 185HashSet<ModelItem> visited = new HashSet<ModelItem>(); 186Queue<ModelItem> todo = new Queue<ModelItem>(); 191ModelItem parent = todo.Dequeue();
System.Activities.Presentation\System\Activities\Presentation\View\VariableDesigner.xaml.cs (88)
53List<ModelItem> scopesList = new List<ModelItem>(); 56ModelItem variableToSelect = null; 58ModelItem lastSelection; 107public List<ModelItem> ScopesList 122ModelItem wrappedVariable = scope.Add(variable); 225var root = treeManager.Root; 228var validScope = this.scopesList.FirstOrDefault(p => ModelItem.Equals(p, root) || root.IsParentOf(p)); 230if (!ModelItem.Equals(validScope, this.CurrentVariableScope.Parent)) 242void Populate(ModelItem workflowElement) 274ModelItem current = this.Context.Items.GetValue<Selection>().PrimarySelection; 282internal void SelectVariable(ModelItem variable) 315List<ModelItem> newSelection = new List<ModelItem>(); 318foreach (ModelItem item in oldSelection.SelectedObjects) 355var current = this.Context.Items.GetValue<Selection>().PrimarySelection; 369void OnItemSelectedCore(ModelItem primarySelection) 374ModelItem element = VariableHelper.GetVariableScopeElement(primarySelection); 388foreach (ModelItem item in selection.SelectedObjects) 417foreach (ModelItem variable in e.NewItems) 420.FirstOrDefault<DesignTimeVariable>(p => (ModelItem.Equals(p.ReflectedObject, variable))); 449foreach (ModelItem variable in e.OldItems) 451DesignTimeVariable wrapper = this.variableWrapperCollection.FirstOrDefault(p => ModelItem.Equals(p.ReflectedObject, variable)); 455if (!this.ScopesList.Contains((sender as ModelItem).Parent) || isUndoRedoInProgress) 626List<ModelItem> list = new List<ModelItem>(); 636foreach (ModelItem modelItem in list) 762internal static ModelItemCollection GetVariableCollection(this ModelItem element) 780internal static ModelItem GetVariableScopeElement(this ModelItem element) 789internal static List<ModelItem> FindDeclaredVariables(this ModelItem element, IList<ModelItem> scopeList) 804internal static List<ModelItem> FindDeclaredVariables(this ModelItem element) 809internal static List<ModelItem> FindActivityDelegateArgumentsInScope(this ModelItem workflowElement) 811List<ModelItem> variables = new List<ModelItem>(); 824internal static List<ModelItem> FindActivityDelegateArguments(this ModelItem element) 826List<ModelItem> delegateArguments = new List<ModelItem>(); 834.Select<ModelProperty, ModelItem>(p => p.Value)); 840internal static List<ModelItem> FindVariablesInScope(this ModelItem element, IList<ModelItem> scopeList) 842List<ModelItem> variables = new List<ModelItem>(); 867internal static List<ModelItem> FindUniqueVariablesInScope(ModelItem element) 869Dictionary<string, ModelItem> variables = new Dictionary<string, ModelItem>(); 875foreach (ModelItem modelVariable in variablesInElement) 886return new List<ModelItem>(variables.Values); 890internal static List<ModelItem> FindVariablesInScope(ModelItem element) 941internal static ModelItem FindRootVariableScope(ModelItem element) 947ModelItem result = element.GetParentEnumerator().Where(p => null != VariableHelper.GetVariableCollection(p)).LastOrDefault(); 951internal static ModelItem FindCommonVariableScope(ModelItem scope1, ModelItem scope2) 1035PropertyType = typeof(ModelItem), 1036PropertyAttributes = TypeDescriptor.GetAttributes(typeof(ModelItem)).OfType<Attribute>().Union(new Attribute[] { new EditorAttribute(typeof(ScopeValueEditor), typeof(PropertyValueEditor)) }).ToArray(), 1116internal DesignTimeVariable(ModelItem modelItem, VariableDesigner editor) 1181modifiers is ModelItem ? (modifiers as ModelItem).GetCurrentValue() : modifiers); 1192ModelItem parent = this.ReflectedObject.Parent; 1231ModelItem expressionModelItem = this.ReflectedObject.Properties[VariableDefaultProperty].Value; 1264if (!ModelItem.Equals(newScope, this.GetVariableScope())) 1268ModelItem scope = (newScope as ModelItem) ?? Editor.ScopesList.FirstOrDefault(p => object.Equals(p.GetCurrentValue(), newScope)); 1284object expression = value is ModelItem ? ((ModelItem)value).GetCurrentValue() : value; 1295ModelItem s = this.ReflectedObject.Parent.Parent; 1411Func<ModelItem, bool> checkForDuplicates = 1412new Func<ModelItem, bool>(p => string.Equals(p.Properties[VariableNameProperty].ComputedValue, newName) && !object.Equals(p, this.ReflectedObject)); 1433ModelItem scope = (newValue as ModelItem) ?? Editor.ScopesList.FirstOrDefault(p => object.Equals(p.GetCurrentValue(), newValue)); 1436Func<ModelItem, bool> checkForDuplicates = 1437new Func<ModelItem, bool>(p => string.Equals(p.Properties[VariableNameProperty].ComputedValue, currentName) && !object.Equals(p, this.ReflectedObject)); 1464ModelItem designTimeVariable = value as ModelItem; 1484internal static string BuildToolTip(ModelItem entry, IMultiValueConverter displayNameConverter, CultureInfo culture) 1491ModelItem currentEntry = entry; 1523return BuildToolTip(value as ModelItem, this.baseConverter, culture);
System.Activities.Presentation\System\Activities\Presentation\View\ViewStateChangedEventArgs.cs (3)
13ModelItem parentModelItem; 18public ViewStateChangedEventArgs(ModelItem modelItem, string key, object newValue, object oldValue) 26public ModelItem ParentModelItem
System.Activities.Presentation\System\Activities\Presentation\View\ViewStateService.cs (5)
14public abstract object RetrieveViewState(ModelItem modelItem, string key); 15public abstract void StoreViewState(ModelItem modelItem, string key, object value); 16public abstract void StoreViewStateWithUndo(ModelItem modelItem, string key, object value); 17public abstract Dictionary<string, object> RetrieveAllViewState(ModelItem modelItem); 18public abstract bool RemoveViewState(ModelItem modelItem, string key);
System.Activities.Presentation\System\Activities\Presentation\View\ViewUtilities.cs (18)
18internal static bool DoesParentAlwaysExpandChildren(ModelItem modelItem, EditingContext context) 23internal static bool DoesParentAlwaysCollapseChildren(ModelItem modelItem, EditingContext context) 37internal static bool IsViewVisible(ModelItem child, ModelItem root, EditingContext context) 50ModelItem parent = ModelUtilities.ReverseFindFirst(child.Parent, (ModelItem current) => 60private static bool IsDefaultDesigner(EditingContext context, ModelItem item) 67private static bool HasView(ModelItem modelItem, WorkflowViewService viewService, bool allowDrillIn) 75internal static ModelItem GetParentModelItemWithView(ModelItem modelItem, EditingContext context, bool allowDrillIn) 84return ModelUtilities.ReverseFindFirst(modelItem.Parent, (ModelItem current) => 91internal static bool IsViewExpanded(ModelItem modelItem, EditingContext context) 117internal static bool IsBreadcrumbRoot(ModelItem modelItem, EditingContext context) 162static bool IsParentOfType(ModelItem modelItem, Type parentType, EditingContext context) 168static Type GetParentDesignerType(ModelItem modelItem, EditingContext context) 170ModelItem parent = GetParentModelItemWithView(modelItem, context, false); 205internal static string GetActivityBuilderDisplayName(ModelItem modelItem) 208ModelItem nameModelItem = modelItem.Properties["Name"].Value;
System.Activities.Presentation\System\Activities\Presentation\View\VirtualizedContainerService.cs (8)
42IDictionary<ModelItem, FrameworkElement> modelItemToContainer; 52this.modelItemToContainer = new Dictionary<ModelItem, FrameworkElement>(); 208internal FrameworkElement QueryContainerForItem(ModelItem item) 219public UIElement GetContainer(ModelItem modelItem, ICompositeView sourceContainer) 266public WorkflowViewElement GetViewElement(ModelItem modelItem, ICompositeView sourceContainer) 285ModelItem modelItem; 294public ModelItem ModelItem 316public VirtualizingContainer(VirtualizedContainerService containerService, ModelItem modelItem, ICompositeView sourceContainer)
System.Activities.Presentation\System\Activities\Presentation\View\VisualBasicEditor.xaml.cs (34)
103ModelItem boundedExpression = null; 517List<ModelItem> declaredVariables = VisualBasicEditor.GetVariablesInScope(this.OwnerActivity); 914ModelItem expressionModelItem = null; 1151ModelItem oldExpression = e.OldValue as ModelItem; 1156ModelItem expression = e.NewValue as ModelItem; 1186ModelItem item = sender as ModelItem; 1361ModelItem modelItem = (ModelItem)e.OldValue; 1954private static List<ModelItem> GetVariablesInScopeWithShadowing(ModelItem ownerActivity, bool includeArguments) 1956List<ModelItem> variablesInScope = new List<ModelItem>(); 1960ModelItem currentItem = ownerActivity; 1961Func<ModelItem, bool> filterDelegate = new Func<ModelItem, bool>((variable) => 1976List<ModelItem> variables = new List<ModelItem>(); 1987IEnumerable<ModelItem> filteredVariables = variables.Where<ModelItem>(filterDelegate); 1989foreach (ModelItem variable in filteredVariables) 1999List<ModelItem> arguments = VisualBasicEditor.GetVariablesForArguments(ownerActivity.Root); 2000variablesInScope.AddRange(arguments.Where<ModelItem>(filterDelegate)); 2007private static List<ModelItem> GetVariablesForArguments(ModelItem modelItem) 2009List<ModelItem> arguments = new List<ModelItem>(); 2020.Select<Variable, ModelItem>(entry => new FakeModelItemImpl(treeManager, typeof(Variable), entry, null))); 2026internal static List<ModelItem> GetVariablesInScope(ModelItem ownerActivity) 2028List<ModelItem> declaredVariables = new List<ModelItem>();
System.Activities.Presentation\System\Activities\Presentation\View\WorkflowViewManager.cs (7)
119IList<ModelItem> newSelectionObjects = newSelection.SelectedObjects as IList<ModelItem>; 120IList<ModelItem> oldSelectionObjects = oldSelection.SelectedObjects as IList<ModelItem>; 135HashSet<ModelItem> selectionChangeSet = new HashSet<ModelItem>(oldSelectionObjects); 137foreach (ModelItem selectionChangeMI in selectionChangeSet)
System.Activities.Presentation\System\Activities\Presentation\View\WorkflowViewService.cs (7)
38public WorkflowViewElement GetViewElement(ModelItem modelItem) 102private WorkflowViewElement GenerateErrorElement(ModelItem modelItem, string errorString) 165protected WorkflowViewElement CreateViewElement(ModelItem modelItem) 179internal WorkflowViewElement CreateDetachedViewElement(ModelItem modelItem) 194public override ModelItem GetModel(DependencyObject view) 210public override DependencyObject GetView(ModelItem model) 215internal bool ShouldAppearOnBreadCrumb(ModelItem modelItem, bool checkIfCanBeMadeRoot)
System.Activities.Presentation\System\Activities\Presentation\View\WorkflowViewStateService.cs (7)
61public override object RetrieveViewState(ModelItem modelItem, string key) 81public override void StoreViewState(ModelItem modelItem, string key, object value) 114public override bool RemoveViewState(ModelItem modelItem, string key) 137public override Dictionary<string, object> RetrieveAllViewState(ModelItem modelItem) 147public override void StoreViewStateWithUndo(ModelItem modelItem, string key, object value) 165void RaiseUndoableViewStateChangedEvent(ModelItem modelItem, string key, object newValue, object oldValue) 178public ModelItem Item { get; set; }
System.Activities.Presentation\System\Activities\Presentation\WorkflowDesigner.Helpers.cs (1)
44ViewManager GetViewManager(ModelItem modelItem)
System.Activities.Presentation\System\Activities\Presentation\WorkflowElementDialog.cs (3)
18typeof(ModelItem), 48public ModelItem ModelItem 50get { return (ModelItem)GetValue(ModelItemProperty); }
System.Activities.Presentation\System\Activities\Presentation\WorkflowItemPresenter.cs (28)
51DependencyProperty.Register("Item", typeof(ModelItem), typeof(WorkflowItemPresenter), new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, new PropertyChangedCallback(WorkflowItemPresenter.OnItemChanged))); 122if (modelObject is ModelItem) 124modelObject = ((ModelItem)droppedObject).GetCurrentValue(); 143if (droppedObject is ModelItem && ((ModelItem)droppedObject).View != null) 145WorkflowViewElement view = (WorkflowViewElement)((ModelItem)droppedObject).View; 174ModelItem sequenceActivity = WorkflowItemPresenter.AutoWrapInSequenceHandler(this.Context, args); 255foreach (ModelItem item in this.Item.Properties["Activities"].Collection) 342public ModelItem Item 344get { return (ModelItem)GetValue(ItemProperty); } 472this.Context.Items.SetValue(new Selection(new ModelItem[] { })); 503ModelItem newModelItem = newItem as ModelItem; 528bool CanUpdateItem(ModelItem newModelItem) 549if (droppedObject is ModelItem && ((ModelItem)droppedObject).View != null) 551DragDropHelper.SetDragDropMovedViewElements(args, new WorkflowViewElement[] { ((ModelItem)droppedObject).View as WorkflowViewElement }); 652private bool IsInParentChain(ModelItem droppedModelItem) 659ModelItem parentModelItem = parentViewElement.ModelItem; 679void ICompositeView.OnItemMoved(ModelItem modelItem) 693object ICompositeView.OnItemsCut(List<ModelItem> itemsToCut) 701object ICompositeView.OnItemsCopied(List<ModelItem> itemsToCopy) 722void ICompositeView.OnItemsDelete(List<ModelItem> itemsToDelete) 737((itemsToPaste[0] is ModelItem && this.CanUpdateItem((ModelItem)itemsToPaste[0])) || 791private static ModelItem AutoWrapInSequenceHandler(EditingContext editingContext, AutoWrapEventArgs e) 796ModelItem sequence = editingContext.Services.GetService<ModelTreeManager>().CreateModelItem(null, new Sequence()); 1198IEnumerable<ModelItem> draggedObjects = DragDropHelper.GetDraggedModelItems(e);
System.Activities.Presentation\System\Activities\Presentation\WorkflowItemsPresenter.cs (38)
249UIElement itemView = containerService.GetContainer((ModelItem)e.NewItems[0], this); 256ModelItem insertedItem = (ModelItem)e.NewItems[0]; 286IList<ModelItem> selectedItems = this.Context.Items.GetValue<Selection>().SelectedObjects.ToList(); 287foreach (ModelItem selectedAndRemovedItem in selectedItems.Intersect(e.OldItems.Cast<ModelItem>())) 395foreach (ModelItem item in this.Items) 451private IList<object> GetOrderMetaData(List<ModelItem> items) 453List<ModelItem> sortedList = this.SortSelectedItems(new List<ModelItem>(items)); 535private bool ShouldMoveItems(List<ModelItem> sortedModelItems, int index) 552private bool AreItemsConsecutive(List<ModelItem> sortedModelItems) 556foreach (ModelItem item in sortedModelItems) 567public List<ModelItem> SortSelectedItems(List<ModelItem> selectedItems) 578List<ModelItem> list = new List<ModelItem>(); 581foreach (ModelItem item in this.Items) 601public void OnItemsMoved(List<ModelItem> movedItems) 621List<ModelItem> internalMoveList = new List<ModelItem>(); 630ModelItem modelItem = droppedObject as ModelItem; 650foreach (ModelItem modelItem in internalMoveList) 687private void CheckListConsistentAndThrow(List<ModelItem> src, List<ModelItem> copied) 699ModelItem modelItem = droppedObject as ModelItem; 721private bool IsInParentChain(ModelItem droppedModelItem) 724ModelItem parentModelItem = this.Items; 739ModelItem insertedItem = null; 804public void OnItemMoved(ModelItem modelItem) 817public object OnItemsCut(List<ModelItem> itemsToCut) 820foreach (ModelItem item in itemsToCut) 828public object OnItemsCopied(List<ModelItem> itemsToCopy) 855List<ModelItem> modelItemsToSelect = new List<ModelItem>(); 885public void OnItemsDelete(List<ModelItem> itemsToDelete)
System.Activities.Presentation\System\Activities\Presentation\WorkflowViewElement.cs (20)
36DependencyProperty.Register("ModelItem", typeof(ModelItem), typeof(WorkflowViewElement), new FrameworkPropertyMetadata(null, new PropertyChangedCallback(WorkflowViewElement.OnModelItemChanged))); 308public ModelItem ModelItem 310get { return (ModelItem)GetValue(ModelItemProperty); } 529foreach (ModelItem item in selection.SelectedObjects) 655bool isSelected = this.Context.Items.GetValue<Selection>().SelectedObjects.Contains<ModelItem>(this.ModelItem); 677foreach (ModelItem item in selection.SelectedObjects) 730return selection.SelectedObjects.All<ModelItem>((p) => 922Dictionary<ModelItem, ICompositeView> sourceContainers = new Dictionary<ModelItem, ICompositeView>(); 925IEnumerable<ModelItem> selectedObjects = selection.SelectedObjects; 926IEnumerable<ModelItem> modelItemsToDrag = DragDropHelper.GetModelItemsToDrag(selectedObjects); 929foreach (ModelItem modelItem in modelItemsToDrag) 957Dictionary<ICompositeView, List<ModelItem>> containerMovedModelItemList = new Dictionary<ICompositeView, List<ModelItem>>(); 966containerMovedModelItemList.Add(compView, new List<ModelItem>()); 972foreach (KeyValuePair<ICompositeView, List<ModelItem>> pair in containerMovedModelItemList) 1003ModelItem movedItem = modelItemsToDrag.First<ModelItem>(); 1023foreach (ModelItem item in selectedObjects) 1085ModelItem modelItem = this.owner.ModelItem;
System.Activities.Presentation\System\Activities\Presentation\Xaml\ActivityBuilderHelper.cs (3)
12internal static bool IsActivityBuilderType(ModelItem modelItem) 27ModelItem astAsModelItem = input as ModelItem;
System.Activities.Presentation\System\Activities\Presentation\Xaml\ObjectToSourceLocationMapping.cs (16)
20private IDictionary<SourceLocation, ModelItem> sourceLocationToModelItemMapping; 21private IDictionary<SourceLocation, ModelItem> viewStateSourceLocationToModelItemMapping; 31this.sourceLocationToModelItemMapping = new Dictionary<SourceLocation, ModelItem>(); 32this.viewStateSourceLocationToModelItemMapping = new Dictionary<SourceLocation, ModelItem>(); 66private void UpdateSourceLocationToModelItemMapping(IEnumerable<ModelItem> modelItemsOnDesigner) 71foreach (ModelItem modelItem in modelItemsOnDesigner) 95internal ModelItem FindModelItem(SourceLocation srcLocation) 101internal ModelItem FindModelItemOfViewState(SourceLocation srcLocation) 107internal SourceLocation FindSourceLocation(ModelItem modelItem) 110KeyValuePair<SourceLocation, ModelItem>? matchingMappingRecord = sourceLocationToModelItemMapping.SingleOrDefault(kvp => object.ReferenceEquals(kvp.Value, modelItem)); 121private static ModelItem FindModelItemInMap(SourceLocation sourceLocation, IDictionary<SourceLocation, ModelItem> map) 132internal IEnumerable<ModelItem> GetObjectsWithSourceLocation() 165private static SourceLocation FindMatchSrcLocation(ModelItem modelItem, Dictionary<object, SourceLocation> mapping) 187private static SourceLocation GetExactLocation(SourceLocation approximateLocation, IDictionary<SourceLocation, ModelItem> mapping) 217IEnumerable<ModelItem> itemsOnDesigner = this.modelSearchService.GetItemsOnDesigner(preOrder: false, excludeRoot: false, excludeErrorActivity: false, excludeExpression: false, includeOtherObjects: true);