-
Notifications
You must be signed in to change notification settings - Fork 3
/
EventTrigger.xml
136 lines (136 loc) · 7.57 KB
/
EventTrigger.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<Type Name="EventTrigger" FullName="Microsoft.Maui.Controls.EventTrigger">
<TypeSignature Language="C#" Value="public sealed class EventTrigger : Microsoft.Maui.Controls.TriggerBase" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit EventTrigger extends Microsoft.Maui.Controls.TriggerBase" />
<TypeSignature Language="DocId" Value="T:Microsoft.Maui.Controls.EventTrigger" />
<TypeSignature Language="VB.NET" Value="Public NotInheritable Class EventTrigger
Inherits TriggerBase" />
<TypeSignature Language="C++ CLI" Value="public ref class EventTrigger sealed : Microsoft::Maui::Controls::TriggerBase" />
<TypeSignature Language="F#" Value="type EventTrigger = class
 inherit TriggerBase" />
<AssemblyInfo>
<AssemblyName>Microsoft.Maui.Controls</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>Microsoft.Maui.Controls.TriggerBase</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute>
<AttributeName Language="C#">[Microsoft.Maui.Controls.ContentProperty("Actions")]</AttributeName>
<AttributeName Language="F#">[<Microsoft.Maui.Controls.ContentProperty("Actions")>]</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Class that represents a triggering event and a list of <see cref="T:Microsoft.Maui.Controls.TriggerAction" /> objects that will be invoked when the event is raised.</summary>
<remarks>
<example>
<para>The example below shows how developers can use an event trigger to respond to events and update the value of a control property.</para>
<para>With the <c>ColorTriggerAction</c> class below defined in the <c>TriggerDemo</c> namespace:</para>
<code lang="csharp lang-csharp"><![CDATA[public class ColorTriggerAction : TriggerAction<Entry>
{
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];
}
}]]></code>
<para>the developer can use the XAML below to create a page that cycles the colors of a <see cref="T:Microsoft.Maui.Controls.Entry" /> text area through the colors of the rainbow as the user enters text.</para>
<code lang="XAML"><![CDATA[<?xml version="1.0" encoding="utf-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:TriggerDemo"
x:Class="TriggerDemo.TriggerDemoPage">
<StackLayout VerticalOptions="Center">
<Label Text="Do you see colors?"
VerticalOptions="Center"
HorizontalOptions="Center" />
<Entry Placeholder="Type stuff here."
VerticalOptions="Center"
HorizontalOptions="Center"
BackgroundColor="Black">
<Entry.Triggers>
<EventTrigger Event="TextChanged" >
<local:ColorTriggerAction />
</EventTrigger>
</Entry.Triggers>
</Entry>
</StackLayout>
</ContentPage>]]></code>
</example>
</remarks>
<altmember cref="T:Microsoft.Maui.Controls.Setter" />
<altmember cref="T:Microsoft.Maui.Controls.PropertyCondition" />
<altmember cref="T:Microsoft.Maui.Controls.DataTrigger" />
<altmember cref="T:Microsoft.Maui.Controls.Trigger" />
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public EventTrigger ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Maui.Controls.EventTrigger.#ctor" />
<MemberSignature Language="VB.NET" Value="Public Sub New ()" />
<MemberSignature Language="C++ CLI" Value="public:
 EventTrigger();" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Maui.Controls</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters />
<Docs>
<summary>Creates a new <see cref="T:Microsoft.Maui.Controls.EventTrigger" /> instance.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Actions">
<MemberSignature Language="C#" Value="public System.Collections.Generic.IList<Microsoft.Maui.Controls.TriggerAction> Actions { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Collections.Generic.IList`1<class Microsoft.Maui.Controls.TriggerAction> Actions" />
<MemberSignature Language="DocId" Value="P:Microsoft.Maui.Controls.EventTrigger.Actions" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Actions As IList(Of TriggerAction)" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::Collections::Generic::IList<Microsoft::Maui::Controls::TriggerAction ^> ^ Actions { System::Collections::Generic::IList<Microsoft::Maui::Controls::TriggerAction ^> ^ get(); };" />
<MemberSignature Language="F#" Value="member this.Actions : System.Collections.Generic.IList<Microsoft.Maui.Controls.TriggerAction>" Usage="Microsoft.Maui.Controls.EventTrigger.Actions" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Maui.Controls</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.Generic.IList<Microsoft.Maui.Controls.TriggerAction></ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the list of <see cref="T:Microsoft.Maui.Controls.TriggerAction" /> objects that will be invoked when the event that is identified by the <see cref="P:Microsoft.Maui.Controls.EventTrigger.Event" /> property is raised.</summary>
<value />
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Event">
<MemberSignature Language="C#" Value="public string Event { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string Event" />
<MemberSignature Language="DocId" Value="P:Microsoft.Maui.Controls.EventTrigger.Event" />
<MemberSignature Language="VB.NET" Value="Public Property Event As String" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::String ^ Event { System::String ^ get(); void set(System::String ^ value); };" />
<MemberSignature Language="F#" Value="member this.Event : string with get, set" Usage="Microsoft.Maui.Controls.EventTrigger.Event" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Maui.Controls</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the name of the event that will cause the actions that are contained in the <see cref="P:Microsoft.Maui.Controls.EventTrigger.Actions" /> to be invoked.</summary>
<value />
<remarks>To be added.</remarks>
</Docs>
</Member>
</Members>
</Type>