~ubuntu-branches/ubuntu/trusty/monodevelop/trusty-proposed

« back to all changes in this revision

Viewing changes to external/monomac/docs/en/MonoMac.Foundation/NSUndoManager+Notifications.xml

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2013-05-12 09:46:03 UTC
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20130512094603-mad323bzcxvmcam0
Tags: upstream-4.0.5+dfsg
ImportĀ upstreamĀ versionĀ 4.0.5+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<Type Name="NSUndoManager+Notifications" FullName="MonoMac.Foundation.NSUndoManager+Notifications">
 
2
  <TypeSignature Language="C#" Value="public static class NSUndoManager.Notifications" />
 
3
  <TypeSignature Language="ILAsm" Value=".class nested public auto ansi abstract sealed beforefieldinit NSUndoManager/Notifications extends System.Object" />
 
4
  <AssemblyInfo>
 
5
    <AssemblyName>MonoMac</AssemblyName>
 
6
    <AssemblyVersion>0.0.0.0</AssemblyVersion>
 
7
  </AssemblyInfo>
 
8
  <Base>
 
9
    <BaseTypeName>System.Object</BaseTypeName>
 
10
  </Base>
 
11
  <Interfaces />
 
12
  <Docs>
 
13
    <summary>
 
14
      <para>Notification posted by the <see cref="T:MonoMac.Foundation.NSUndoManager" /> class.</para>
 
15
    </summary>
 
16
    <remarks>
 
17
      <para>This is a static class which contains various helper methods that allow developers to observe events posted in the iOS notification hub (<see cref="T:MonoTouch.Foundation.NSNotificationCenter" />).</para>
 
18
      <para>The methods defined in this class post events invoke the provided method or lambda with a <see cref="T:MonoTouch.Foundation.NSNotificationEventArgs" /> parameter which contains strongly typed properties for the notification arguments.</para>
 
19
    </remarks>
 
20
  </Docs>
 
21
  <Members>
 
22
    <Member MemberName="ObserveCheckpoint">
 
23
      <MemberSignature Language="C#" Value="public static MonoMac.Foundation.NSObject ObserveCheckpoint (EventHandler&lt;MonoMac.Foundation.NSNotificationEventArgs&gt; handler);" />
 
24
      <MemberSignature Language="ILAsm" Value=".method public static hidebysig class MonoMac.Foundation.NSObject ObserveCheckpoint(class System.EventHandler`1&lt;class MonoMac.Foundation.NSNotificationEventArgs&gt; handler) cil managed" />
 
25
      <MemberType>Method</MemberType>
 
26
      <AssemblyInfo>
 
27
        <AssemblyVersion>0.0.0.0</AssemblyVersion>
 
28
      </AssemblyInfo>
 
29
      <ReturnValue>
 
30
        <ReturnType>MonoMac.Foundation.NSObject</ReturnType>
 
31
      </ReturnValue>
 
32
      <Parameters>
 
33
        <Parameter Name="handler" Type="System.EventHandler&lt;MonoMac.Foundation.NSNotificationEventArgs&gt;" />
 
34
      </Parameters>
 
35
      <Docs>
 
36
        <param name="handler">Method to invoke when the notification is posted.</param>
 
37
        <summary>Registers a method to be notified when the NSUndoManagerCheckpointNotification notification is posted.</summary>
 
38
        <returns>
 
39
          <para>The returned NSObject represents the registered notification.   Either call Dispose on the object to stop receiving notifications, or pass it to <see cref="M:MonoTouch.Foundation.NSNotification.RemoveObserver" /></para>
 
40
        </returns>
 
41
        <remarks>
 
42
          <para>The following example shows how you can use this method in your code</para>
 
43
          <example>
 
44
            <code lang="c#">
 
45
//
 
46
// Lambda style
 
47
//
 
48
 
 
49
// listening
 
50
notification = NSUndoManager.Notifications.ObserveObserveCheckpoint ((sender, args) =&gt; {
 
51
    /* Access strongly typed args */
 
52
    Console.WriteLine ("Notification: {0}", args.Notification);
 
53
});
 
54
 
 
55
// To stop listening:
 
56
notification.Dispose ();
 
57
 
 
58
//
 
59
//Method style
 
60
//
 
61
NSObject notification;
 
62
void Callback (object sender, ObserveCheckpoint args)
 
