单击带有符号图标的事件

On Click Event With Symbol Icon

我正在尝试使用 XAML 使 SymbolIcon 可点击。我一直在研究实现这一目标的最佳方法,但我还没有找到解决方案。最终产品是我想在单击符号时在我的代码后面触发一个事件。这是我的符号:

 <SymbolIcon x:Name="mySymbol"
      RelativePanel.Below="myOtherProperty"
      RelativePanel.AlignLeftWithPanel="True"
      RelativePanel.AlignRightWithPanel="True"
      Symbol="Contact"
      Foreground="Black"/>

任何人都可以建议我如何使这个符号可点击吗?

SymbolIcon 继承自 UIElementTappedDoubleTapped 事件也是如此。

只需处理其中一个。例如

<SymbolIcon
    DoubleTapped="UIElement_OnDoubleTapped"
    Symbol="Contact"/>