Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6897915
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:13:46+00:00 2026-05-27T07:13:46+00:00

I have found a strange tap issue in my app. I have 42 buttons

  • 0

I have found a strange tap issue in my app. I have 42 buttons arranged 6×7 in the form of a calendar. Every button has calls the same function OnDoubleTap which is the one of the events of a button.

The problem is, successive taps on two buttons is treated as a double tap on the second tapped button.

public void OnButtonDoubleTap(object sender, System.Windows.Input.GestureEventArgs e)
{
       // function
}

this function is associated with all the 42 buttons through the xaml code like this

<Button x:Name="b00" Content="" Height="60" Width="68" MinWidth="68" MinHeight="60" Click="OnClick" DoubleTap="OnButtonDoubleTap" Foreground="#FF171717" BorderThickness="0" Hold="OnButtonLongPress" Style="{StaticResource DateButtonTemplate}" FontFamily="{StaticResource CicleFina}" />
<Button x:Name="b01" Content="" Height="60" Canvas.Left="68" Width="68" MinWidth="68" MinHeight="60" Click="OnClick" DoubleTap="OnButtonDoubleTap" Hold="OnButtonLongPress" Foreground="#FF171717" BorderThickness="0" Style="{StaticResource DateButtonTemplate}" FontFamily="{StaticResource CicleFina}"/>
<Button x:Name="b02" Content="" Height="60" Canvas.Left="136" Width="68" MinWidth="68" MinHeight="60" Click="OnClick" DoubleTap="OnButtonDoubleTap" Hold="OnButtonLongPress" Foreground="#FF171717" BorderThickness="0" Style="{StaticResource DateButtonTemplate}" FontFamily="{StaticResource CicleFina}"/>
<Button x:Name="b03" Content="" Height="60" Canvas.Left="204" Width="68" MinWidth="68" MinHeight="60" Click="OnClick" DoubleTap="OnButtonDoubleTap" Hold="OnButtonLongPress" Foreground="#FF171717" BorderThickness="0" Style="{StaticResource DateButtonTemplate}" FontFamily="{StaticResource CicleFina}"/>
<Button x:Name="b04" Content="" Height="60" Canvas.Left="272" Width="68" MinWidth="68" MinHeight="60" Click="OnClick" DoubleTap="OnButtonDoubleTap" Hold="OnButtonLongPress" Foreground="#FF171717" BorderThickness="0" Style="{StaticResource DateButtonTemplate}" FontFamily="{StaticResource CicleFina}"/>

Any idea why this is happening?

Alfah

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T07:13:47+00:00Added an answer on May 27, 2026 at 7:13 am

    I have solved the problem by capturing the first click and the second click.
    Check the names of the sender and do the function only if both has the same.

    The first click is captured on the OnClick function and the second at the OnDoubleTap function

    public void OnClick(object sender, RoutedEventArgs e)
    {
        Button nbut = sender as Button;
        m_captureFirstClick = nbut.Name;
    }
    
    public void OnButtonDoubleTap(object sender, System.Windows.Input.GestureEventArgs e)
    {
        Button temp = sender as Button;
        if (temp.Name == m_captureFirstClick)
        {
            // do what you want to do
        }
    }
    

    Alfah

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have encountered a very strange class not found problem in our web app
I have found strange issue during execution of installatio file made by VS 2010.
I'm running into a very strange issue that I have found no explanation for
I'm hacking my way through learning Flex and have found some strange behaviour. When
I have found what appears to be a strange bug with sqlite. I have
I experience a very strange problem and I don't have found any help to
during my debug sessions I found a strange thing occurring. I have an EditText
I have learn OpenGL programming for some time.And I found a very strange phenomenon
I found a very interesting/strange thing about MAX() function in SQL. I have column
I have found a strange behavior in p:inputMask if it is located inside a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.