63
{
 
64
    // Access strongly typed args
 
65
    Console.WriteLine ("Notification: {0}", args.Notification);
 
66
}
 
67
 
 
68
void Setup ()
 
69
{
 
70
    notification = NSUndoManager.Notifications.ObserveObserveCheckpoint (Callback);
 
71
}
 
72
 
 
73
void Teardown ()
 
74
{
 
75
    notification.Dispose ();
 
76
}</code>
 
77
          </example>
 
78
        </remarks>
 
79
      </Docs>
 
80
    </Member>
 
81
    <Member MemberName="ObserveDidCloseUndoGroup">
 
82
      <MemberSignature Language="C#" Value="public static MonoMac.Foundation.NSObject ObserveDidCloseUndoGroup (EventHandler&lt;MonoMac.Foundation.NSUndoManagerCloseUndoGroupEventArgs&gt; handler);" />
 
83
      <MemberSignature Language="ILAsm" Value=".method public static hidebysig class MonoMac.Foundation.NSObject ObserveDidCloseUndoGroup(class System.EventHandler`1&lt;class MonoMac.Foundation.NSUndoManagerCloseUndoGroupEventArgs&gt; handler) cil managed" />
 
84
      <MemberType>Method</MemberType>
 
85
      <AssemblyInfo>
 
86
        <AssemblyVersion>0.0.0.0</AssemblyVersion>
 
87
      </AssemblyInfo>
 
88
      <ReturnValue>
 
89
        <ReturnType>MonoMac.Foundation.NSObject</ReturnType>
 
90
      </ReturnValue>
 
91
      <Parameters>
 
92
        <Parameter Name="handler" Type="System.EventHandler&lt;MonoMac.Foundation.NSUndoManagerCloseUndoGroupEventArgs&gt;" />
 
93
      </Parameters>
 
94
      <Docs>
 
95
        <param name="handler">Method to invoke when the notification is posted.</param>
 
96
        <summary>Registers a method to be notified when the NSUndoManagerDidCloseUndoGroupNotification notification is posted.</summary>
 
97
        <returns>
 
98
          <para>The returned NSObject represents the registered notification.   Either call Dispose on the object to stop receiving notifications, or pass it to <see cref="M:MonoTouch.Foundation.NSNotification.RemoveObserver" /></para>
 
99
        </returns>
 
100
        <remarks>
 
101
          <para>The following example shows how you can use this method in your code</para>
 
102
          <example>
 
103
            <code lang="c#">
 
104
//
 
105
// Lambda style
 
106
//
 
107
 
 
108
// listening
 
109
notification = NSUndoManager.Notifications.ObserveObserveDidCloseUndoGroup ((sender, args) =&gt; {
 
110
    /* Access strongly typed args */
 
111
    Console.WriteLine ("Notification: {0}", args.Notification);
 
112
 
 
113
    Console.WriteLine ("Discardable", args.Discardable);
 
114
});
 
115
 
 
116
// To stop listening:
 
117
notification.Dispose ();
 
118
 
 
119
//
 
120
//Method style
 
121
//
 
122
NSObject notification;
 
123
void Callback (object sender, ObserveDidCloseUndoGroup args)
 
124
{
 
125
    // Access strongly typed args
 
126
    Console.WriteLine ("Notification: {0}", args.Notification);
 
127
 
 
128
    Console.WriteLine ("Discardable", args.Discardable);
 
129
}
 
130
 
 
131
void Setup ()
 
132
{
 
133
    notification = NSUndoManager.Notifications.ObserveObserveDidCloseUndoGroup (Callback);
 
134
}
 
135
 
 
136
void Teardown ()
 
137
{
 
138
    notification.Dispose ();
 
139
}</code>
 
140
          </example>
 
141
        </remarks>
 
142
      </Docs>
 
143
    </Member>
 
144
    <Member MemberName="ObserveDidOpenUndoGroup">
 
145
      <MemberSignature Language="C#" Value="public static MonoMac.Foundation.NSObject ObserveDidOpenUndoGroup (EventHandler&lt;MonoMac.Foundation.NSNotificationEventArgs&gt; handler);" />
 
146
      <MemberSignature Language="ILAsm" Value=".method public static hidebysig class MonoMac.Foundation.NSObject ObserveDidOpenUndoGroup(class System.EventHandler`1&lt;class MonoMac.Foundation.NSNotificationEventArgs&gt; handler) cil managed" />
 
