This is a migrated thread and some comments may be shown as answers.

Customizing RadAutoCompleteBox

4 Answers 282 Views
AutoCompleteBox
This is a migrated thread and some comments may be shown as answers.
Elon
Top achievements
Rank 1
Elon asked on 21 Apr 2016, 04:56 PM

Hi, 

I am trying to customize the RadAutoCompleteBox visual to fit our application. I went thru the process of doing "Edit a Copy" of the Style. Without making any modification to the copied style, I've encountered an Error which causes the popup no longer shows up correctly.

System.Windows.Data Error: 26 : ItemTemplate and ItemTemplateSelector are ignored for items already of the ItemsControl's container type; Type='RadWatermarkTextBox'
System.Windows.Data Error: 4 : Cannot find source for binding with reference 'ElementName=WatermarkTextBox'. BindingExpression:Path=ActualWidth; DataItem=null; target element is 'AutoCompleteBoxesWrapPanel' (Name=''); target property is 'Width' (type 'Double')

4 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 25 Apr 2016, 08:07 AM
Hello Elon,

We are aware of the observed by you errors and actually they are related to a known timing issue in the WPF platform. 

These are common errors caused by the way some controls are loaded by the Framework. Some of the bindings are broken at the start of the application but fast after that they are resolved and no critical exception is thrown. You shouldn't worry about this kind of errors. Suppressing them is possible by setting a different Trace level in your application as described in the following blog post:
http://www.codeproject.com/Tips/124556/How-to-suppress-the-System-Windows-Data-Error-warn


I hope this would be helpful.

Regards,
Yana
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
Elon
Top achievements
Rank 1
answered on 25 Apr 2016, 04:53 PM

Thank you for your response, Yana. However, the autocomplete popup will no longer show up. I haven't yet investigated thoroughly, but it may have something to do with the size-binding to the WatermarkTextBox. I should be able to get around that. I just wanted to confirm that it isn't something I did. 

Thx!

-Elon

 

0
Accepted
Yana
Telerik team
answered on 26 Apr 2016, 01:38 PM
Hello Elon,

I'd suggest you extract RadAutoCompleteBox Template from the used Theme XAML file instead, the approach is explained in details in our Editing Control Templates topic  - this will ensure that you have all the needed Styles in place.

Please try it and if you still experience any issues, send us more details/sample project, so we could test the exact case.

Regards,
Yana
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
Elon
Top achievements
Rank 1
answered on 27 Apr 2016, 06:18 PM

Thanks, Yana. 

I have already made my own User Control as the RadAutoCompleteBox UX workflow doesn't quite fit my design. However, I'll keep your answer in mind if I've ever run into similar issue.

I didn't realize I have to do the Theme XAML route. I was using this reference: http://docs.telerik.com/devtools/wpf/styling-and-appearance/styling-apperance-editing-control-templates.html#extracting-control-templates-using-visual-studio

Thanks again.

-Elon-

Tags
AutoCompleteBox
Asked by
Elon
Top achievements
Rank 1
Answers by
Yana
Telerik team
Elon
Top achievements
Rank 1
Share this question
or