MouseLeftButtonUp Issues

5 posts, 1 answers
  1. Robbe Morris
    Robbe Morris avatar
    25 posts
    Member since:
    Apr 2004

    Posted 31 Mar 2009 Link to this post

    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?
  2. Boyan
    Admin
    Boyan avatar
    758 posts

    Posted 03 Apr 2009 Link to this post

    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 :
    textbox1.Text = ("Name: " + (e.AddedItems[0] as FrameworkElement).Name.ToString()); 
    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.
  3. DevCraft banner
  4. Robbe Morris
    Robbe Morris avatar
    25 posts
    Member since:
    Apr 2004

    Posted 03 Apr 2009 Link to this post

    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?

     

  5. Answer
    Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 06 Apr 2009 Link to this post

    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.
  6. Robbe Morris
    Robbe Morris avatar
    25 posts
    Member since:
    Apr 2004

    Posted 06 Apr 2009 Link to this post

    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!
Back to Top
DevCraft banner