Note that there are some explanatory texts on larger screens.

plurals
  1. POSilverlight/WP7: I want to place an Button after the Listbox element which are data bound
    text
    copied!<p>I am fairly new to silverlight. I am developing on the windows phone platform. I want to place a button at the end of the listbox entries which will be bound to data from the webservice (I am using a listbox template) </p> <ul> <li>List item 1</li> <li>List item 2</li> <li>List item 3</li> <li>List item 4</li> <li>List item 5</li> <li>List item 6</li> <li>List item 7</li> <li>List item 8</li> <li>..Button..</li> </ul> <p>I tried number of things of using grid/stackpanel etc to host the button and all my solutions place the button at the bottom of my screen instead of bottom of all the listbox entries which might span multiple screens. </p> <p>XAML file I have is below. I want to add a button below the "LBoxItems"</p> <pre><code>&lt;Grid x:Name="LayoutRoot" Background="Transparent"&gt; &lt;Grid.RowDefinitions&gt; &lt;RowDefinition Height="Auto" /&gt; &lt;RowDefinition Height="*" /&gt; &lt;/Grid.RowDefinitions&gt; &lt;Grid x:Name="ads" &gt; &lt;!--TitlePanel contains the name of the application and page title--&gt; &lt;StackPanel Margin="24,24,0,12" x:Name="SearchTitle"&gt; &lt;StackPanel Orientation="Horizontal"&gt; &lt;TextBlock FontWeight="Bold" FontSize="{StaticResource PhoneFontSizeLarge}" Text="{Binding Location}" /&gt; &lt;TextBlock FontSize="{StaticResource PhoneFontSizeLarge}" Text=" &gt; " /&gt; &lt;TextBlock FontWeight="Bold" FontSize="{StaticResource PhoneFontSizeLarge}" Text="{Binding Category}" /&gt; &lt;/StackPanel&gt; &lt;TextBlock FontSize="{StaticResource PhoneFontSizeMedium}" Text="{Binding Converter={StaticResource SearchHistoryItemSubTitleConverter}}" /&gt; &lt;/StackPanel&gt; &lt;/Grid&gt; &lt;!--ContentPanel - place additional content here--&gt; &lt;Grid x:Name="ContentGrid" Grid.Row="2"&gt; &lt;ListBox x:Name="LBoxItems" HorizontalAlignment="Left" Margin="24, 0" SelectionChanged="LBoxItems_SelectionChanged"&gt; &lt;ListBox.ItemTemplate&gt; &lt;DataTemplate&gt; &lt;StackPanel Margin="{StaticResource PhoneTouchTargetOverhang}" &gt; &lt;TextBlock FontSize="{StaticResource PhoneFontSizeMediumLarge}" FontFamily="{StaticResource PhoneFontFamilySemiBold}" Foreground="{StaticResource PhoneAccentBrush}" Text="{Binding Title.Text}" TextWrapping="Wrap" Margin="-4,20,0,0"&gt; &lt;/TextBlock&gt; &lt;TextBlock Text="{Binding PublishDate, Converter={StaticResource ItemPublishDateConverter}}" /&gt; &lt;/StackPanel&gt; &lt;/DataTemplate&gt; &lt;/ListBox.ItemTemplate&gt; &lt;/ListBox&gt; &lt;/Grid&gt; &lt;l:SpinnerControl x:Name="SpinnerControl" Width="55" Height="55" Grid.RowSpan="2" /&gt; &lt;TextBlock x:Name="TxtNoResultsMessage" FontSize="{StaticResource PhoneFontSizeLarge}" Text="No results found" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.RowSpan="2" Visibility="Collapsed" /&gt; &lt;/Grid&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload