I used an entity with IEditableObject, IDataErrorInfo now when ever an error happens and the validation kicks in marking the controller with the red marker also this error is thrown, any ideas why, the proram runs fine but with this error am using Themes.Implicit copyed them into th project and refrenced the assemblies of Binaries.NoXaml
System.Windows.Data Error: 4 : Cannot find source for binding with reference 'ElementName=Holder'. BindingExpression:(no path); DataItem=null; target element is 'ToolTip' (Name='PART_ToolTip'); target property is 'PlacementTarget' (type 'UIElement')
System.Windows.Data Error: 4 : Cannot find source for binding with reference 'ElementName=Holder'. BindingExpression:Path=AdornedElement.(0)[0].ErrorContent; DataItem=null; target element is 'ToolTip' (Name='PART_ToolTip'); target property is 'Content' (type 'Object')
thank you
System.Windows.Data Error: 4 : Cannot find source for binding with reference 'ElementName=Holder'. BindingExpression:(no path); DataItem=null; target element is 'ToolTip' (Name='PART_ToolTip'); target property is 'PlacementTarget' (type 'UIElement')
System.Windows.Data Error: 4 : Cannot find source for binding with reference 'ElementName=Holder'. BindingExpression:Path=AdornedElement.(0)[0].ErrorContent; DataItem=null; target element is 'ToolTip' (Name='PART_ToolTip'); target property is 'Content' (type 'Object')
thank you
7 Answers, 1 is accepted
0
Hello Ramon,
Can you please elaborate a bit more on your scenario? If you can share with us the RadControls you're using along with their definitions, we will be able to further investigate the case. It would be also very helpful if you can isolate the issue in a small runnable project and send it to us so that we can try to reproduce the exceptions locally and investigate their origins.
Thank you in advance for your cooperation.
Regards,
Tina Stancheva
Telerik
Can you please elaborate a bit more on your scenario? If you can share with us the RadControls you're using along with their definitions, we will be able to further investigate the case. It would be also very helpful if you can isolate the issue in a small runnable project and send it to us so that we can try to reproduce the exceptions locally and investigate their origins.
Thank you in advance for your cooperation.
Regards,
Tina Stancheva
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0

Ramon
Top achievements
Rank 1
answered on 16 Dec 2013, 12:26 PM
Hi thank you for taking the time to reply, Here the user object with an IDataErrorInfo
now if used with a textbox the error is thrown in output, tried different impleminations of IDataErrorInfo but same error, also if the property is not required but has a StringLength attribute it will show up as error with
red marker when not filled.
error:
System.Windows.Data Error: 4 : Cannot find source for binding with reference 'ElementName=Holder'. BindingExpression:(no path); DataItem=null; target element is 'ToolTip' (Name='PART_ToolTip'); target property is 'PlacementTarget' (type 'UIElement')
System.Windows.Data Error: 4 : Cannot find source for binding with reference 'ElementName=Holder'. BindingExpression:Path=AdornedElement.(0)[0].ErrorContent; DataItem=null; target element is 'ToolTip' (Name='PART_ToolTip'); target property is 'Content' (type 'Object')
<
StackPanel
Grid.Row
=
"0"
Orientation
=
"Vertical"
>
<
Label
Content
=
"{lex:Loc Key=FirstName}"
VerticalAlignment
=
"Center"
/>
<
DockPanel
>
<
TextBox
Text="{Binding User.FirstName,
Mode
=
TwoWay
,
ValidatesOnDataErrors
=
True
,
UpdateSourceTrigger
=
PropertyChanged
}"
FocusManager.FocusedElement
=
"{Binding RelativeSource={RelativeSource Self}}"
/>
</
DockPanel
>
</
StackPanel
>
public
class
User : BaseEntity, IDataErrorInfo
{
#region Declarations
private
Guid _userId;
private
string
_firstName;
#endregion
public
Guid UserId
{
get
{
return
_userId; }
set
{ SetPropertyValue(
"UserId"
,
ref
_userId, value); }
}
public
string
FirstName
{
get
{
return
_firstName; }
set
{ SetPropertyValue(
"FirstName"
,
ref
_firstName, value); }
}
string
IDataErrorInfo.Error {
get
{
return
null
; } }
string
IDataErrorInfo.
this
[
string
propertyName]
{
get
{
return
this
.GetValidationError(propertyName); }
}
public
bool
IsValid{
get
{
return
ValidatedProperties.All(property => GetValidationError(property) ==
null
); }}
static
readonly
string
[] ValidatedProperties =
{
"FirstName"
};
private
string
GetValidationError(
string
propertyName)
{
string
error =
null
;
switch
(propertyName)
{
case
"FirstName"
:
error = ValidateNames(FirstName, Lang.FirstName,3, 100);
break
;
}
return
error;
}
private
string
ValidateNames(
string
name,
string
display,
int
min,
int
max)
{
if
(String.IsNullOrWhiteSpace(name))
return
string
.Format(Lang.Required, display);
if
(name.Length < min || name.Length > max)
return
string
.Format(Lang.NumberLength, display, min, max);
return
null
;
}
}
0
Hello Ramon,
Thank you for getting back to us. I can see that you're using a TextBox and a native validation approach, rather than a RadControl. This is why I believe it would help you to post your question in a general WPF programming forum.
I found a few links that you might find helpful:
I hope these threads will help you move on.
Regards,
Tina Stancheva
Telerik
Thank you for getting back to us. I can see that you're using a TextBox and a native validation approach, rather than a RadControl. This is why I believe it would help you to post your question in a general WPF programming forum.
I found a few links that you might find helpful:
- How to use IDataErrorInfo in WPF
- Validating User Input
- Simple validation in WPF MvvM using IDataErrorInfo
- Validation made easy with IDataErrorInfo
I hope these threads will help you move on.
Regards,
Tina Stancheva
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0

