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

  • Home
  • SEARCH
  • 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 8533339
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T09:56:32+00:00 2026-06-11T09:56:32+00:00

I want to add option to draw rectangle on image. But that is not

  • 0

I want to add option to draw rectangle on image. But that is not problem.
In order to get it working I need to use MouseDown, MouseUp and MouseLeave events of Image Control in WPF.

    <DockPanel Name="dockPanel1" Grid.ColumnSpan="2" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="15">
        <GroupBox Header="WebCam" Name="groupBox1" VerticalAlignment="Top" HorizontalAlignment="Left">
            <Grid>
                <Image HorizontalAlignment="Left" Margin="0" Name="pictureBoxMain" Stretch="Fill" VerticalAlignment="Top" MinHeight="240" MinWidth="320" StretchDirection="DownOnly" MaxWidth="960" MaxHeight="1200" MouseDown="pictureBoxMain_MouseDown" MouseUp="pictureBoxMain_MouseUp" MouseLeave="pictureBoxMain_MouseLeave" Panel.ZIndex="50" />
            </Grid>
        </GroupBox>
        <StackPanel HorizontalAlignment="Right" Name="stackPanel2" VerticalAlignment="Top" DockPanel.Dock="Right" Margin="15,0,0,0">
            <GroupBox Header="Controls" Name="groupBox2">
                <StackPanel Name="stackPanel1">
                    <Button Content="Start" Height="23" Name="buttonStartStop" Width="120" Margin="0" Click="buttonStartStop_Click" />
                    <Button Content="Video Properties" Height="23" Name="buttonVideoProperties" Width="120" Margin="0" Click="buttonVideoProperties_Click" />
                    <Button Content="WebCam Settings" Height="23" Name="buttonWebCamSettings" Width="120" Margin="0" Click="buttonWebCamSettings_Click" />
                </StackPanel>
            </GroupBox>
            <GroupBox Header="Motion Data" Name="groupBox3">
                <StackPanel>
                    <Label Content="Strength: 0" x:Name="labelMotionStrength" />
                    <Label Content="Count: 0" x:Name="timesWasMotionCounter" />
                </StackPanel>
            </GroupBox>
        </StackPanel>
    </DockPanel>

I’m talking about events of “pictureBoxMain”.
Why those events never fire? I’m clicking on my image like crazy and still nothing.
What should I do to make those event working?

  • 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-06-11T09:56:33+00:00Added an answer on June 11, 2026 at 9:56 am

    I found the error.
    For some reason my picture box size was 0,0.
    I stretched it and now it works.

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

Sidebar

Related Questions

I want to add an option to the finder context menu that calls hg
I want to add option menu on my Dialog . I try this .But
I want to add the option when the menu is called with the right
On web page I display list of comments, I want to add an option
I have a form and I want to add a select location option. How
I want add UIGestureRecognizerDelegate to UIWebView,but failed. if [self.view addsubView:webView]; So UIWebView is ok,but
I have a list of string values that I want add to a hashtable
I have problem, when I want add Node to my GUI from other Thread.
I want to add the option to register with a JSON format and some
I am trying to use optparse but I am having a problem. My script

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.