Skip to content

[BUG] HyperlinkButton Click Event Firing Twice #407

@ThreeMonthAgo

Description

@ThreeMonthAgo

Describe the bug

On the HyperlinkButton, each click triggers the event twice as the video. This causes unexpected behavior in the application.

2025-12-12.23-01-47.mp4

Reproduction

in MainWindow.xaml.cs:

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Windows;
namespace WpfApp1
{
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }
        private void HyperlinkButton_Click(object sender, RoutedEventArgs e)
        {
            Process.Start(new ProcessStartInfo("https://github.com/iNKORE-NET/UI.WPF.Modern"));
        }
    }
}

in MainWindow.xaml:

<Window x:Class="WpfApp1.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:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
        xmlns:local="clr-namespace:WpfApp1"
        mc:Ignorable="d"
        Title="MainWindow" Height="100" Width="200">
    <Grid>
        <ui:HyperlinkButton Click="HyperlinkButton_Click">Test</ui:HyperlinkButton>
    </Grid>
</Window>

run the app and then click the HyperlinkButton to see what happened in the video

Suggested Solution

No response

Library Version

0.10.2.1

Operating System

Windows 11

Framework

.NET Framework

Framework Version

4.7.2

Source of Package

NuGet.org (Package)

Additional Notes

No response

Validations

  • Check that there isn't already an issue that reports the same or similar problem.
  • Check that this is a bug in the library that should be fixed, not a feature, also this is not about the documentation. (Or please choose the right repo and template.)
  • This is one single problem, or a few problems with the same cause. (If you want to report multiple problems, please create one issue for every single problem.)
  • You've checked that this problem still exists in the latest version. (Keep in mind that we don't provide any support for old versions.)
  • You know that we can't guarantee that we will satisfy your request. This is not really our duty to do everything anyone asks for. Also, you will treat our staff, contributors, and other users with respect and kindness.
  • You're sure there's something wrong with the library itself, not how you're using it. (If you are having issues using it and need help, please go to discussion.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    package: controlsTaking place in the iNKORE.UI.WPF.Modern.Controls projectpriority: 2

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions