If a RadComboBoxItem's Content extends past the bounds of the RadComboBox's Width property and that item is selected, the RadComboBox.SelectionChanged event clips the beginning of that long text by placing the inner TextBox.SelectionStart at the very end of the line.
This could be solved in a number of ways. These are some ideas of mine that came to mind:
This could be solved in a number of ways. These are some ideas of mine that came to mind:
- Assuming this behavior might be intended for some people, give us a new property where we can toggle between the two behaviors. SelectionChangedCaretStart="True/False" or something to that effect.
- Make the RadComboBox's inner TextBox public? At the very least, protected would be sufficient for our needs. Note: even if you made this public, there seems to be some kind of override on the caret placement. I know this because after failing to gain access through reflection, I used the VisualTreeHelper to assign SelectionStart=0 on the SelectionChanged event and debugging revealed that it ran the code fine, but some other event was making the caret go to the end again. The only other way I can think of doing this is to create a new thread that waits a bit until that event is done before changing the caret position back to zero. Granted, if you guys make any changes to the control's structure, this would then crash, so this isn't the most elegant solution by any means.
- The latest version of Silverlight 2 is installed, version Silverlight 2 GDR 1 (2.0.40115.0).
- Operating System: Windows Vista Home Premium (32-bit).
- Attempted Browsers: Internet Explorer 8.0.6001.18702, Mozilla Firefox version 3.0.10, Google Chrome 2.0.172.28.
- Telerik version: 2009.1.413.1020.
- Preferred programming language: C#.
- Microsoft Visual Studio 2008 Professional Edition, Version 9.0.30729.1 SP.
- Microsoft Expression Blend 2 Service Pack 1, Version 2.1.1760.0.