mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2024-11-14 22:55:52 -06:00
Fix (?) button opening the link twice (#2664)
This commit is contained in:
parent
ad37371492
commit
380e1e73a6
@ -304,13 +304,6 @@ function Invoke-WPFUIElements {
|
|||||||
$textBlock.ToolTip = $entryInfo.Link
|
$textBlock.ToolTip = $entryInfo.Link
|
||||||
$textBlock.Style = $HoverTextBlockStyle
|
$textBlock.Style = $HoverTextBlockStyle
|
||||||
|
|
||||||
# Add event handler for click to open link
|
|
||||||
$handler = [System.Windows.Input.MouseButtonEventHandler]{
|
|
||||||
param($sender, $e)
|
|
||||||
Start-Process $sender.ToolTip.ToString()
|
|
||||||
}
|
|
||||||
$textBlock.AddHandler([Windows.Controls.TextBlock]::MouseLeftButtonUpEvent, $handler)
|
|
||||||
|
|
||||||
$horizontalStackPanel.Children.Add($textBlock) | Out-Null
|
$horizontalStackPanel.Children.Add($textBlock) | Out-Null
|
||||||
|
|
||||||
$sync[$textBlock.Name] = $textBlock
|
$sync[$textBlock.Name] = $textBlock
|
||||||
|
Loading…
Reference in New Issue
Block a user