147
      <MemberType>Method</MemberType>
 
148
      <AssemblyInfo>
 
149
        <AssemblyVersion>0.0.0.0</AssemblyVersion>
 
150
      </AssemblyInfo>
 
151
      <ReturnValue>
 
152
        <ReturnType>MonoMac.Foundation.NSObject</ReturnType>
 
153
      </ReturnValue>
 
154
      <Parameters>
 
155
        <Parameter Name="handler" Type="System.EventHandler&lt;MonoMac.Foundation.NSNotificationEventArgs&gt;" />
 
156
      </Parameters>
 
157
      <Docs>
 
158
        <param name="handler">Method to invoke when the notification is posted.</param>
 
159
        <summary>Registers a method to be notified when the NSUndoManagerDidOpenUndoGroupNotification notification is posted.</summary>
 
160
        <returns>
 
161
          <para>The returned NSObject represents the registered notification.   Either call Dispose on the object to stop receiving notifications, or pass it to <see cref="M:MonoTouch.Foundation.NSNotification.RemoveObserver" /></para>
 
162
        </returns>
 
163
        <remarks>
 
164
          <para>The following example shows how you can use this method in your code</para>
 
165
          <example>
 
166
            <code lang="c#">
 
167
//
 
168
// Lambda style
 
169
//
 
170
 
 
171
// listening
 
172
notification = NSUndoManager.Notifications.ObserveObserveDidOpenUndoGroup ((sender, args) =&gt; {
 
173
    /* Access strongly typed args */
 
174
    Console.WriteLine ("Notification: {0}", args.Notification);
 
175
});
 
176
 
 
177
// To stop listening:
 
178
notification.Dispose ();
 
179
 
 
180
//
 
181
//Method style
 
182
//
 
183
NSObject notification;
 
184
void Callback (object sender, ObserveDidOpenUndoGroup args)
 
185
{
 
186
    // Access strongly typed args
 
187
    Console.WriteLine ("Notification: {0}", args.Notification);
 
188
}
 
189
 
 
190
void Setup ()
 
191
{
 
192
    notification = NSUndoManager.Notifications.ObserveObserveDidOpenUndoGroup (Callback);
 
193
}
 
194
 
 
195
void Teardown ()
 
196
{
 
197
    notification.Dispose ();
 
198
}</code>
 
199
          </example>
 
200
        </remarks>
 
201
      </Docs>
 
202
    </Member>
 
203
    <Member MemberName="ObserveDidRedoChange">
 
204
      <MemberSignature Language="C#" Value="public static MonoMac.Foundation.NSObject ObserveDidRedoChange (EventHandler&lt;MonoMac.Foundation.NSNotificationEventArgs&gt; handler);" />
 
205
      <MemberSignature Language="ILAsm" Value=".method public static hidebysig class MonoMac.Foundation.NSObject ObserveDidRedoChange(class System.EventHandler`1&lt;class MonoMac.Foundation.NSNotificationEventArgs&gt; handler) cil managed" />
 
206
      <MemberType>Method</MemberType>
 
207
      <AssemblyInfo>
 
208
        <AssemblyVersion>0.0.0.0</AssemblyVersion>
 
209
      </AssemblyInfo>
 
210
      <ReturnValue>
 
211
        <ReturnType>MonoMac.Foundation.NSObject</ReturnType>
 
212
      </ReturnValue>
 
213
      <Parameters>
 
214
        <Parameter Name="handler" Type="System.EventHandler&lt;MonoMac.Foundation.NSNotificationEventArgs&gt;" />
 
215
      </Parameters>
 
216
      <Docs>
 
217
        <param name="handler">Method to invoke when the notification is posted.</param>
 
218
        <summary>Registers a method to be notified when the NSUndoManagerDidRedoChangeNotification notification is posted.</summary>
 
219
        <returns>
 
220
          <para>The returned NSObject represents the registered notification.   Either call Dispose on the object to stop receiving notifications, or pass it to <see cref="M:MonoTouch.Foundation.NSNotification.RemoveObserver" /></para>
 
221
        </returns>
 
222
        <remarks>
 
223
          <para>The following example shows how you can use this method in your code</para>
 
224
          <example>
 
225
            <code lang="c#">
 
226
//
 
227
// Lambda style
 
228
//
 
229
 
 
230
// listening
 
