Kri*_*is 134
您可以使用InputBinding.
<TextBlock Text="Hello">
<TextBlock.InputBindings>
<MouseBinding Command="" MouseAction="LeftClick" />
</TextBlock.InputBindings>
</TextBlock>
Run Code Online (Sandbox Code Playgroud)
编辑:超链接也许值得一提.
<TextBlock><Hyperlink Command="" TextDecorations="None" Foreground="Black">Hello</Hyperlink></TextBlock>
Run Code Online (Sandbox Code Playgroud)
H.B*_*.B. 25
你没有在它上面创建一个透明按钮,你将TextBlock 放入其中:
<Button>
<Button.Template>
<ControlTemplate TargetType="Button">
<ContentPresenter />
</ControlTemplate>
</Button.Template>
<TextBlock Text="Lorem Ipsum"/>
</Button>
Run Code Online (Sandbox Code Playgroud)