TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Koteswararao Mallisetti
NA
817
564.1k
wpf mouse left button or button click events are not fire on text box
Jul 15 2010 1:36 AM
Hai,
this is koti all know about me i face one problem with text box in wpf when i click on the text box with mouse , mouse click event is not fired plz see... teh code as follow in net i find one solution that is
in load event of the page
textbox1.AddHandler(MouseLeftButtonDown, System.Windows.Input.MouseButtonEventHandler(this.mouseLeftDown),true);
but it display the error what is the problem here is xaml
xaml file:-
<
Page
x
:
Class
="WpfApplication1.button"
xmlns
="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns
:
x
="http://schemas.microsoft.com/winfx/2006/xaml"
Title
="button"
>
<
Grid
>
<
StackPanel
>
<
TextBox
Name
="textbox1"
MouseLeftButtonDown
="textbox1_MouseLeftButtonDown"
MouseDown
="textbox1_MouseDown" ></
TextBox
>
</
StackPanel
>
</
Grid
>
</
Page
>
c# code:-
private
void
textbox1_MouseLeftButtonDown(
object
sender,
MouseButtonEventArgs
e)
{
MessageBox
.Show(
""
);
}
private
void
textbox1_MouseDown(
object
sender,
MouseButtonEventArgs
e)
{
MessageBox
.Show(
"md"
);
}
Reply
Answers (
2
)
How to make a specific date lock in calender control
Gridview...