231
notification = NSUndoManager.Notifications.ObserveObserveDidRedoChange ((sender, args) =&gt; {
 
232
    /* Access strongly typed args */
 
233
    Console.WriteLine ("Notification: {0}", args.Notification);
 
234
});
 
235
 
 
236
// To stop listening:
 
237
notification.Dispose ();
 
238
 
 
239
//
 
240
//Method style
 
241
//
 
242
NSObject notification;
 
243
void Callback (object sender, ObserveDidRedoChange args)
 
244
{
 
245
    // Access strongly typed args
 
246
    Console.WriteLine ("Notification: {0}", args.Notification);
 
247
}
 
248
 
 
249
void Setup ()
 
250
{
 
251
    notification = NSUndoManager.Notifications.ObserveObserveDidRedoChange (Callback);
 
252
}
 
253
 
 
254
void Teardown ()
 
255
{
 
256
    notification.Dispose ();
 
257
}</code>
 
258
          </example>
 
259
        </remarks>
 
260
      </Docs>
 
261
    </Member>
 
262
    <Member MemberName="ObserveDidUndoChange">
 
263
      <MemberSignature Language="C#" Value="public static MonoMac.Foundation.NSObject ObserveDidUndoChange (EventHandler&lt;MonoMac.Foundation.NSNotificationEventArgs&gt; handler);" />
 
264
      <MemberSignature Language="ILAsm" Value=".method public static hidebysig class MonoMac.Foundation.NSObject ObserveDidUndoChange(class System.EventHandler`1&lt;class MonoMac.Foundation.NSNotificationEventArgs&gt; handler) cil managed" />
 
265
      <MemberType>Method</MemberType>
 
266
      <AssemblyInfo>
 
267
        <AssemblyVersion>0.0.0.0</AssemblyVersion>
 
268
      </AssemblyInfo>
 
269
      <ReturnValue>
 
270
        <ReturnType>MonoMac.Foundation.NSObject</ReturnType>
 
271
      </ReturnValue>
 
272
      <Parameters>
 
273
        <Parameter Name="handler" Type="System.EventHandler&lt;MonoMac.Foundation.NSNotificationEventArgs&gt;" />
 
274
      </Parameters>
 
275
      <Docs>
 
276
        <param name="handler">Method to invoke when the notification is posted.</param>
 
277
        <summary>Registers a method to be notified when the NSUndoManagerDidUndoChangeNotification notification is posted.</summary>
 
278
        <returns>
 
279
          <para>The returned NSObject represents the registered notification.   Either call Dispose on the object to stop receiving notifications, or pass it to <see cref="M:MonoTouch.Foundation.NSNotification.RemoveObserver" /></para>
 
280
        </returns>
 
281
        <remarks>
 
282
          <para>The following example shows how you can use this method in your code</para>
 
283
          <example>
 
284
            <code lang="c#">
 
285
//
 
286
// Lambda style
 
287
//
 
288
 
 
289
// listening
 
290
notification = NSUndoManager.Notifications.ObserveObserveDidUndoChange ((sender, args) =&gt; {
 
291
    /* Access strongly typed args */
 
292
    Console.WriteLine ("Notification: {0}", args.Notification);
 
293
});
 
294
 
 
295
// To stop listening:
 
296
notification.Dispose ();
 
297
 
 
298
//
 
299
//Method style
 
300
//
 
301
NSObject notification;
 
302
void Callback (object sender, ObserveDidUndoChange args)
 
303
{
 
304
    // Access strongly typed args
 
305
    Console.WriteLine ("Notification: {0}", args.Notification);
 
306
}
 
307
 
 
308
void Setup ()
 
309
{
 
310
    notification = NSUndoManager.Notifications.ObserveObserveDidUndoChange (Callback);
 
311
}
 
312
 
 
313
void Teardown ()
 
314
{
 
315
    notification.Dispose ();
 
316
}</code>
 
317
          </example>
 
318
        </remarks>
 
319
      </Docs>
 
320
    </Member>
 
321
    <Member MemberName="ObserveWillCloseUndoGroup">
 
322
      <MemberSignature Language="C#" Value="public static MonoMac.Foundation.NSObject ObserveWillCloseUndoGroup (EventHandler&lt;MonoMac.Foundation.NSUndoManagerCloseUndoGroupEventArgs&gt; handler);" />
 
