Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ruby-on-rails-3/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# wpf合并事件_C#_Wpf_Events_Xaml - Fatal编程技术网

C# wpf合并事件

C# wpf合并事件,c#,wpf,events,xaml,C#,Wpf,Events,Xaml,如何组合两个事件并创建新事件 e、 g:如果鼠标离开控件并聚焦到另一个控件上(因此焦点丢失),则触发事件自定义事件 我是WPF的新手,我还没有完成WPF的禅。如果有其他方法,请告诉我 可以在XAML中使用多数据触发器,请参见 特定控件的LostFocus事件已经为您提供了该示例。LostFocus在用户控件上无法正常工作。感谢您的回答,我无法选择该答案作为信誉缺失的真正原因,因此我已根据记忆对其进行了升级。现在我可以:)谢谢!(我在我的信息页面上看到一个红色的句子,谢谢你的警告) <!-

如何组合两个事件并创建新事件

e、 g:如果鼠标离开控件并聚焦到另一个控件上(因此焦点丢失),则触发事件自定义事件


我是WPF的新手,我还没有完成WPF的禅。如果有其他方法,请告诉我

可以在XAML中使用多数据触发器,请参见



特定控件的LostFocus事件已经为您提供了该示例。LostFocus在用户控件上无法正常工作。感谢您的回答,我无法选择该答案作为信誉缺失的真正原因,因此我已根据记忆对其进行了升级。现在我可以:)谢谢!(我在我的信息页面上看到一个红色的句子,谢谢你的警告)
<!-- This MultiDataTrigger affects losers of the race. -->
<MultiDataTrigger>
  <MultiDataTrigger.Conditions>
    <Condition Binding="{Binding IsFinished}" Value="True" />
    <Condition Binding="{Binding IsWinner}" Value="False" />
  </MultiDataTrigger.Conditions>

  <!-- Apply the "finished the race" brush to
       the horse's progress indicator. -->
  <Setter TargetName="progressIndicator"
          Property="Fill" Value="{StaticResource FinishedBrush}" />

  <!-- Fade the race pit in and out if the horse lost the race. -->
  <MultiDataTrigger.EnterActions>
    <!-- Fade away the RaceHorse's Border element when it loses a race. -->
  </MultiDataTrigger.EnterActions>

  <MultiDataTrigger.ExitActions>
    <!-- Fade in the RaceHorse's Border element when a new race starts. -->
  </MultiDataTrigger.ExitActions>
</MultiDataTrigger>