This is a migrated thread and some comments may be shown as answers.

Bind a button to RadListPicker

3 Answers 25 Views
ListPicker
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Sanjeewa
Top achievements
Rank 1
Sanjeewa asked on 20 Apr 2015, 08:48 AM

Hello,

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

3 Answers, 1 is accepted

Sort by
0
Rosy Topchiyska
Telerik team
answered on 20 Apr 2015, 04:00 PM
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.

 
0
Sanjeewa
Top achievements
Rank 1
answered on 20 Apr 2015, 04:06 PM

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.

0
Rosy Topchiyska
Telerik team
answered on 21 Apr 2015, 10:53 AM
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.

 
Tags
ListPicker
Asked by
Sanjeewa
Top achievements
Rank 1
Answers by
Rosy Topchiyska
Telerik team
Sanjeewa
Top achievements
Rank 1
Share this question
or