323
      <MemberSignature Language="ILAsm" Value=".method public static hidebysig class MonoMac.Foundation.NSObject ObserveWillCloseUndoGroup(class System.EventHandler`1&lt;class MonoMac.Foundation.NSUndoManagerCloseUndoGroupEventArgs&gt; handler) cil managed" />
 
324
      <MemberType>Method</MemberType>
 
325
      <AssemblyInfo>
 
326
        <AssemblyVersion>0.0.0.0</AssemblyVersion>
 
327
      </AssemblyInfo>
 
328
      <ReturnValue>
 
329
        <ReturnType>MonoMac.Foundation.NSObject</ReturnType>
 
330
      </ReturnValue>
 
331
      <Parameters>
 
332
        <Parameter Name="handler" Type="System.EventHandler&lt;MonoMac.Foundation.NSUndoManagerCloseUndoGroupEventArgs&gt;" />
 
333
      </Parameters>
 
334
      <Docs>
 
335
        <param name="handler">Method to invoke when the notification is posted.</param>
 
336
        <summary>Registers a method to be notified when the NSUndoManagerWillCloseUndoGroupNotification notification is posted.</summary>
 
337
        <returns>
 
338
          <para>The returned NSObject represents the registered notification.   Either call Dispose on the object to stop receiving notifications, or pass it to <see cref="M:MonoTouch.Foundation.NSNotification.RemoveObserver" /></para>
 
339
        </returns>
 
340
        <remarks>
 
341
          <para>The following example shows how you can use this method in your code</para>
 
342
          <example>
 
343
            <code lang="c#">
 
344
//
 
345
// Lambda style
 
346
//
 
347
 
 
348
// listening
 
349
notification = NSUndoManager.Notifications.ObserveObserveWillCloseUndoGroup ((sender, args) =&gt; {
 
350
    /* Access strongly typed args */
 
351
    Console.WriteLine ("Notification: {0}", args.Notification);
 
352
 
 
353
    Console.WriteLine ("Discardable", args.Discardable);
 
354
});
 
355
 
 
356
// To stop listening:
 
357
notification.Dispose ();
 
358
 
 
359
//
 
360
//Method style
 
361
//
 
362
NSObject notification;
 
363
void Callback (object sender, ObserveWillCloseUndoGroup args)
 
364
{
 
365
    // Access strongly typed args
 
366
    Console.WriteLine ("Notification: {0}", args.Notification);
 
367
 
 
368
    Console.WriteLine ("Discardable", args.Discardable);
 
369
}
 
370
 
 
371
void Setup ()
 
372
{
 
373
    notification = NSUndoManager.Notifications.ObserveObserveWillCloseUndoGroup (Callback);
 
374
}
 
375
 
 
376
void Teardown ()
 
377
{
 
378
    notification.Dispose ();
 
379
}</code>
 
380
          </example>
 
381
        </remarks>
 
382
      </Docs>
 
383
    </Member>
 
384
    <Member MemberName="ObserveWillRedoChange">
 
385
      <MemberSignature Language="C#" Value="public static MonoMac.Foundation.NSObject ObserveWillRedoChange (EventHandler&lt;MonoMac.Foundation.NSNotificationEventArgs&gt; handler);" />
 
386
      <MemberSignature Language="ILAsm" Value=".method public static hidebysig class MonoMac.Foundation.NSObject ObserveWillRedoChange(class System.EventHandler`1&lt;class MonoMac.Foundation.NSNotificationEventArgs&gt; handler) cil managed" />
 
387
      <MemberType>Method</MemberType>
 
388
      <AssemblyInfo>
 
389
        <AssemblyVersion>0.0.0.0</AssemblyVersion>
 
390
      </AssemblyInfo>
 
391
      <ReturnValue>
 
392
        <ReturnType>MonoMac.Foundation.NSObject</ReturnType>
 
393
      </ReturnValue>
 
394
      <Parameters>
 
395
        <Parameter Name="handler" Type="System.EventHandler&lt;MonoMac.Foundation.NSNotificationEventArgs&gt;" />
 
396
      </Parameters>
 
397
      <Docs>
 
398
        <param name="handler">Method to invoke when the notification is posted.</param>
 
399
        <summary>Registers a method to be notified when the NSUndoManagerWillRedoChangeNotification notification is posted.</summary>
 
400
        <returns>
 
401
          <para>The returned NSObject represents the registered notification.   Either call Dispose on the object to stop receiving notifications, or pass it to <see cref="M:MonoTouch.Foundation.NSNotification.RemoveObserver" /></para>
 
