1
<Type Name="NSLocale+Notifications" FullName="MonoMac.Foundation.NSLocale+Notifications">
2
<TypeSignature Language="C#" Value="public static class NSLocale.Notifications" />
3
<TypeSignature Language="ILAsm" Value=".class nested public auto ansi abstract sealed beforefieldinit NSLocale/Notifications extends System.Object" />
5
<AssemblyName>MonoMac</AssemblyName>
6
<AssemblyVersion>0.0.0.0</AssemblyVersion>
9
<BaseTypeName>System.Object</BaseTypeName>
14
<para>Notification posted by the <see cref="T:MonoMac.Foundation.NSLocale" /> class.</para>
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>
22
<Member MemberName="ObserveCurrentLocaleDidChange">
23
<MemberSignature Language="C#" Value="public static MonoMac.Foundation.NSObject ObserveCurrentLocaleDidChange (EventHandler<MonoMac.Foundation.NSNotificationEventArgs> handler);" />
24
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class MonoMac.Foundation.NSObject ObserveCurrentLocaleDidChange(class System.EventHandler`1<class MonoMac.Foundation.NSNotificationEventArgs> handler) cil managed" />
25
<MemberType>Method</MemberType>
27
<AssemblyVersion>0.0.0.0</AssemblyVersion>
30
<ReturnType>MonoMac.Foundation.NSObject</ReturnType>
33
<Parameter Name="handler" Type="System.EventHandler<MonoMac.Foundation.NSNotificationEventArgs>" />
36
<param name="handler">Method to invoke when the notification is posted.</param>
37
<summary>Registers a method to be notified when the NSCurrentLocaleDidChangeNotification notification is posted.</summary>
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>
42
<para>The following example shows how you can use this method in your code</para>
50
notification = NSLocale.Notifications.ObserveObserveCurrentLocaleDidChange ((sender, args) => {
51
/* Access strongly typed args */
52
Console.WriteLine ("Notification: {0}", args.Notification);
56
notification.Dispose ();
61
NSObject notification;
62
void Callback (object sender, ObserveCurrentLocaleDidChange args)
64
// Access strongly typed args
65
Console.WriteLine ("Notification: {0}", args.Notification);
70
notification = NSLocale.Notifications.ObserveObserveCurrentLocaleDidChange (Callback);
75
notification.Dispose ();