Ramon
Top achievements
Rank 1
answered on 21 Dec 2013, 07:05 PM
hi
I have used Binaries.NoXaml and Themes.Implicit in the WPF Application
Telerik RadControls for WPF Q3 2013
The DataModel implements IDataErrorInfo tried different implementation and the error still shows up
Then even tried using INotifyDataErrorInfo the error still shows.
Using a a Textbox or a Telerik controller does not change a thing the error still shows.
<telerik:RadDatePicker SelectedDate="{Binding User.DateOfBirth, Mode=TwoWay, NotifyOnValidationError=True,
ValidatesOnDataErrors=True, ValidatesOnExceptions=True, UpdateSourceTrigger=PropertyChanged}"/>
System.Windows.Data Error: 4 : Cannot find source for binding with reference 'ElementName=Holder'. BindingExpression:(no path); DataItem=null; target element is 'ToolTip' (Name='PART_ToolTip'); target property is 'PlacementTarget' (type 'UIElement')
System.Windows.Data Error: 4 : Cannot find source for binding with reference 'ElementName=Holder'. BindingExpression:Path=AdornedElement.(0)[0].ErrorContent; DataItem=null; target element is 'ToolTip' (Name='PART_ToolTip'); target property is 'Content' (type 'Object')
If i change the style for validation the error goes away, so the error is in the Theme, not in the object.
Regards
I have used Binaries.NoXaml and Themes.Implicit in the WPF Application
Telerik RadControls for WPF Q3 2013
The DataModel implements IDataErrorInfo tried different implementation and the error still shows up
Then even tried using INotifyDataErrorInfo the error still shows.
Using a a Textbox or a Telerik controller does not change a thing the error still shows.
<telerik:RadDatePicker SelectedDate="{Binding User.DateOfBirth, Mode=TwoWay, NotifyOnValidationError=True,
ValidatesOnDataErrors=True, ValidatesOnExceptions=True, UpdateSourceTrigger=PropertyChanged}"/>
System.Windows.Data Error: 4 : Cannot find source for binding with reference 'ElementName=Holder'. BindingExpression:(no path); DataItem=null; target element is 'ToolTip' (Name='PART_ToolTip'); target property is 'PlacementTarget' (type 'UIElement')
System.Windows.Data Error: 4 : Cannot find source for binding with reference 'ElementName=Holder'. BindingExpression:Path=AdornedElement.(0)[0].ErrorContent; DataItem=null; target element is 'ToolTip' (Name='PART_ToolTip'); target property is 'Content' (type 'Object')
If i change the style for validation the error goes away, so the error is in the Theme, not in the object.
Regards
0
Hi,
You say that If you change the style for validation the error goes away, but I do not see any definition the style you refer to.
Would it be possible for you to isolate the issue in a demo project and send it to us?
Regards,
Didie
Telerik
You say that If you change the style for validation the error goes away, but I do not see any definition the style you refer to.
Would it be possible for you to isolate the issue in a demo project and send it to us?
Regards,
Didie
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
0
Hello Ramon,
Thank you for getting back to us! Rather fortunately we have managed to immediately fixed this bug and the fix will be available with our very next internal build on Monday.
I'm currently updating your Telerik points accordingly!
Please excuse us for any inconvenience caused!
Regards,
Vanya Pavlova
Telerik
Thank you for getting back to us! Rather fortunately we have managed to immediately fixed this bug and the fix will be available with our very next internal build on Monday.
I'm currently updating your Telerik points accordingly!
Please excuse us for any inconvenience caused!
Regards,
Vanya Pavlova
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>