Bind a button to RadListPicker

4 posts, 0 answers
  1. Sanjeewa
    Sanjeewa avatar
    3 posts
    Member since:
    Nov 2011

    Posted 20 Apr 2015 Link to this post

    Hello,

    How can I bind a button to RadListPicker as seen in the attached picture.

  2. Rosy Topchiyska
    Admin
    Rosy Topchiyska avatar
    551 posts

    Posted 20 Apr 2015 Link to this post

    Hi Sanjeewa,

    Tank you for contacting us.

    You can use the RadListPicker.NoSelectionContentTemplate property to customize the template when no item is selected.

    Please, let us know if you have any other questions.

    Regards,
    Rosy Topchiyska
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
  3. DevCraft banner
  4. Sanjeewa
    Sanjeewa avatar
    3 posts
    Member since:
    Nov 2011

    Posted 20 Apr 2015 Link to this post

    Hello Rosy,

    That's not I meant. Did you notice the (+) button at the right end of the control? I need to do the same thing.

  5. Rosy Topchiyska
    Admin
    Rosy Topchiyska avatar
    551 posts

    Posted 21 Apr 2015 Link to this post

    Hi Sanjeewa,

    Sorry, I didn't understand your question correctly. There are two ways to achieve this scenario. The first way is to edit the control template and add a button. You can edit the control template by right-clicking on the control in the designer and selecting Edit Template > Edit a Copy.

    The second way is to add a button on top of the control, something like this:
    <Border BorderBrush="White" BorderThickness="3" VerticalAlignment="Top">
        <Grid>
            <telerikInput:RadListPicker DisplayMemberPath="Name" BorderThickness="0" ItemsSource="{Binding Items}" Margin="0">
                <telerikInput:RadListPicker.HeaderStyle>
                    <Style TargetType="ContentControl">
                        <Setter Property="Visibility" Value="Collapsed"/>
                    </Style>
                </telerikInput:RadListPicker.HeaderStyle>
                <telerikInput:RadListPicker.ItemStyle>
                    <Style TargetType="telerikInput:RadListPickerItem">
                        <Setter Property="Height" Value="80"/>
                        <Setter Property="VerticalContentAlignment" Value="Center"/>
                    </Style>
                </telerikInput:RadListPicker.ItemStyle>
            </telerikInput:RadListPicker>
            <Button Content="+" HorizontalAlignment="Right"/>
        </Grid>
    </Border>

    I hope this helps. Let us know if you have further questions.

    Regards,
    Rosy Topchiyska
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
Back to Top