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
Lior Kooznits
NA
34
0
Tooltip in validation
Aug 4 2009 5:05 PM
Hello everyone,
I've got the the attached user control .It's work just fine accept for the fact that I can't see the tooltip.
Can you please tell me what I'm missing?
Thanks' in advance,
Lior
<
UserControl.Resources
>
<
Style
TargetType
="{
x
:
Type
TextBox
}"
x
:
Key
="IDValid">
<
Setter
Property
="Validation.ErrorTemplate">
<
Setter.Value
>
<
ControlTemplate
>
<
DockPanel
LastChildFill
="True">
<
TextBlock
DockPanel.Dock
="Right"
Foreground
="Red"
FontSize
="14"
FontWeight
="Bold"
ToolTip
="{
Binding
ElementName
=Holder,
Path
=AdornedElement.(Validation.Errors)[
0
].ErrorContent.ToString()}">
!!!
</
TextBlock
>
<
Border
BorderBrush
="Red"
BorderThickness
="2">
<
AdornedElementPlaceholder
Name
="Holder"></
AdornedElementPlaceholder
>
</
Border
>
</
DockPanel
>
</
ControlTemplate
>
</
Setter.Value
>
</
Setter
>
</
Style
>
</
UserControl.Resources
>
<
TextBox
Width
="{
Binding
RelativeSource
={
RelativeSource
Self
},
Path
=Parent.Width}"
Height
="{
Binding
RelativeSource
={
RelativeSource
Self
},
Path
=Parent.Height}"
Style
="{
StaticResource
IDValid
}"
>
<
TextBox.Text
>
<
Binding
ElementName
="This"
Path
="ID"
NotifyOnValidationError
="True">
<
Binding.ValidationRules
>
<
local
:
IdValidation
/>
</
Binding.ValidationRules
>
</
Binding
>
</
TextBox.Text
>
</
TextBox
>
</
UserControl
>
Reply
Answers (
4
)
Good WPF forum?
Merging WPF with Windows Forms