diff --git a/docs/Xamarin.Forms.Core/Xamarin.Forms/Device.xml b/docs/Xamarin.Forms.Core/Xamarin.Forms/Device.xml index e4704d041..43acd6e8f 100644 --- a/docs/Xamarin.Forms.Core/Xamarin.Forms/Device.xml +++ b/docs/Xamarin.Forms.Core/Xamarin.Forms/Device.xml @@ -426,7 +426,7 @@ button.HeightRequest = Device.OnPlatform (20,30,30); Gets the indicating the OS Xamarin.Forms is working on. - A that indicates the current OS. + A that indicates the current OS. diff --git a/docs/Xamarin.Forms.Core/Xamarin.Forms/EventTrigger.xml b/docs/Xamarin.Forms.Core/Xamarin.Forms/EventTrigger.xml index 460d81a0a..5220c4696 100644 --- a/docs/Xamarin.Forms.Core/Xamarin.Forms/EventTrigger.xml +++ b/docs/Xamarin.Forms.Core/Xamarin.Forms/EventTrigger.xml @@ -21,25 +21,51 @@ Class that represents a triggering event and a list of objects that will be invoked when the event is raised. - XAML for Xamarin.Forms supports the following property for the class: - - - Property - Value - - - Event - - The name of the event to which to respond. - - - - Object name - - The qualified name of a implementation that has been defined by the application developer. This object is instantiated and its method is called when the triggering event is raised. Attributes on this tag set corresponding proptery values on the implementation before the method is called. - - + + The example below shows how developers can use an event trigger to respond to events and update the value of a control property. + With the ColorTriggerAction class below defined in the TriggerDemo namespace: + +{ + protected override void Invoke(Entry sender) + { + Color[] color ={ Color.Red, + Color.Orange, + Color.Yellow, + Color.Green, + Color.Blue, + Color.Indigo, + Color.Violet }; + sender.TextColor = color[sender.Text.Length % color.Length]; + } +}]]> + the developer can use the XAML below to create a page that cycles the colors of a text area through the colors of the rainbow as the user enters text. + + + + +]]> + + + + + diff --git a/docs/Xamarin.Forms.Core/Xamarin.Forms/MasterDetailPage.xml b/docs/Xamarin.Forms.Core/Xamarin.Forms/MasterDetailPage.xml index 54dafaad7..d405f0948 100644 --- a/docs/Xamarin.Forms.Core/Xamarin.Forms/MasterDetailPage.xml +++ b/docs/Xamarin.Forms.Core/Xamarin.Forms/MasterDetailPage.xml @@ -553,7 +553,7 @@ namespace FormsGallery - Method that is called when the property of this is set. + Method that is called when the property of this is set. To be added. diff --git a/docs/Xamarin.Forms.Core/Xamarin.Forms/Trigger.xml b/docs/Xamarin.Forms.Core/Xamarin.Forms/Trigger.xml index 3bde4c703..1be2ca38b 100644 --- a/docs/Xamarin.Forms.Core/Xamarin.Forms/Trigger.xml +++ b/docs/Xamarin.Forms.Core/Xamarin.Forms/Trigger.xml @@ -26,7 +26,79 @@ Class that represents a property condition and an action that is performed when the condition is met. - To be added. + + The class is suitable for checking the values of any property on the control to which it has been added. That is, its default binding context is the control to which it has been added. To bind on controls other than the parent, developers should use the class, instead. + + The XML example below prompts the user to type in the secret, which is, "The text color is red". When the user has typed the secret, the Entry text changes color to red. The code is turned back to the default color if the user then edits the text to differ from the secret. This example shows how to bind to the enclosing control with a trigger. + + + + + + +]]> + + + The example below shows how developers can use a trigger to respond to events and update the value of a control property by using classes. The example prompts the user to answer a question about the color of the text, and then calls ColorTriggerAction to turn the text red when the user types "The text color is red". Developers should note that, while this example does not change the text back to the default color when the user continues to edit the string, the developer could additionally implement and specify an exit action to obtain that result. + With the ColorTriggerAction class below defined in the TriggerDemo namespace: + +{ + protected override void Invoke(Entry sender) + { + sender.TextColor = Color.Red; + } +}]]> + the developer can use the XAML below to create the page that responds to the secret string by changing the color of the text area to red. + + + + + +]]> + + + + + + diff --git a/docs/Xamarin.Forms.Core/Xamarin.Forms/TriggerAction`1.xml b/docs/Xamarin.Forms.Core/Xamarin.Forms/TriggerAction`1.xml index f1748b042..611400ca5 100644 --- a/docs/Xamarin.Forms.Core/Xamarin.Forms/TriggerAction`1.xml +++ b/docs/Xamarin.Forms.Core/Xamarin.Forms/TriggerAction`1.xml @@ -24,7 +24,48 @@ The type of which the property must be an instance. A generic base class for user-defined actions that are performed when a trigger condition is met. + + The example below shows how developers can use a trigger to respond to events and update the value of a control property by using classes. The example prompts the user to answer a question about the color of the text, and then calls ColorTriggerAction to turn the text red when the user types "The text color is red". Developers should note that, while this example does not change the text back to the default color when the user continues to edit the string, the developer could additionally implement and specify an exit action to obtain that result. + With the ColorTriggerAction class below defined in the TriggerDemo namespace: + +{ + protected override void Invoke(Entry sender) + { + sender.TextColor = Color.Red; + } +}]]> + the developer can use the XAML below to create the page that responds to the secret string by changing the color of the text area to red. + + + + + +]]> + + + + diff --git a/docs/Xamarin.Forms.Maps/Xamarin.Forms.Maps/MapSpan.xml b/docs/Xamarin.Forms.Maps/Xamarin.Forms.Maps/MapSpan.xml index 72c50b801..a8031e0c3 100644 --- a/docs/Xamarin.Forms.Maps/Xamarin.Forms.Maps/MapSpan.xml +++ b/docs/Xamarin.Forms.Maps/Xamarin.Forms.Maps/MapSpan.xml @@ -140,7 +140,7 @@ To be added. To be added. - Returns a that displays the area that is defined by and . + Returns a that displays the area that is defined by and . To be added. To be added.