<UserControl x:Class="Wex.Lib.Demo.Views.Demos.InvokeMethod" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" xmlns:wex="clr-namespace:Wex.Lib.Interactions;assembly=Wex.Lib" mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480"> <Grid x:Name="LayoutRoot"> <i:Interaction.Triggers> <wex:EventTrigger ElementName="btnName" EventName="Click"> <wex:InvokeMethodAction MethodName="Add"> <wex:ActionParameters> <wex:ActionParameter ElementName="txt1" Property="Text"/> <wex:ActionParameter ElementName="txt2" Property="Text"/> </wex:ActionParameters> </wex:InvokeMethodAction> </wex:EventTrigger> </i:Interaction.Triggers> <StackPanel> <TextBlock FontSize="20" Text="Invoke Method Demo"/> <TextBlock Text="Enter A" Margin="3"/> <TextBox Name="txt1"/> <TextBlock Text="Enter B" Margin="3"/> <TextBox Name="txt2"/> <Button Content="Find A + B by invoking Add method" Name="btnName"/> <TextBlock Text="{Binding Data}" Margin="3"/> </StackPanel> </Grid> </UserControl>
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)