This question is locked. New answers and comments are not allowed.
Robbe Morris
Top achievements
Rank 1
Robbe Morris
asked on 31 Mar 2009, 08:57 PM
The polygon sent through as the e.OriginalSource nulls out the .Name and .Tag property of the image. Is there anyway to force selection of an item in the coverflow using the mouse? Right now, you have to first select the item to bring it to prominent view and then click it again to select it. The SelectedItemMouseUp event only fires if the item is first prominent (or selected). I want to perform this task with a mouse using one click.
Is there any way to identify which item was clicked using the MouseLeftButtonUp event?
Is there any way to identify which item was clicked using the MouseLeftButtonUp event?
4 Answers, 1 is accepted
0
Hi Robbe ,
Here is what i suggest - use SelectionChanged event so every time you click on an item and selection is changed you can get the item's Name and Tag like this :
If you need to get them when you click on the same item (no selection changed) just attach to the
SelectedItemMouseUp as well.
I have attached a simple project to demonstrate my idea. Let me know if you need more help.
Best wishes,
Boyan
the Telerik team
Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Here is what i suggest - use SelectionChanged event so every time you click on an item and selection is changed you can get the item's Name and Tag like this :
| textbox1.Text = ("Name: " + (e.AddedItems[0] as FrameworkElement).Name.ToString()); |
SelectedItemMouseUp as well.
I have attached a simple project to demonstrate my idea. Let me know if you need more help.
Best wishes,
Boyan
the Telerik team
Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
Robbe Morris
Top achievements
Rank 1
answered on 03 Apr 2009, 08:54 PM
cf_SelectionChanged
fires if you use your mousescroll to scroll through the items. The cf_SelectedItemMouseUp event on fires if you click the image that is already the selected item. So, with this in mind, I cannot single click an item that is not in the prominent selected position and have it selected with only one click. The mouse has to first click it to make it prominent and then click it again to get the cf_SelectedItemMouseUp to fire.
I understand that this is the intended UI experience for this control but I'd really like to offer that single click selection of an item but can't seem to figure out how to find the element I just clicked. Using the mouse x,y, is there a way to hit test the images in the control?
0
Accepted
Hi Robbe Morris,
If I understand you correctly, you want to perform some action only when the user selects an image by clicking on it (not with the keyboard or the mouse scroll). This behavior is not implemented in the control. What I can suggest as a workaround is:
1. Using RadCoverflowPerspectiveItems as items of the CoverFlow
2. Set th content of these items to the URL of the image
3. Handle the MouseLeftButtonUp event of the RadCoverflowPerspectiveItem
4. Do the work in the event handler
I'm attaching the previous example with this change applied.
Regards,
Miroslav Nedyalkov
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
1. Using RadCoverflowPerspectiveItems as items of the CoverFlow
2. Set th content of these items to the URL of the image
3. Handle the MouseLeftButtonUp event of the RadCoverflowPerspectiveItem
4. Do the work in the event handler
I'm attaching the previous example with this change applied.
Regards,
Miroslav Nedyalkov
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Robbe Morris
Top achievements
Rank 1
answered on 06 Apr 2009, 12:31 PM
Got it. Works like a charm. You guys are the poster children for great customer support. I wouldn't mind a private reply as to how Telerik compensates/motivates its people to provide this level of consistant customer support. I'd like to instill this same thing in our support team.
Thanks!
Thanks!