简体   繁体   English

PanoramaItem 中的 WP8.1 文本框

[英]WP8.1 TextBox in PanoramaItem

This is a general question and I am looking for a workaround.这是一个普遍的问题,我正在寻找解决方法。 Is there a way to create a TextBox item inside a PanoramaItem?有没有办法在 PanoramaItem 中创建 TextBox 项目? This is my PanoramaItem:这是我的 PanoramaItem:

<phone:PanoramaItem x:Name="Panorama2" Header="Ringtones">
                <!--Double line list with image placeholder and text wrapping using a floating header that scrolls with the content-->
                <phone:LongListSelector Margin="0,-38,0,100" ItemsSource="{Binding Items2}" Tap="LongListSelector_Tap">
                    <phone:LongListSelector.ListHeaderTemplate>
                        <DataTemplate>
                            <Grid Margin="12,0,0,38">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="*"/>
                                </Grid.RowDefinitions>
                            </Grid>
                        </DataTemplate>
                    </phone:LongListSelector.ListHeaderTemplate>
                    <phone:LongListSelector.ItemTemplate>
                        <DataTemplate>
                            <StackPanel Orientation="Horizontal" Margin="12,2,0,4" Height="105" Width="432">
                                <StackPanel Width="311" Margin="8,-7,0,0">
                                    <TextBlock Text="{Binding LineOne}" TextWrapping="Wrap" Margin="10,0" Style="{StaticResource PhoneTextExtraLargeStyle}" FontSize="{StaticResource PhoneFontSizeLarge}"/>
                                    <TextBlock Text="{Binding LineTwo}" TextWrapping="Wrap" Margin="10,-2,10,0" Style="{StaticResource PhoneTextSubtleStyle}" />
                                </StackPanel>
                                <Image Source="{Binding PlayPhoto}" Width="50" Height="50" HorizontalAlignment="Left" Tap="Image_Tap_1"/>
                                <Image Source="{Binding DownloadPhoto}" Width="40" Height="40" HorizontalAlignment="Right" Tap="Image_Tap"/>
                            </StackPanel>
                        </DataTemplate>
                    </phone:LongListSelector.ItemTemplate>
                </phone:LongListSelector>
            </phone:PanoramaItem>

This is how the PanoramaItem looks like:这是 PanoramaItem 的样子: 在此处输入图片说明

I want to add a TextBox where indicated in the picture.我想在图片中指示的位置添加一个文本框。 Is it possible?是否可以? If yes how?如果是如何? I have looked in most of the options of PanoramaItems and couldn't find TextBox item.我查看了 PanoramaItems 的大部分选项,但找不到 TextBox 项目。

Try this xaml, i think you need to achieve this试试这个 xaml,我认为你需要实现这个

    <phone:PanoramaItem x:Name="Panorama2" Header="Ringtones" Margin="0,72,0,0">
        <!--Double line list with image placeholder and text wrapping using a floating header that scrolls with the content-->
        <StackPanel>
            <phone:LongListSelector Height="362" Margin="0,-38,0,100" ItemsSource="{Binding Items2}" Tap="LongListSelector_Tap">
                <phone:LongListSelector.ListHeaderTemplate>
                    <DataTemplate>
                        <Grid Margin="12,0,0,38">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="*"/>
                            </Grid.RowDefinitions>
                        </Grid>
                    </DataTemplate>
                </phone:LongListSelector.ListHeaderTemplate>
                <phone:LongListSelector.ItemTemplate>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal" Margin="12,2,0,4" Height="105" Width="432">
                            <StackPanel Width="311" Margin="8,-7,0,0">
                                <TextBlock Text="{Binding LineOne}" TextWrapping="Wrap" Margin="10,0" Style="{StaticResource PhoneTextExtraLargeStyle}" FontSize="{StaticResource PhoneFontSizeLarge}"/>
                                <TextBlock Text="{Binding LineTwo}" TextWrapping="Wrap" Margin="10,-2,10,0" Style="{StaticResource PhoneTextSubtleStyle}" />
                            </StackPanel>
                            <Image Source="{Binding PlayPhoto}" Width="50" Height="50" HorizontalAlignment="Left" Tap="Image_Tap_1"/>
                            <Image Source="{Binding DownloadPhoto}" Width="40" Height="40" HorizontalAlignment="Right" Tap="Image_Tap"/>
                        </StackPanel>
                    </DataTemplate>
                </phone:LongListSelector.ItemTemplate>
            </phone:LongListSelector>
            <TextBox Text="sfg"/>
        </StackPanel>

    </phone:PanoramaItem>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM