[amd64/tramp] hide interpreter specific trampoline behind ifdef
[mono.git] / mcs / class / referencesource / System.Activities.Presentation / System.Activities.Presentation / System / Activities / Presentation / WorkflowDesignerIcons.cs
1 //----------------------------------------------------------------
2 // <copyright company="Microsoft Corporation">
3 //     Copyright (c) Microsoft Corporation.  All rights reserved.
4 // </copyright>
5 //----------------------------------------------------------------
6
7 namespace System.Activities.Presentation
8 {
9     using System;
10 using System.Collections.Generic;
11 using System.Diagnostics.CodeAnalysis;
12 using System.Globalization;
13 using System.Linq;
14 using System.Text;
15 using System.Threading.Tasks;
16 using System.Windows;
17 using System.Windows.Controls;
18 using System.Windows.Media;
19 using System.Windows.Media.Imaging;
20     
21     /// <summary>
22     /// Exposes members representing an icon for a workflow out-of-box items.
23     /// </summary>
24     public static class WorkflowDesignerIcons
25     {
26         private static string addToCollectionIconName = "AddToCollectionIcon";
27         private static string annotationIndicatorIconName = "AnnotationIndicatorBrush";
28         private static string assignIconName = "AssignIcon";
29         private static string cancellationScopeIconName = "CancellationScopeIcon";
30         private static string clearCollectionIconName = "ClearCollectionIcon";
31         private static string compensableActivityIconName = "CompensableActivityIcon";
32         private static string compensateIconName = "CompensateIcon";
33         private static string confirmIconName = "ConfirmIcon";
34         private static string correlationScopeIconName = "CorrelationScopeIcon";
35         private static string delayIconName = "DelayIcon";
36         private static string deleteIconName = "DeleteIcon";
37         private static string deleteDisabledIconName = "DeleteDisabledIcon";
38         private static string doWhileIconName = "DoWhileIcon";
39         private static string entryIconName = "EntryIcon";
40         private static string errorValidationIconName = "ErrorValidationIcon";
41         private static string existsInCollectionIconName = "ExistsInCollectionIcon";
42         private static string exitIconName = "ExitIcon";
43         private static string extensionWindowHeaderCloseButtonName = "ExtensionWindowHeaderCloseButton";
44         private static string finalStateIconName = "FinalStateIcon";
45         private static string fitToScreenIconName = "FitToScreenIcon";
46         private static string flowchartIconName = "FlowchartIcon";
47         private static string flowDecisionIconName = "FlowDecisionIcon";
48         private static string flowDecisionIconBrushName = "FlowDecisionIconBrush";
49         private static string flowSwitchIconName = "FlowSwitchIcon";
50         private static string flowSwitchIconBrushName = "FlowSwitchIconBrush";
51         private static string forEachIconName = "ForEachIcon";
52         private static string genericLeafActivityIconName = "GenericLeafActivityIcon";
53         private static string ifIconName = "IfIcon";
54         private static string initializeCorrelationIconName = "InitializeCorrelationIcon";
55         private static string interopIconName = "InteropIcon";
56         private static string invokeDelegateIconName = "InvokeDelegateIcon";
57         private static string invokeMethodIconName = "InvokeMethodIcon";
58         private static string minimapIconName = "MinimapIcon";
59         private static string moveDownIconName = "MoveDownIcon";
60         private static string moveDownDisabledIconName = "MoveDownDisabledIcon";
61         private static string moveUpIconName = "MoveUpIcon";
62         private static string moveUpDisabledIconName = "MoveUpDisabledIcon";
63         private static string noPersistScopeIconName = "NoPersistScopeIcon";
64         private static string operationCopyIconName = "OperationCopyIcon";
65         private static string operationCopyDisabledIconName = "OperationCopyDisabledIcon";
66         private static string operationCutIconName = "OperationCutIcon";
67         private static string operationCutDisabledIconName = "OperationCutDisabledIcon";
68         private static string operationDeleteIconName = "OperationDeleteIcon";
69         private static string operationDeleteDisabledIconName = "OperationDeleteDisabledIcon";
70         private static string operationPasteIconName = "OperationPasteIcon";
71         private static string operationPasteDisabledIconName = "OperationPasteDisabledIcon";
72         private static string panModeIconName = "PanModeIcon";
73         private static string parallelForEachIconName = "ParallelForEachIcon";
74         private static string parallelIconName = "ParallelIcon";
75         private static string persistIconName = "PersistIcon";
76         private static string pickBranchIconName = "PickBranchIcon";
77         private static string pickIconName = "PickIcon";
78         private static string receiveAndSendReplyIconName = "ReceiveAndSendReplyIcon";
79         private static string receiveIconName = "ReceiveIcon";
80         private static string receiveReplyIconName = "ReceiveReplyIcon";
81         private static string removeFromCollectionIconName = "RemoveFromCollectionIcon";
82         private static string resizeGripIconName = "ResizeGripIcon";
83         private static string rethrowIconName = "RethrowIcon";
84         private static string sendAndReceiveReplyIconName = "SendAndReceiveReplyIcon";
85         private static string sendIconName = "SendIcon";
86         private static string sendReplyIconName = "SendReplyIcon";
87         private static string sequenceIconName = "SequenceIcon";
88         private static string startSymbolIconName = "StartSymbolIconBrush";
89         private static string stateIconName = "StateIcon";
90         private static string stateMachineIconName = "StateMachineIcon";
91         private static string switchIconName = "SwitchIcon";
92         private static string terminateWorkflowIconName = "TerminateWorkflowIcon";
93         private static string textBoxErrorIconName = "TextBoxErrorIcon";
94         private static string throwIconName = "ThrowIcon";
95         private static string toolboxDefaultCustomActivityName = "ToolboxDefaultCustomActivityIcon";
96         private static string transactedReceiveScopeIconName = "TransactedReceiveScopeIcon";
97         private static string transactionScopeIconName = "TransactionScopeIcon";
98         private static string transitionIconName = "TransitionIcon";
99         private static string tryCatchIconName = "TryCatchIcon";
100         private static string validationErrorIconName = "ValidationErrorIcon";
101         private static string warningValidationIconName = "WarningValidationIcon";
102         private static string whileIconName = "WhileIcon";
103         private static string writeLineIconName = "WriteLineIcon";
104         private static string zoomIconName = "ZoomIcon";
105
106         private static ResourceDictionary iconResourceDictionary;
107
108         internal static ResourceDictionary IconResourceDictionary
109         {
110             get
111             {
112                 if (WorkflowDesignerIcons.iconResourceDictionary == null)
113                 {
114                     InitializeDefaultResourceDictionary();
115                 }
116
117                 return WorkflowDesignerIcons.iconResourceDictionary;
118             }
119         }
120
121         internal static bool IsDefaultCutomActivitySetByUser { get; set; }
122
123         /// <summary>
124         /// Applies the WindowsApp style icons to all workflow out-of-box items.
125         /// </summary>
126         public static void UseWindowsStoreAppStyleIcons()
127         {
128             Uri resourceUri = new Uri(string.Concat(typeof(WorkflowDesignerIcons).Assembly.GetName().Name, @";component/Themes/Icons.WindowsApp.xaml"), UriKind.RelativeOrAbsolute);
129             ResourceDictionary windowsAppIcons = (ResourceDictionary)Application.LoadComponent(resourceUri);
130
131             if (WorkflowDesignerIcons.iconResourceDictionary == null)
132             {
133                 WorkflowDesignerIcons.iconResourceDictionary = new ResourceDictionary();
134             }
135
136             foreach (string key in windowsAppIcons.Keys)
137             {
138                 WorkflowDesignerIcons.iconResourceDictionary[key] = windowsAppIcons[key];
139             }
140
141             ImageSource enabledImagaSource = null;
142             ImageSource disabledImagaSource = null;
143
144             WorkflowDesignerIcons.LoadImageSourceFromResource("Copy.WindowsApp", out enabledImagaSource, out disabledImagaSource);
145             WorkflowDesignerIcons.iconResourceDictionary[WorkflowDesignerIcons.operationCopyIconName] = WorkflowDesignerIcons.MakeIcon(enabledImagaSource);
146             WorkflowDesignerIcons.iconResourceDictionary[WorkflowDesignerIcons.operationCopyDisabledIconName] = WorkflowDesignerIcons.MakeIcon(disabledImagaSource);
147
148             WorkflowDesignerIcons.LoadImageSourceFromResource("Cut.WindowsApp", out enabledImagaSource, out disabledImagaSource);
149             WorkflowDesignerIcons.iconResourceDictionary[WorkflowDesignerIcons.operationCutIconName] = WorkflowDesignerIcons.MakeIcon(enabledImagaSource);
150             WorkflowDesignerIcons.iconResourceDictionary[WorkflowDesignerIcons.operationCutDisabledIconName] = WorkflowDesignerIcons.MakeIcon(disabledImagaSource);
151
152             WorkflowDesignerIcons.LoadImageSourceFromResource("Delete.WindowsApp", out enabledImagaSource, out disabledImagaSource);
153             WorkflowDesignerIcons.iconResourceDictionary[WorkflowDesignerIcons.operationDeleteIconName] = WorkflowDesignerIcons.MakeIcon(enabledImagaSource);
154             WorkflowDesignerIcons.iconResourceDictionary[WorkflowDesignerIcons.operationDeleteDisabledIconName] = WorkflowDesignerIcons.MakeIcon(disabledImagaSource);
155
156             WorkflowDesignerIcons.LoadImageSourceFromResource("Paste.WindowsApp", out enabledImagaSource, out disabledImagaSource);
157             WorkflowDesignerIcons.iconResourceDictionary[WorkflowDesignerIcons.operationPasteIconName] = WorkflowDesignerIcons.MakeIcon(enabledImagaSource);
158             WorkflowDesignerIcons.iconResourceDictionary[WorkflowDesignerIcons.operationPasteDisabledIconName] = WorkflowDesignerIcons.MakeIcon(disabledImagaSource);
159
160             // reset the flag so that we display the toolbox default custom activity icons in toolbox.
161             WorkflowDesignerIcons.IsDefaultCutomActivitySetByUser = false;
162         }
163
164         private static void InitializeDefaultResourceDictionary()
165         {
166             Uri resourceUri = new Uri(string.Concat(typeof(WorkflowDesignerIcons).Assembly.GetName().Name, @";component/Themes/Icons.Default.xaml"), UriKind.RelativeOrAbsolute);
167             ResourceDictionary defaultIcons = (ResourceDictionary)Application.LoadComponent(resourceUri);
168
169             WorkflowDesignerIcons.iconResourceDictionary = new ResourceDictionary();
170
171             foreach (object key in defaultIcons.Keys)
172             {
173                 WorkflowDesignerIcons.iconResourceDictionary[key] = defaultIcons[key];
174             }
175
176             ImageSource enabledImagaSource = null;
177             ImageSource disabledImagaSource = null;
178
179             WorkflowDesignerIcons.LoadImageSourceFromResource("Copy.Default", out enabledImagaSource, out disabledImagaSource);
180             WorkflowDesignerIcons.iconResourceDictionary[WorkflowDesignerIcons.operationCopyIconName] = WorkflowDesignerIcons.MakeIcon(enabledImagaSource);
181             WorkflowDesignerIcons.iconResourceDictionary[WorkflowDesignerIcons.operationCopyDisabledIconName] = WorkflowDesignerIcons.MakeIcon(disabledImagaSource);
182
183             WorkflowDesignerIcons.LoadImageSourceFromResource("Cut.Default", out enabledImagaSource, out disabledImagaSource);
184             WorkflowDesignerIcons.iconResourceDictionary[WorkflowDesignerIcons.operationCutIconName] = WorkflowDesignerIcons.MakeIcon(enabledImagaSource);
185             WorkflowDesignerIcons.iconResourceDictionary[WorkflowDesignerIcons.operationCutDisabledIconName] = WorkflowDesignerIcons.MakeIcon(disabledImagaSource);
186
187             WorkflowDesignerIcons.LoadImageSourceFromResource("Delete.Default", out enabledImagaSource, out disabledImagaSource);
188             WorkflowDesignerIcons.iconResourceDictionary[WorkflowDesignerIcons.operationDeleteIconName] = WorkflowDesignerIcons.MakeIcon(enabledImagaSource);
189             WorkflowDesignerIcons.iconResourceDictionary[WorkflowDesignerIcons.operationDeleteDisabledIconName] = WorkflowDesignerIcons.MakeIcon(disabledImagaSource);
190
191             WorkflowDesignerIcons.LoadImageSourceFromResource("Paste.Default", out enabledImagaSource, out disabledImagaSource);
192             WorkflowDesignerIcons.iconResourceDictionary[WorkflowDesignerIcons.operationPasteIconName] = WorkflowDesignerIcons.MakeIcon(enabledImagaSource);
193             WorkflowDesignerIcons.iconResourceDictionary[WorkflowDesignerIcons.operationPasteDisabledIconName] = WorkflowDesignerIcons.MakeIcon(disabledImagaSource);
194         }
195
196         private static void LoadImageSourceFromResource(string iconName, out ImageSource enabledImageSource, out ImageSource disabledImageSource)
197         {
198             string uri = string.Format(CultureInfo.InvariantCulture, "pack://application:,,,/System.Activities.Presentation;component/Resources/{0}.png", iconName);
199             BitmapImage image = new BitmapImage(new Uri(uri, UriKind.Absolute));
200             PixelFormat format = PixelFormats.Bgra32;
201             int width = image.PixelWidth;
202             int height = image.PixelHeight;
203             int stride = ((width * format.BitsPerPixel) + 7) / 8;
204             uint[] pixels = new uint[stride * height];
205             
206             image.CopyPixels(pixels, stride, 0);
207
208             enabledImageSource = BitmapSource.Create(width, height, image.DpiX, image.DpiY, format, null, pixels, stride);
209
210             for (int i = 0; i < pixels.Length; ++i)
211             {
212                 pixels[i] = WorkflowDesignerIcons.MakePixelGray(pixels[i]);
213             }
214
215             disabledImageSource = BitmapSource.Create(width, height, image.DpiX, image.DpiY, format, null, pixels, stride);
216         }
217
218         private static DrawingBrush MakeIcon(ImageSource imageSource)
219         {
220             DrawingBrush icon = new DrawingBrush();
221             icon.Stretch = Stretch.Uniform;
222             icon.Drawing = new ImageDrawing(imageSource, new Rect(new Size(16, 16)));
223             return icon;
224         }
225
226         private static uint MakePixelGray(uint pixel)
227         {
228             byte blue = (byte)pixel;
229             byte green = (byte)(pixel >> 8);
230             byte red = (byte)(pixel >> 16);
231             byte alpha = (byte)(pixel >> 24);
232
233             byte gray = (byte)(((red * 77) + (green * 150) + (blue * 29) + 128) / 256);
234             return (uint)(alpha << 24 | gray << 16 | gray << 8 | gray);
235         }
236
237         /// <summary>
238         /// Exposes members representing an icon associating with workflow out-of-box activities.
239         /// These icons can be found in the toolbox and/or in the workflow designer.
240         /// </summary>
241         [SuppressMessage("Microsoft.Design", "CA1034", Justification = "This is what our design is.")]
242         [SuppressMessage("Microsoft.Naming", "CA1724", Justification = "This is what our design is.")]
243         public static class Activities
244         {
245             /// <summary>
246             /// Gets or sets the icon for AddToCollection activity.
247             /// </summary>
248             public static DrawingBrush AddToCollection
249             {
250                 get
251                 {
252                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.addToCollectionIconName] as DrawingBrush;
253                 }
254
255                 set
256                 {
257                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.addToCollectionIconName] = value;
258                 }
259             }
260
261             /// <summary>
262             /// Gets or sets the icon for Assign activity.
263             /// </summary>
264             public static DrawingBrush Assign
265             {
266                 get
267                 {
268                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.assignIconName] as DrawingBrush;
269                 }
270
271                 set
272                 {
273                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.assignIconName] = value;
274                 }
275             }
276
277             /// <summary>
278             /// Gets or sets the icon for CancellationScope activity.
279             /// </summary>
280             public static DrawingBrush CancellationScope
281             {
282                 get
283                 {
284                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.cancellationScopeIconName] as DrawingBrush;
285                 }
286
287                 set
288                 {
289                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.cancellationScopeIconName] = value;
290                 }
291             }
292
293             /// <summary>
294             /// Gets or sets the icon for ClearCollection activity.
295             /// </summary>
296             public static DrawingBrush ClearCollection
297             {
298                 get
299                 {
300                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.clearCollectionIconName] as DrawingBrush;
301                 }
302
303                 set
304                 {
305                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.clearCollectionIconName] = value;
306                 }
307             }
308
309             /// <summary>
310             /// Gets or sets the icon for CompensableActivity activity.
311             /// </summary>
312             public static DrawingBrush CompensableActivity
313             {
314                 get
315                 {
316                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.compensableActivityIconName] as DrawingBrush;
317                 }
318
319                 set
320                 {
321                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.compensableActivityIconName] = value;
322                 }
323             }
324
325             /// <summary>
326             /// Gets or sets the icon for Compensate activity.
327             /// </summary>
328             public static DrawingBrush Compensate
329             {
330                 get
331                 {
332                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.compensateIconName] as DrawingBrush;
333                 }
334
335                 set
336                 {
337                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.compensateIconName] = value;
338                 }
339             }
340
341             /// <summary>
342             /// Gets or sets the icon for Confirm activity.
343             /// </summary>
344             public static DrawingBrush Confirm
345             {
346                 get
347                 {
348                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.confirmIconName] as DrawingBrush;
349                 }
350
351                 set
352                 {
353                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.confirmIconName] = value;
354                 }
355             }
356
357             /// <summary>
358             /// Gets or sets the icon for CorrelationScope activity.
359             /// </summary>
360             public static DrawingBrush CorrelationScope
361             {
362                 get
363                 {
364                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.correlationScopeIconName] as DrawingBrush;
365                 }
366
367                 set
368                 {
369                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.correlationScopeIconName] = value;
370                 }
371             }
372
373             /// <summary>
374             /// Gets or sets the icon for Delay activity.
375             /// </summary>
376             public static DrawingBrush Delay
377             {
378                 get
379                 {
380                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.delayIconName] as DrawingBrush;
381                 }
382
383                 set
384                 {
385                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.delayIconName] = value;
386                 }
387             }
388
389             /// <summary>
390             /// Gets or sets the icon for DoWhile activity.
391             /// </summary>
392             public static DrawingBrush DoWhile
393             {
394                 get
395                 {
396                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.doWhileIconName] as DrawingBrush;
397                 }
398
399                 set
400                 {
401                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.doWhileIconName] = value;
402                 }
403             }
404
405             /// <summary>
406             /// Gets or sets the icon for ExistsInCollection activity.
407             /// </summary>
408             public static DrawingBrush ExistsInCollection
409             {
410                 get
411                 {
412                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.existsInCollectionIconName] as DrawingBrush;
413                 }
414
415                 set
416                 {
417                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.existsInCollectionIconName] = value;
418                 }
419             }
420
421             /// <summary>
422             /// Gets or sets the icon for FinalState.
423             /// </summary>
424             public static DrawingBrush FinalState
425             {
426                 get
427                 {
428                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.finalStateIconName] as DrawingBrush;
429                 }
430
431                 set
432                 {
433                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.finalStateIconName] = value;
434                 }
435             }
436
437             /// <summary>
438             /// Gets or sets the icon for Flowchart.
439             /// </summary>
440             public static DrawingBrush Flowchart
441             {
442                 get
443                 {
444                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.flowchartIconName] as DrawingBrush;
445                 }
446
447                 set
448                 {
449                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.flowchartIconName] = value;
450                 }
451             }
452
453             /// <summary>
454             /// Gets or sets the toolbox icon for FlowDecision.
455             /// </summary>
456             public static DrawingBrush FlowDecision
457             {
458                 get
459                 {
460                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.flowDecisionIconName] as DrawingBrush;
461                 }
462
463                 set
464                 {
465                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.flowDecisionIconName] = value;
466                 }
467             }
468
469             /// <summary>
470             /// Gets or sets the icon for the FlowDecision node in the designer.
471             /// </summary>
472             public static DrawingBrush FlowDecisionNode
473             {
474                 get
475                 {
476                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.flowDecisionIconBrushName] as DrawingBrush;
477                 }
478
479                 set
480                 {
481                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.flowDecisionIconBrushName] = value;
482                 }
483             }
484
485             /// <summary>
486             /// Gets or sets the toolbox icon for FlowSwitch.
487             /// </summary>
488             public static DrawingBrush FlowSwitch
489             {
490                 get
491                 {
492                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.flowSwitchIconName] as DrawingBrush;
493                 }
494
495                 set
496                 {
497                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.flowSwitchIconName] = value;
498                 }
499             }
500
501             /// <summary>
502             /// Gets or sets the icon for the FlowSwitch node in the designer.
503             /// </summary>
504             public static DrawingBrush FlowSwitchNode
505             {
506                 get
507                 {
508                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.flowSwitchIconBrushName] as DrawingBrush;
509                 }
510
511                 set
512                 {
513                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.flowSwitchIconBrushName] = value;
514                 }
515             }
516
517             /// <summary>
518             /// Gets or sets the icon for ForEach activity.
519             /// </summary>
520             public static DrawingBrush ForEach
521             {
522                 get
523                 {
524                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.forEachIconName] as DrawingBrush;
525                 }
526
527                 set
528                 {
529                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.forEachIconName] = value;
530                 }
531             }
532
533             /// <summary>
534             /// Gets or sets the default icon for custom activities.
535             /// </summary>
536             public static DrawingBrush DefaultCustomActivity
537             {
538                 get
539                 {
540                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.genericLeafActivityIconName] as DrawingBrush;
541                 }
542
543                 set
544                 {
545                     WorkflowDesignerIcons.IsDefaultCutomActivitySetByUser = true;
546                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.genericLeafActivityIconName] = value;
547                 }
548             }
549
550             /// <summary>
551             /// Gets or sets the icon for If activity.
552             /// </summary>
553             public static DrawingBrush If
554             {
555                 get
556                 {
557                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.ifIconName] as DrawingBrush;
558                 }
559
560                 set
561                 {
562                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.ifIconName] = value;
563                 }
564             }
565
566             /// <summary>
567             /// Gets or sets the icon for InitializeCorrelation activity.
568             /// </summary>
569             public static DrawingBrush InitializeCorrelation
570             {
571                 get
572                 {
573                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.initializeCorrelationIconName] as DrawingBrush;
574                 }
575
576                 set
577                 {
578                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.initializeCorrelationIconName] = value;
579                 }
580             }
581
582             /// <summary>
583             /// Gets or sets the icon for Interop activity.
584             /// </summary>
585             public static DrawingBrush Interop
586             {
587                 get
588                 {
589                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.interopIconName] as DrawingBrush;
590                 }
591
592                 set
593                 {
594                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.interopIconName] = value;
595                 }
596             }
597
598             /// <summary>
599             /// Gets or sets the icon for InvokeDelegate activity.
600             /// </summary>
601             public static DrawingBrush InvokeDelegate
602             {
603                 get
604                 {
605                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.invokeDelegateIconName] as DrawingBrush;
606                 }
607
608                 set
609                 {
610                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.invokeDelegateIconName] = value;
611                 }
612             }
613
614             /// <summary>
615             /// Gets or sets the icon for InvokeMethod activity.
616             /// </summary>
617             public static DrawingBrush InvokeMethod
618             {
619                 get
620                 {
621                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.invokeMethodIconName] as DrawingBrush;
622                 }
623
624                 set
625                 {
626                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.invokeMethodIconName] = value;
627                 }
628             }
629
630             /// <summary>
631             /// Gets or sets the icon for NoPersistScope activity.
632             /// </summary>
633             public static DrawingBrush NoPersistScope
634             {
635                 get
636                 {
637                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.noPersistScopeIconName] as DrawingBrush;
638                 }
639
640                 set
641                 {
642                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.noPersistScopeIconName] = value;
643                 }
644             }
645
646             /// <summary>
647             /// Gets or sets the icon for ParallelForEach activity.
648             /// </summary>
649             public static DrawingBrush ParallelForEach
650             {
651                 get
652                 {
653                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.parallelForEachIconName] as DrawingBrush;
654                 }
655
656                 set
657                 {
658                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.parallelForEachIconName] = value;
659                 }
660             }
661
662             /// <summary>
663             /// Gets or sets the icon for Parallel activity.
664             /// </summary>
665             public static DrawingBrush Parallel
666             {
667                 get
668                 {
669                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.parallelIconName] as DrawingBrush;
670                 }
671
672                 set
673                 {
674                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.parallelIconName] = value;
675                 }
676             }
677
678             /// <summary>
679             /// Gets or sets the icon for Persist activity.
680             /// </summary>
681             public static DrawingBrush Persist
682             {
683                 get
684                 {
685                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.persistIconName] as DrawingBrush;
686                 }
687
688                 set
689                 {
690                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.persistIconName] = value;
691                 }
692             }
693
694             /// <summary>
695             /// Gets or sets the icon for PickBranch.
696             /// </summary>
697             public static DrawingBrush PickBranch
698             {
699                 get
700                 {
701                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.pickBranchIconName] as DrawingBrush;
702                 }
703
704                 set
705                 {
706                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.pickBranchIconName] = value;
707                 }
708             }
709
710             /// <summary>
711             /// Gets or sets the icon for Pick activity.
712             /// </summary>
713             public static DrawingBrush Pick
714             {
715                 get
716                 {
717                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.pickIconName] as DrawingBrush;
718                 }
719
720                 set
721                 {
722                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.pickIconName] = value;
723                 }
724             }
725
726             /// <summary>
727             /// Gets or sets the icon for ReceiveAndSendReply.
728             /// </summary>
729             public static DrawingBrush ReceiveAndSendReply
730             {
731                 get
732                 {
733                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.receiveAndSendReplyIconName] as DrawingBrush;
734                 }
735
736                 set
737                 {
738                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.receiveAndSendReplyIconName] = value;
739                 }
740             }
741
742             /// <summary>
743             /// Gets or sets the icon for Receive activity.
744             /// </summary>
745             public static DrawingBrush Receive
746             {
747                 get
748                 {
749                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.receiveIconName] as DrawingBrush;
750                 }
751
752                 set
753                 {
754                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.receiveIconName] = value;
755                 }
756             }
757
758             /// <summary>
759             /// Gets or sets the icon for ReceiveReply activity.
760             /// </summary>
761             public static DrawingBrush ReceiveReply
762             {
763                 get
764                 {
765                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.receiveReplyIconName] as DrawingBrush;
766                 }
767
768                 set
769                 {
770                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.receiveReplyIconName] = value;
771                 }
772             }
773
774             /// <summary>
775             /// Gets or sets the icon for RemoveFromCollection activity.
776             /// </summary>
777             public static DrawingBrush RemoveFromCollection
778             {
779                 get
780                 {
781                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.removeFromCollectionIconName] as DrawingBrush;
782                 }
783
784                 set
785                 {
786                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.removeFromCollectionIconName] = value;
787                 }
788             }
789
790             /// <summary>
791             /// Gets or sets the icon for Rethrow activity.
792             /// </summary>
793             public static DrawingBrush Rethrow
794             {
795                 get
796                 {
797                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.rethrowIconName] as DrawingBrush;
798                 }
799
800                 set
801                 {
802                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.rethrowIconName] = value;
803                 }
804             }
805
806             /// <summary>
807             /// Gets or sets the icon for SendAndReceiveReply.
808             /// </summary>
809             public static DrawingBrush SendAndReceiveReply
810             {
811                 get
812                 {
813                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.sendAndReceiveReplyIconName] as DrawingBrush;
814                 }
815
816                 set
817                 {
818                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.sendAndReceiveReplyIconName] = value;
819                 }
820             }
821
822             /// <summary>
823             /// Gets or sets the icon for Send activity.
824             /// </summary>
825             public static DrawingBrush Send
826             {
827                 get
828                 {
829                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.sendIconName] as DrawingBrush;
830                 }
831
832                 set
833                 {
834                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.sendIconName] = value;
835                 }
836             }
837
838             /// <summary>
839             /// Gets or sets the icon for SendReply activity.
840             /// </summary>
841             public static DrawingBrush SendReply
842             {
843                 get
844                 {
845                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.sendReplyIconName] as DrawingBrush;
846                 }
847
848                 set
849                 {
850                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.sendReplyIconName] = value;
851                 }
852             }
853
854             /// <summary>
855             /// Gets or sets the icon for Sequence activity.
856             /// </summary>
857             public static DrawingBrush Sequence
858             {
859                 get
860                 {
861                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.sequenceIconName] as DrawingBrush;
862                 }
863
864                 set
865                 {
866                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.sequenceIconName] = value;
867                 }
868             }
869
870             /// <summary>
871             /// Gets or sets the icon for the Start node. This node is used in StateMachine and Flowchart.
872             /// </summary>
873             public static DrawingBrush StartNode
874             {
875                 get
876                 {
877                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.startSymbolIconName] as DrawingBrush;
878                 }
879
880                 set
881                 {
882                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.startSymbolIconName] = value;
883                 }
884             }
885
886             /// <summary>
887             /// Gets or sets the icon for State.
888             /// </summary>
889             public static DrawingBrush State
890             {
891                 get
892                 {
893                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.stateIconName] as DrawingBrush;
894                 }
895
896                 set
897                 {
898                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.stateIconName] = value;
899                 }
900             }
901
902             /// <summary>
903             /// Gets or sets the icon for a state entry in a state machine.
904             /// </summary>
905             public static DrawingBrush StateEntry
906             {
907                 get
908                 {
909                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.entryIconName] as DrawingBrush;
910                 }
911
912                 set
913                 {
914                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.entryIconName] = value;
915                 }
916             }
917
918             /// <summary>
919             /// Gets or sets the icon for a state exit in a state machine.
920             /// </summary>
921             public static DrawingBrush StateExit
922             {
923                 get
924                 {
925                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.exitIconName] as DrawingBrush;
926                 }
927
928                 set
929                 {
930                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.exitIconName] = value;
931                 }
932             }
933
934             /// <summary>
935             /// Gets or sets the icon for StateMachine activity.
936             /// </summary>
937             public static DrawingBrush StateMachine
938             {
939                 get
940                 {
941                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.stateMachineIconName] as DrawingBrush;
942                 }
943
944                 set
945                 {
946                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.stateMachineIconName] = value;
947                 }
948             }
949
950             /// <summary>
951             /// Gets or sets the icon for Switch activity.
952             /// </summary>
953             public static DrawingBrush Switch
954             {
955                 get
956                 {
957                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.switchIconName] as DrawingBrush;
958                 }
959
960                 set
961                 {
962                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.switchIconName] = value;
963                 }
964             }
965
966             /// <summary>
967             /// Gets or sets the icon for TerminateWorkflow activity.
968             /// </summary>
969             public static DrawingBrush TerminateWorkflow
970             {
971                 get
972                 {
973                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.terminateWorkflowIconName] as DrawingBrush;
974                 }
975
976                 set
977                 {
978                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.terminateWorkflowIconName] = value;
979                 }
980             }
981
982             /// <summary>
983             /// Gets or sets the icon for Throw activity.
984             /// </summary>
985             public static DrawingBrush Throw
986             {
987                 get
988                 {
989                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.throwIconName] as DrawingBrush;
990                 }
991
992                 set
993                 {
994                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.throwIconName] = value;
995                 }
996             }
997
998             /// <summary>
999             /// Gets or sets the icon for TransactedReceiveScope activity.
1000             /// </summary>
1001             public static DrawingBrush TransactedReceiveScope
1002             {
1003                 get
1004                 {
1005                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.transactedReceiveScopeIconName] as DrawingBrush;
1006                 }
1007
1008                 set
1009                 {
1010                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.transactedReceiveScopeIconName] = value;
1011                 }
1012             }
1013
1014             /// <summary>
1015             /// Gets or sets the icon for TransactionScope activity.
1016             /// </summary>
1017             public static DrawingBrush TransactionScope
1018             {
1019                 get
1020                 {
1021                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.transactionScopeIconName] as DrawingBrush;
1022                 }
1023
1024                 set
1025                 {
1026                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.transactionScopeIconName] = value;
1027                 }
1028             }
1029
1030             /// <summary>
1031             /// Gets or sets the icon for a state transition in a state machine.
1032             /// </summary>
1033             public static DrawingBrush StateTransition
1034             {
1035                 get
1036                 {
1037                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.transitionIconName] as DrawingBrush;
1038                 }
1039
1040                 set
1041                 {
1042                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.transitionIconName] = value;
1043                 }
1044             }
1045
1046             /// <summary>
1047             /// Gets or sets the icon for TryCatch activity.
1048             /// </summary>
1049             public static DrawingBrush TryCatch
1050             {
1051                 get
1052                 {
1053                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.tryCatchIconName] as DrawingBrush;
1054                 }
1055
1056                 set
1057                 {
1058                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.tryCatchIconName] = value;
1059                 }
1060             }
1061
1062             /// <summary>
1063             /// Gets or sets the icon for While activity.
1064             /// </summary>
1065             public static DrawingBrush While
1066             {
1067                 get
1068                 {
1069                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.whileIconName] as DrawingBrush;
1070                 }
1071
1072                 set
1073                 {
1074                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.whileIconName] = value;
1075                 }
1076             }
1077
1078             /// <summary>
1079             /// Gets or sets the icon for WriteLine activity.
1080             /// </summary>
1081             public static DrawingBrush WriteLine
1082             {
1083                 get
1084                 {
1085                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.writeLineIconName] as DrawingBrush;
1086                 }
1087
1088                 set
1089                 {
1090                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.writeLineIconName] = value;
1091                 }
1092             }
1093
1094             internal static DrawingBrush ToolboxDefaultCustomActivity
1095             {
1096                 get
1097                 {
1098                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.toolboxDefaultCustomActivityName] as DrawingBrush;
1099                 }
1100
1101                 set
1102                 {
1103                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.toolboxDefaultCustomActivityName] = value;
1104                 }
1105             }
1106         }
1107
1108         /// <summary>
1109         /// Exposes members representing an icon for the context menu items (right click menu) used in the workflow designer.
1110         /// </summary>
1111         [SuppressMessage("Microsoft.Design", "CA1034", Justification = "This is what our design is.")]
1112         public static class ContextMenuItems
1113         {
1114             /// <summary>
1115             /// Gets or sets the icon for the context menu Copy for when the menu is enabled.
1116             /// </summary>
1117             public static DrawingBrush Copy
1118             {
1119                 get
1120                 {
1121                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.operationCopyIconName] as DrawingBrush;
1122                 }
1123
1124                 set
1125                 {
1126                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.operationCopyIconName] = value;
1127                 }
1128             }
1129
1130             /// <summary>
1131             /// Gets or sets the icon for the context menu Copy for when the menu is disabled.
1132             /// </summary>
1133             public static DrawingBrush CopyDisabled
1134             {
1135                 get
1136                 {
1137                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.operationCopyDisabledIconName] as DrawingBrush;
1138                 }
1139
1140                 set
1141                 {
1142                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.operationCopyDisabledIconName] = value;
1143                 }
1144             }
1145
1146             /// <summary>
1147             /// Gets or sets the icon for the context menu Cut for when the menu is enabled.
1148             /// </summary>
1149             public static DrawingBrush Cut
1150             {
1151                 get
1152                 {
1153                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.operationCutIconName] as DrawingBrush;
1154                 }
1155
1156                 set
1157                 {
1158                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.operationCutIconName] = value;
1159                 }
1160             }
1161
1162             /// <summary>
1163             /// Gets or sets the icon for the context menu Cut for when the menu is disabled.
1164             /// </summary>
1165             public static DrawingBrush CutDisabled
1166             {
1167                 get
1168                 {
1169                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.operationCutDisabledIconName] as DrawingBrush;
1170                 }
1171
1172                 set
1173                 {
1174                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.operationCutDisabledIconName] = value;
1175                 }
1176             }
1177
1178             /// <summary>
1179             /// Gets or sets the icon for the context menu Delete for when the menu is enabled.
1180             /// </summary>
1181             public static DrawingBrush Delete
1182             {
1183                 get
1184                 {
1185                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.operationDeleteIconName] as DrawingBrush;
1186                 }
1187
1188                 set
1189                 {
1190                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.operationDeleteIconName] = value;
1191                 }
1192             }
1193
1194             /// <summary>
1195             /// Gets or sets the icon for the context menu Delete for when the menu is disabled.
1196             /// </summary>
1197             public static DrawingBrush DeleteDisabled
1198             {
1199                 get
1200                 {
1201                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.operationDeleteDisabledIconName] as DrawingBrush;
1202                 }
1203
1204                 set
1205                 {
1206                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.operationDeleteDisabledIconName] = value;
1207                 }
1208             }
1209
1210             /// <summary>
1211             /// Gets or sets the icon for the context menu Paste for when the menu is enabled.
1212             /// </summary>
1213             public static DrawingBrush Paste
1214             {
1215                 get
1216                 {
1217                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.operationPasteIconName] as DrawingBrush;
1218                 }
1219
1220                 set
1221                 {
1222                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.operationPasteIconName] = value;
1223                 }
1224             }
1225
1226             /// <summary>
1227             /// Gets or sets the icon for the context menu Paste for when the menu is disabled.
1228             /// </summary>
1229             public static DrawingBrush PasteDisabled
1230             {
1231                 get
1232                 {
1233                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.operationPasteDisabledIconName] as DrawingBrush;
1234                 }
1235
1236                 set
1237                 {
1238                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.operationPasteDisabledIconName] = value;
1239                 }
1240             }
1241         }
1242
1243         /// <summary>
1244         /// Exposes members representing an icon associated with the context menu items (right click menu) used
1245         /// in the workflow designer.
1246         /// </summary>
1247         [SuppressMessage("Microsoft.Design", "CA1034", Justification = "This is what our design is.")]
1248         public static class DesignerItems
1249         {
1250             /// <summary>
1251             /// Gets or sets the icon for an annotation.
1252             /// </summary>
1253             public static DrawingBrush Annotation
1254             {
1255                 get
1256                 {
1257                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.annotationIndicatorIconName] as DrawingBrush;
1258                 }
1259
1260                 set
1261                 {
1262                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.annotationIndicatorIconName] = value;
1263                 }
1264             }
1265
1266             /// <summary>
1267             /// Gets or sets the icon mainly for indicating errors in an activity definition.
1268             /// Note that there are 3 properties for error validation icons.
1269             /// These include ActivityErrorValidation, TextBoxErrorValidation and WorkflowErrorValidation.
1270             /// For consistency, the same icon should be used for all of them.
1271             /// </summary>
1272             public static DrawingBrush ActivityErrorValidation
1273             {
1274                 get
1275                 {
1276                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.errorValidationIconName] as DrawingBrush;
1277                 }
1278
1279                 set
1280                 {
1281                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.errorValidationIconName] = value;
1282                 }
1283             }
1284
1285             /// <summary>
1286             /// Gets or sets the icon for the delete button used in DynamicArgumentDialog and TypeCollectionDesigner.
1287             /// The icon is used for when the delete button is enabled.
1288             /// </summary>
1289             public static DrawingBrush DeleteButton
1290             {
1291                 get
1292                 {
1293                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.deleteIconName] as DrawingBrush;
1294                 }
1295
1296                 set
1297                 {
1298                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.deleteIconName] = value;
1299                 }
1300             }
1301
1302             /// <summary>
1303             /// Gets or sets the icon for the delete button used in DynamicArgumentDialog and TypeCollectionDesigner.
1304             /// The icon is used for when the delete button is disabled.
1305             /// </summary>
1306             public static DrawingBrush DeleteDisabledButton
1307             {
1308                 get
1309                 {
1310                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.deleteDisabledIconName] as DrawingBrush;
1311                 }
1312
1313                 set
1314                 {
1315                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.deleteDisabledIconName] = value;
1316                 }
1317             }
1318
1319             /// <summary>
1320             /// Gets or sets the icon for the Fit-To-Screen button located at the bottom right of the designer.
1321             /// </summary>
1322             public static DrawingBrush FitToScreen
1323             {
1324                 get
1325                 {
1326                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.fitToScreenIconName] as DrawingBrush;
1327                 }
1328
1329                 set
1330                 {
1331                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.fitToScreenIconName] = value;
1332                 }
1333             }
1334
1335             /// <summary>
1336             /// Gets or sets the icon for the Overview control  button (also known as MiniMap) located at the bottom right of the designer.
1337             /// </summary>
1338             public static DrawingBrush Overview
1339             {
1340                 get
1341                 {
1342                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.minimapIconName] as DrawingBrush;
1343                 }
1344
1345                 set
1346                 {
1347                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.minimapIconName] = value;
1348                 }
1349             }
1350
1351             /// <summary>
1352             /// Gets or sets the icon for the close button used in the Overview control (also known as MiniMap) window.
1353             /// </summary>
1354             public static DrawingBrush OverviewWindowCloseButton
1355             {
1356                 get
1357                 {
1358                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.extensionWindowHeaderCloseButtonName] as DrawingBrush;
1359                 }
1360
1361                 set
1362                 {
1363                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.extensionWindowHeaderCloseButtonName] = value;
1364                 }
1365             }
1366
1367             /// <summary>
1368             /// Gets or sets the icon for the move-down button used in DynamicArgumentDialog and TypeCollectionDesigner.
1369             /// The icon is used for when the delete button is enabled.
1370             /// </summary>
1371             public static DrawingBrush MoveDownButton
1372             {
1373                 get
1374                 {
1375                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.moveDownIconName] as DrawingBrush;
1376                 }
1377
1378                 set
1379                 {
1380                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.moveDownIconName] = value;
1381                 }
1382             }
1383
1384             /// <summary>
1385             /// Gets or sets the icon for the move-down button used in DynamicArgumentDialog and TypeCollectionDesigner.
1386             /// The icon is used for when the delete button is disabled.
1387             /// </summary>
1388             public static DrawingBrush MoveDownDisabledButton
1389             {
1390                 get
1391                 {
1392                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.moveDownDisabledIconName] as DrawingBrush;
1393                 }
1394
1395                 set
1396                 {
1397                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.moveDownDisabledIconName] = value;
1398                 }
1399             }
1400
1401             /// <summary>
1402             /// Gets or sets the icon for the move-up button used in DynamicArgumentDialog and TypeCollectionDesigner.
1403             /// The icon is used for when the delete button is enabled.
1404             /// </summary>
1405             public static DrawingBrush MoveUpButton
1406             {
1407                 get
1408                 {
1409                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.moveUpIconName] as DrawingBrush;
1410                 }
1411
1412                 set
1413                 {
1414                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.moveUpIconName] = value;
1415                 }
1416             }
1417
1418             /// <summary>
1419             /// Gets or sets the icon for the move-up button used in DynamicArgumentDialog and TypeCollectionDesigner.
1420             /// The icon is used for when the delete button is disabled.
1421             /// </summary>
1422             public static DrawingBrush MoveUpDisabledButton
1423             {
1424                 get
1425                 {
1426                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.moveUpDisabledIconName] as DrawingBrush;
1427                 }
1428
1429                 set
1430                 {
1431                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.moveUpDisabledIconName] = value;
1432                 }
1433             }
1434
1435             /// <summary>
1436             /// Gets or sets the icon for the Pan control button located at the bottom right of the designer.
1437             /// </summary>
1438             public static DrawingBrush PanMode
1439             {
1440                 get
1441                 {
1442                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.panModeIconName] as DrawingBrush;
1443                 }
1444
1445                 set
1446                 {
1447                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.panModeIconName] = value;
1448                 }
1449             }
1450
1451             /// <summary>
1452             /// Gets or sets the icon for the resize grip control found in FlowChart and State.
1453             /// </summary>
1454             public static DrawingBrush ResizeGrip
1455             {
1456                 get
1457                 {
1458                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.resizeGripIconName] as DrawingBrush;
1459                 }
1460
1461                 set
1462                 {
1463                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.resizeGripIconName] = value;
1464                 }
1465             }
1466
1467             /// <summary>
1468             /// Gets or sets the icon mainly for indicating errors in an expression textbox (e.g. textboxes inside an activity designer, property grid, arguments window, etc).
1469             /// Note that there are 3 properties for error validation icons.
1470             /// These include ActivityErrorValidation, TextBoxErrorValidation and WorkflowErrorValidation.
1471             /// For consistency, the same icon should be used for all of them.
1472             /// </summary>
1473             public static DrawingBrush TextBoxErrorValidation
1474             {
1475                 get
1476                 {
1477                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.textBoxErrorIconName] as DrawingBrush;
1478                 }
1479
1480                 set
1481                 {
1482                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.textBoxErrorIconName] = value;
1483                 }
1484             }
1485
1486             /// <summary>
1487             /// Gets or sets the icon mainly for indicating errors occurred when loading an invalid workflow Xaml into the designer.
1488             /// Note that there are 3 properties for error validation icons.
1489             /// These include ActivityErrorValidation, TextBoxErrorValidation and WorkflowErrorValidation.
1490             /// For consistency, the same icon should be used for all of them.
1491             /// </summary>
1492             public static DrawingBrush WorkflowErrorValidation
1493             {
1494                 get
1495                 {
1496                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.validationErrorIconName] as DrawingBrush;
1497                 }
1498
1499                 set
1500                 {
1501                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.validationErrorIconName] = value;
1502                 }
1503             }
1504
1505             /// <summary>
1506             /// Gets or sets the icon for indicating warnings.
1507             /// </summary>
1508             public static DrawingBrush WarningValidation
1509             {
1510                 get
1511                 {
1512                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.warningValidationIconName] as DrawingBrush;
1513                 }
1514
1515                 set
1516                 {
1517                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.warningValidationIconName] = value;
1518                 }
1519             }
1520
1521             /// <summary>
1522             /// Gets or sets the icon for the Zoom control button located at the bottom right of the designer.
1523             /// </summary>
1524             public static DrawingBrush Zoom
1525             {
1526                 get
1527                 {
1528                     return WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.zoomIconName] as DrawingBrush;
1529                 }
1530
1531                 set
1532                 {
1533                     WorkflowDesignerIcons.IconResourceDictionary[WorkflowDesignerIcons.zoomIconName] = value;
1534                 }
1535             }
1536         }
1537     }
1538 }