[runtime] Fix corlib out of date error with disabled COM
[mono.git] / mcs / class / referencesource / System.Activities.Presentation / System.Activities.Presentation / System / Activities / Presentation / Base / Core / PropertyEditing / PropertyValueEditorCommands.cs
1 namespace System.Activities.Presentation.PropertyEditing {
2     using System;
3     using System.Windows;
4     using System.Windows.Input;
5
6     /// <summary>
7     /// Standard commands controling the PropertyValueEditing experience
8     /// </summary>
9     public static class PropertyValueEditorCommands {
10         // PropertyContainer mode-switching commands
11         private static RoutedCommand _showInlineEditor;
12         private static RoutedCommand _showExtendedPopupEditor;
13         private static RoutedCommand _showExtendedPinnedEditor;
14         private static RoutedCommand _showDialogEditor;
15
16         // Transaction commands
17         private static RoutedCommand _beginTransaction;
18         private static RoutedCommand _commitTransaction;
19         private static RoutedCommand _abortTransaction;
20
21         // Signal to the editor that PropertyContainer is done editing a particular value.
22         // It is up to the host to interpret this command as it sees fit.  Cider may decide
23         // to highlight the next property in the list.  Sparkle will return the focus back to
24         // the design surface.
25         private static RoutedCommand _finishEditing;
26
27         /// <summary>
28         /// Editors may raise this command to switch PropertyContainer mode Inline
29         /// </summary>
30         public static RoutedCommand ShowInlineEditor {
31             get {
32                 if (_showInlineEditor == null)
33                     _showInlineEditor = new RoutedCommand("ShowInlineEditor", typeof(PropertyValueEditorCommands));
34                 
35                 return _showInlineEditor; 
36             }
37         }
38
39         /// <summary>
40         /// Editors may raise this command to switch PropertyContainer mode ExtendedPopup
41         /// </summary>
42         public static RoutedCommand ShowExtendedPopupEditor {
43             get {
44                 if (_showExtendedPopupEditor == null)
45                     _showExtendedPopupEditor = new RoutedCommand("ShowExtendedPopupEditor", typeof(PropertyValueEditorCommands));
46                 
47                 return _showExtendedPopupEditor;
48             }
49         }
50
51         /// <summary>
52         /// Editors may raise this command to switch PropertyContainer mode ExtendedPinned
53         /// </summary>
54         public static RoutedCommand ShowExtendedPinnedEditor {
55             get {
56                 if (_showExtendedPinnedEditor == null)
57                     _showExtendedPinnedEditor = new RoutedCommand("ShowExtendedPinnedEditor", typeof(PropertyValueEditorCommands));
58                 
59                 return _showExtendedPinnedEditor;
60             } 
61         }
62
63         /// <summary>
64         /// Editors may raise this command to switch PropertyContainer mode Dialog
65         /// </summary>
66         public static RoutedCommand ShowDialogEditor {
67             get {
68                 if (_showDialogEditor == null)
69                     _showDialogEditor = new RoutedCommand("ShowDialogEditor", typeof(PropertyValueEditorCommands));
70                 
71                 return _showDialogEditor;
72             }
73         }
74
75         /// <summary>
76         /// Editors may raise this command to begin a transaction.
77         /// </summary>
78         public static RoutedCommand BeginTransaction {
79             get {
80                 if (_beginTransaction == null)
81                     _beginTransaction = new RoutedCommand("BeginTransaction", typeof(PropertyValueEditorCommands));
82                 
83                 return _beginTransaction; 
84             }
85         }
86
87         /// <summary>
88         /// Editors may raise this command to commit a transaction. If this command is
89         /// executed when there aren't any open transactions, an exception will be thrown.
90         /// </summary>
91         public static RoutedCommand CommitTransaction {
92             get {
93                 if (_commitTransaction == null)
94                     _commitTransaction = new RoutedCommand("CommitTransaction", typeof(PropertyValueEditorCommands));
95                 
96                 return _commitTransaction; 
97             } 
98         }
99
100         /// <summary>
101         /// Editors may raise this command to abort a transaction. If this command is
102         /// executed when there aren't any open transactions, an exception will be thrown.
103         /// </summary>
104         public static RoutedCommand AbortTransaction { 
105             get {
106                 if (_abortTransaction == null)
107                     _abortTransaction = new RoutedCommand("AbortTransaction", typeof(PropertyValueEditorCommands));
108                 
109                 return _abortTransaction;
110             }
111         }
112
113         /// <summary>
114         /// Editors may raise this command to indicate to the host that they have finished editing.
115         /// This allows the host to do cleanup or potentially change the focus to a different UIElement.
116         /// </summary>
117         public static RoutedCommand FinishEditing {
118             get {
119                 if (_finishEditing == null)
120                     _finishEditing = new RoutedCommand("FinishEditing", typeof(PropertyValueEditorCommands));
121                 
122                 return _finishEditing;
123             }
124         }
125     }
126 }