RadTileViewItem SelectedItem...

5 posts, 0 answers
  1. sunkilla
    sunkilla avatar
    1 posts
    Member since:
    Nov 2010

    Posted 30 Nov 2010 Link to this post

    Hello,

    I am using radtileview, and i wish to know if there is no parameter as "SelectedItem" for use with radtransitioncontrol...

    Thanks in Advance
  2. Zarko
    Admin
    Zarko avatar
    755 posts

    Posted 01 Dec 2010 Link to this post

    Hi sunkilla,

    There is no SelectedItem property in the RadTileView because there's no concept of a selected item in that control. You can try to use the MaximizedItem property or you can add a handler for the MouseLeftButtonDown() event and check if the click was inside the RadTileViewItems header bar like that:
    public MainPage()
    {
        InitializeComponent();
     
        this.AddHandler(RadTileView.MouseLeftButtonDownEvent, new                                                       MouseButtonEventHandler(myTileView_MouseLeftButtonDown), true);
    }
     
    private void myTileView_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
    {
        if ((e.OriginalSource as Border).ParentOfType<RadTileViewItem>() != null)
            selectedItemText.Text = (e.OriginalSource as Border).ParentOfType<RadTileViewItem>().Header.ToString();
    }

    If you have further questions feel free to ask.

    Sincerely yours,
    Zarko
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for Silverlight
  3. DevCraft banner
  4. Clint
    Clint avatar
    56 posts
    Member since:
    Feb 2011

    Posted 25 Oct 2011 Link to this post

    How would I use the MaximizedItem property to get the value of the selecteditem header?  Example?
  5. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 28 Oct 2011 Link to this post

    Hi Clint,

     These properties are different by design and are used for different purposes. You can examine this blog post describing the Selection feature in RadTileView. The e.OriginalSource in the SelectionChanged event will give you the selected RadTileViewItem and you will be able to access its header. Is this suitable for you ?

    Greetings,
    Petar Mladenov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  6. Clint
    Clint avatar
    56 posts
    Member since:
    Feb 2011

    Posted 28 Oct 2011 Link to this post

    Perfect.  Wasn't aware you guys added those options.  Thanks!
Back to Top
DevCraft banner