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

expanding the ListPicker

1 Answer 79 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.
Tariq
Top achievements
Rank 2
Tariq asked on 09 Aug 2011, 06:24 PM
Hi Telerik,

I am trying to create a list then under that a textbox and a button, it supposes to be easy, but when the list expands it somehow acts funny. the listpicker covers the rest of the controls, heres my code:

<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
    <telerikInput:RadListPicker InlineModeThreshold="7" Header="Choose the Calculation Method:" Height="100" HorizontalAlignment="Left" Margin="12,6,0,0" Name="lstCalculationMethod" VerticalAlignment="Top" Width="438" SelectionChanged="lstCalculationMethod_SelectionChanged" >
        <my:String>One</my:String>
        <my:String>Two</my:String>
        <my:String>Three</my:String>
        <my:String>Four</my:String>
        <my:String>Five</my:String>
        <my:String>Six</my:String>
        <my:String>Seven</my:String>
    </telerikInput:RadListPicker>
    <TextBox Height="72" HorizontalAlignment="Left" Margin="12,176,0,0" Name="textBox1" Text="" VerticalAlignment="Top" Width="280" />
    <Button Content="Search" Height="72" HorizontalAlignment="Left" Margin="290,176,0,0" Name="button1" VerticalAlignment="Top" Width="160" Click="button1_Click" />
    <TextBlock Height="30" HorizontalAlignment="Left" Margin="24,154,0,0" Name="textBlock1" Text="Set your city:" VerticalAlignment="Top" />
    <ListBox Height="313" HorizontalAlignment="Left" Margin="24,268,0,0" Name="listBox1" VerticalAlignment="Top" Width="409" FontSize="28" />
</Grid>

i tested it on both the emulator and the device
am i messing something? please help

1 Answer, 1 is accepted

Sort by
0
Deyan
Telerik team
answered on 10 Aug 2011, 08:06 AM
Hello Tareq,

Thanks for contacting us and for the provided XAML snippet.

The reason for the undesired behavior is that you are positioning your items in a Grid by setting their top margin. In this way you are hardcoding their vertical position and in this way it is in no way dependant on the position of the item above.

I suggest adding rows in your grid and putting each element in a row. In this way, when an element is resized, the other elements below will be correctly repositioned.

I hope this helps.

Best wishes,
Deyan
the Telerik team

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

Tags
ListPicker
Asked by
Tariq
Top achievements
Rank 2
Answers by
Deyan
Telerik team
Share this question
or