<Type Name="Trigger" FullName="Microsoft.Maui.Controls.Trigger">
  <TypeSignature Language="C#" Value="public sealed class Trigger : Microsoft.Maui.Controls.TriggerBase, Microsoft.Maui.Controls.Xaml.IValueProvider" />
  <TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit Trigger extends Microsoft.Maui.Controls.TriggerBase implements class Microsoft.Maui.Controls.Xaml.IValueProvider" />
  <TypeSignature Language="DocId" Value="T:Microsoft.Maui.Controls.Trigger" />
  <TypeSignature Language="F#" Value="type Trigger = class&#xA;    inherit TriggerBase&#xA;    interface IValueProvider" />
  <AssemblyInfo>
    <AssemblyName>Microsoft.Maui.Controls.Core</AssemblyName>
    <AssemblyVersion>0.0.0.0</AssemblyVersion>
    <AssemblyVersion>1.3.0.0</AssemblyVersion>
    <AssemblyVersion>1.4.0.0</AssemblyVersion>
    <AssemblyVersion>1.5.0.0</AssemblyVersion>
    <AssemblyVersion>2.0.0.0</AssemblyVersion>
  </AssemblyInfo>
  <Base>
    <BaseTypeName>Microsoft.Maui.Controls.TriggerBase</BaseTypeName>
  </Base>
  <Interfaces>
    <Interface>
      <InterfaceName>Microsoft.Maui.Controls.Xaml.IValueProvider</InterfaceName>
    </Interface>
  </Interfaces>
  <Attributes>
    <Attribute>
      <AttributeName>Microsoft.Maui.Controls.ContentProperty("Setters")</AttributeName>
    </Attribute>
    <Attribute>
      <AttributeName>Microsoft.Maui.Controls.Xaml.AcceptEmptyServiceProvider</AttributeName>
    </Attribute>
  </Attributes>
  <Docs>
    <summary>Class that represents a property condition and an action that is performed when the condition is met.</summary>
    <remarks>
      <para>The <see cref="T:Microsoft.Maui.Controls.Trigger" /> 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 <see cref="T:Microsoft.Maui.Controls.DataTrigger" /> class, instead.</para>
      <example>
        <para>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.</para>
        <code lang="XML"><![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="Tell me the secret"
               VerticalOptions="Center"
               HorizontalOptions="Center" />
        <Entry Placeholder="Type the secret here."
               VerticalOptions="Center"
               HorizontalOptions="Center">
            <Entry.Triggers>
                <Trigger TargetType="Entry"
                    Property="Text"
                    Value="The text color is red">
                    <Setter Property="TextColor" Value="Red" />
                </Trigger>
            </Entry.Triggers>
        </Entry>
    </StackLayout>
</ContentPage>
    
]]></code>
      </example>
      <example>
        <para>The example below shows how developers can use a trigger to respond to events and update the value of a control property by using <see cref="T:Microsoft.Maui.Controls.TriggerAction`1" /> classes. The example prompts the user to answer a question about the color of the text, and then calls <c>ColorTriggerAction</c> 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.</para>
        <para>With the ColorTriggerAction 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)
    {
        sender.TextColor = Color.Red;
    }
}]]></code>
        <para>the developer can use the XAML below to create the page that responds to the secret string by changing the color of the <see cref="T:Microsoft.Maui.Controls.Entry" /> text area to red.</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="What color is &quot;The text&quot;?"
               VerticalOptions="Center"
               HorizontalOptions="Center" />
        <Entry Placeholder="Type answer here."
               VerticalOptions="Center"
               HorizontalOptions="Center"
               BackgroundColor="White">
            <Entry.Triggers>
                <Trigger TargetType="Entry"
                         Property="Text"
                         Value="The text is red" >
                    <Trigger.EnterActions>
                        <local:ColorTriggerAction />
                    </Trigger.EnterActions>
                </Trigger>
            </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.TriggerAction`1" />
  </Docs>
  <Members>
    <Member MemberName=".ctor">
      <MemberSignature Language="C#" Value="public Trigger (Type targetType);" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.Type targetType) cil managed" />
      <MemberSignature Language="DocId" Value="M:Microsoft.Maui.Controls.Trigger.#ctor(System.Type)" />
      <MemberSignature Language="F#" Value="new Microsoft.Maui.Controls.Trigger : Type -&gt; Microsoft.Maui.Controls.Trigger" Usage="new Microsoft.Maui.Controls.Trigger targetType" />
      <MemberType>Constructor</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>0.0.0.0</AssemblyVersion>
        <AssemblyVersion>1.3.0.0</AssemblyVersion>
        <AssemblyVersion>1.4.0.0</AssemblyVersion>
        <AssemblyVersion>1.5.0.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
        <AssemblyName>Microsoft.Maui.Controls.Core</AssemblyName>
      </AssemblyInfo>
      <Parameters>
        <Parameter Name="targetType" Type="System.Type">
          <Attributes>
            <Attribute>
              <AttributeName>Microsoft.Maui.Controls.TypeConverter(typeof(Microsoft.Maui.Controls.TypeTypeConverter))</AttributeName>
            </Attribute>
          </Attributes>
        </Parameter>
      </Parameters>
      <Docs>
        <param name="targetType">The view type to which the trigger will be added.</param>
        <summary>Initializes a new <see cref="T:Microsoft.Maui.Controls.Trigger" /> instance.</summary>
        <remarks>To be added.</remarks>
      </Docs>
    </Member>
    <Member MemberName="Property">
      <MemberSignature Language="C#" Value="public Microsoft.Maui.Controls.BindableProperty Property { get; set; }" />
      <MemberSignature Language="ILAsm" Value=".property instance class Microsoft.Maui.Controls.BindableProperty Property" />
      <MemberSignature Language="DocId" Value="P:Microsoft.Maui.Controls.Trigger.Property" />
      <MemberSignature Language="F#" Value="member this.Property : Microsoft.Maui.Controls.BindableProperty with get, set" Usage="Microsoft.Maui.Controls.Trigger.Property" />
      <MemberType>Property</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>0.0.0.0</AssemblyVersion>
        <AssemblyVersion>1.3.0.0</AssemblyVersion>
        <AssemblyVersion>1.4.0.0</AssemblyVersion>
        <AssemblyVersion>1.5.0.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
        <AssemblyName>Microsoft.Maui.Controls.Core</AssemblyName>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>Microsoft.Maui.Controls.BindableProperty</ReturnType>
      </ReturnValue>
      <Docs>
        <summary>Gets or sets the property whose value will be compared to <see cref="P:Microsoft.Maui.Controls.Trigger.Value" /> to determine when to invoke the setters.</summary>
        <value>To be added.</value>
        <remarks>To be added.</remarks>
      </Docs>
    </Member>
    <Member MemberName="Setters">
      <MemberSignature Language="C#" Value="public System.Collections.Generic.IList&lt;Microsoft.Maui.Controls.Setter&gt; Setters { get; }" />
      <MemberSignature Language="ILAsm" Value=".property instance class System.Collections.Generic.IList`1&lt;class Microsoft.Maui.Controls.Setter&gt; Setters" />
      <MemberSignature Language="DocId" Value="P:Microsoft.Maui.Controls.Trigger.Setters" />
      <MemberSignature Language="F#" Value="member this.Setters : System.Collections.Generic.IList&lt;Microsoft.Maui.Controls.Setter&gt;" Usage="Microsoft.Maui.Controls.Trigger.Setters" />
      <MemberType>Property</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>0.0.0.0</AssemblyVersion>
        <AssemblyVersion>1.3.0.0</AssemblyVersion>
        <AssemblyVersion>1.4.0.0</AssemblyVersion>
        <AssemblyVersion>1.5.0.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
        <AssemblyName>Microsoft.Maui.Controls.Core</AssemblyName>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Collections.Generic.IList&lt;Microsoft.Maui.Controls.Setter&gt;</ReturnType>
      </ReturnValue>
      <Docs>
        <summary>Gets the list of <see cref="T:Microsoft.Maui.Controls.Setter" /> objects that will be applied when the property that is named by <see cref="P:Microsoft.Maui.Controls.Trigger.Property" /> becomes equal to <see cref="P:Microsoft.Maui.Controls.Trigger.Value" />.</summary>
        <value>To be added.</value>
        <remarks>To be added.</remarks>
      </Docs>
    </Member>
    <Member MemberName="Value">
      <MemberSignature Language="C#" Value="public object Value { get; set; }" />
      <MemberSignature Language="ILAsm" Value=".property instance object Value" />
      <MemberSignature Language="DocId" Value="P:Microsoft.Maui.Controls.Trigger.Value" />
      <MemberSignature Language="F#" Value="member this.Value : obj with get, set" Usage="Microsoft.Maui.Controls.Trigger.Value" />
      <MemberType>Property</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>0.0.0.0</AssemblyVersion>
        <AssemblyVersion>1.3.0.0</AssemblyVersion>
        <AssemblyVersion>1.4.0.0</AssemblyVersion>
        <AssemblyVersion>1.5.0.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
        <AssemblyName>Microsoft.Maui.Controls.Core</AssemblyName>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Object</ReturnType>
      </ReturnValue>
      <Docs>
        <summary>Gets or sets the value of the property, named by the <see cref="P:Microsoft.Maui.Controls.Trigger.Property" /> property, that will cause the setters to be applied.</summary>
        <value>To be added.</value>
        <remarks>To be added.</remarks>
      </Docs>
    </Member>
    <Member MemberName="Microsoft.Maui.Controls.Xaml.IValueProvider.ProvideValue">
      <MemberSignature Language="C#" Value="object IValueProvider.ProvideValue (IServiceProvider serviceProvider);" />
      <MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance object Microsoft.Maui.Controls.Xaml.IValueProvider.ProvideValue(class System.IServiceProvider serviceProvider) cil managed" />
      <MemberSignature Language="DocId" Value="M:Microsoft.Maui.Controls.Trigger.Xamarin#Forms#Xaml#IValueProvider#ProvideValue(System.IServiceProvider)" />
      <MemberSignature Language="F#" Value="abstract member Microsoft.Maui.Controls.Xaml.IValueProvider.ProvideValue : IServiceProvider -&gt; obj&#xA;override this.Microsoft.Maui.Controls.Xaml.IValueProvider.ProvideValue : IServiceProvider -&gt; obj" Usage="trigger.Microsoft.Maui.Controls.Xaml.IValueProvider.ProvideValue serviceProvider" />
      <MemberType>Method</MemberType>
      <Implements>
        <InterfaceMember>M:Microsoft.Maui.Controls.Xaml.IValueProvider.ProvideValue(System.IServiceProvider)</InterfaceMember>
      </Implements>
      <AssemblyInfo>
        <AssemblyVersion>0.0.0.0</AssemblyVersion>
        <AssemblyVersion>1.3.0.0</AssemblyVersion>
        <AssemblyVersion>1.4.0.0</AssemblyVersion>
        <AssemblyVersion>1.5.0.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
        <AssemblyName>Microsoft.Maui.Controls.Core</AssemblyName>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Object</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="serviceProvider" Type="System.IServiceProvider" />
      </Parameters>
      <Docs>
        <param name="serviceProvider">For internal use by the Microsoft.Maui.Controls platform.</param>
        <summary>For internal use by the Microsoft.Maui.Controls platform.</summary>
        <returns>To be added.</returns>
        <remarks>To be added.</remarks>
      </Docs>
    </Member>
  </Members>
</Type>