402
        </returns>
 
403
        <remarks>
 
404
          <para>The following example shows how you can use this method in your code</para>
 
405
          <example>
 
406
            <code lang="c#">
 
407
//
 
408
// Lambda style
 
409
//
 
410
 
 
411
// listening
 
412
notification = NSUndoManager.Notifications.ObserveObserveWillRedoChange ((sender, args) =&gt; {
 
413
    /* Access strongly typed args */
 
414
    Console.WriteLine ("Notification: {0}", args.Notification);
 
415
});
 
416
 
 
417
// To stop listening:
 
418
notification.Dispose ();
 
419
 
 
420
//
 
421
//Method style
 
422
//
 
423
NSObject notification;
 
424
void Callback (object sender, ObserveWillRedoChange args)
 
425
{
 
426
    // Access strongly typed args
 
427
    Console.WriteLine ("Notification: {0}", args.Notification);
 
428
}
 
429
 
 
430
void Setup ()
 
431
{
 
432
    notification = NSUndoManager.Notifications.ObserveObserveWillRedoChange (Callback);
 
433
}
 
434
 
 
435
void Teardown ()
 
436
{
 
437
    notification.Dispose ();
 
438
}</code>
 
439
          </example>
 
440
        </remarks>
 
441
      </Docs>
 
442
    </Member>
 
443
    <Member MemberName="ObserveWillUndoChange">
 
444
      <MemberSignature Language="C#" Value="public static MonoMac.Foundation.NSObject ObserveWillUndoChange (EventHandler&lt;MonoMac.Foundation.NSNotificationEventArgs&gt; handler);" />
 
445
      <MemberSignature Language="ILAsm" Value=".method public static hidebysig class MonoMac.Foundation.NSObject ObserveWillUndoChange(class System.EventHandler`1&lt;class MonoMac.Foundation.NSNotificationEventArgs&gt; handler) cil managed" />
 
446
      <MemberType>Method</MemberType>
 
447
      <AssemblyInfo>
 
448
        <AssemblyVersion>0.0.0.0</AssemblyVersion>
 
449
      </AssemblyInfo>
 
450
      <ReturnValue>
 
451
        <ReturnType>MonoMac.Foundation.NSObject</ReturnType>
 
452
      </ReturnValue>
 
453
      <Parameters>
 
454
        <Parameter Name="handler" Type="System.EventHandler&lt;MonoMac.Foundation.NSNotificationEventArgs&gt;" />
 
455
      </Parameters>
 
456
      <Docs>
 
457
        <param name="handler">Method to invoke when the notification is posted.</param>
 
458
        <summary>Registers a method to be notified when the NSUndoManagerWillUndoChangeNotification notification is posted.</summary>
 
459
        <returns>
 
460
          <para>The returned NSObject represents the registered notification.   Either call Dispose on the object to stop receiving notifications, or pass it to <see cref="M:MonoTouch.Foundation.NSNotification.RemoveObserver" /></para>
 
461
        </returns>
 
462
        <remarks>
 
463
          <para>The following example shows how you can use this method in your code</para>
 
464
          <example>
 
465
            <code lang="c#">
 
466
//
 
467
// Lambda style
 
468
//
 
469
 
 
470
// listening
 
471
notification = NSUndoManager.Notifications.ObserveObserveWillUndoChange ((sender, args) =&gt; {
 
472
    /* Access strongly typed args */
 
473
    Console.WriteLine ("Notification: {0}", args.Notification);
 
474
});
 
475
 
 
476
// To stop listening:
 
477
notification.Dispose ();
 
478
 
 
479
//
 
480
//Method style
 
481
//
 
482
NSObject notification;
 
483
void Callback (object sender, ObserveWillUndoChange args)
 
484
{
 
485
    // Access strongly typed args
 
486
    Console.WriteLine ("Notification: {0}", args.Notification);
 
487
}
 
488
 
 
489
void Setup ()
 
490
{
 
491
    notification = NSUndoManager.Notifications.ObserveObserveWillUndoChange (Callback);
 
492
}
 
493
 
 
494
void Teardown ()
 
495
{
 
496
    notification.Dispose ();
 
497
}</code>
 
498
          </example>
 
499
        </remarks>
 
500
      </Docs>
 
501
    </Member>
 
502
  </Members>
 
503
</Type>