WPF TriggerAction弹出子窗体 TargetedTrigger、TargetedTriggerAction用法
2021-06-21 16:04
标签:triggers int click typeof openxml getname ssi local ada WPF TriggerAction弹出子窗体 TargetedTrigger、TargetedTriggerAction用法 标签:triggers int click typeof openxml getname ssi local ada 原文地址:https://www.cnblogs.com/czly/p/10233837.htmlnamespace TriggerAction
{
public class OpenWindowAction : TriggerAction
Window x:Class="TriggerAction.MainWindow"
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="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:local="clr-namespace:TriggerAction"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
Grid>
Button Content="Button" HorizontalAlignment="Left" Margin="531,122,0,0" VerticalAlignment="Top" Width="164" Height="46">
i:Interaction.Triggers>
i:EventTrigger EventName="Click">
local:OpenWindowAction WindowType="{x:Type local:Window1}" />
local:ButtonAction />
local:ButtonTargetAction TargetName="aaa" />
i:EventTrigger>
i:Interaction.Triggers>
Button>
Button x:Name="aaa" Content="Button" HorizontalAlignment="Left" Margin="531,238,0,0" VerticalAlignment="Top" Width="103" Height="30"/>
Grid>
Window>
文章标题:WPF TriggerAction弹出子窗体 TargetedTrigger、TargetedTriggerAction用法
文章链接:http://soscw.com/index.php/essay/96966.html