如何解决Windows Phone 7的ListPicker控件未打开完整的选择窗口
|| 这是空闲时的样子: 在这里,当我点击它时,应该在它弹出全屏选择模式时(根据我阅读的内容): 如您所见,它似乎没有打开全屏选择模式。 这是我的XAML:<phone:PhoneApplicationPage
x:Class=\"GameLense.MainPage\"
xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"
xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"
xmlns:phone=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone\"
xmlns:shell=\"clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone\"
xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"
xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"
xmlns:toolkit=\"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit\"
mc:Ignorable=\"d\" d:DesignWidth=\"480\" d:DesignHeight=\"768\"
FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"
FontSize=\"{StaticResource PhoneFontSizeNormal}\"
Foreground=\"{StaticResource PhoneForegroundBrush}\"
SupportedOrientations=\"Portrait\" Orientation=\"Portrait\"
shell:SystemTray.IsVisible=\"True\">
<Grid>
<Grid.Resources>
<DataTemplate x:Name=\"PickerItemTemplate\">
<StackPanel Orientation=\"Horizontal\">
<Border Background=\"Transparent\" Width=\"34\" Height=\"34\">
<Image Source=\"{Binding ImagePath}\" Margin=\"12 0 0 0\"
VerticalAlignment=\"Center\"
HorizontalAlignment=\"Center\"
Stretch=\"Fill\"/>
</Border>
<TextBlock Text=\"{Binding Name}\" Margin=\"12 0 0 0\"/>
</StackPanel>
</DataTemplate>
<DataTemplate x:Name=\"PickerFullModeItemTemplate\">
<StackPanel Orientation=\"Horizontal\">
<Border Background=\"Gold\" Width=\"34\" Height=\"34\">
<Image Source=\"{Binding ImagePath}\" Margin=\"12 0 0 0\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" />
</Border>
<TextBlock Text=\"{Binding Name}\" Margin=\"12 0 0 0\"/>
</StackPanel>
</DataTemplate>
</Grid.Resources>
<Grid.RowDefinitions>
<RowDefinition Height=\"100\" />
<RowDefinition />
</Grid.RowDefinitions>
<!--Begin Top Bar -->
<Image Grid.Row=\"0\" Source=\"Images/topbarBg.png\" Stretch=\"Fill\" />
<TextBlock Text=\"Console\" HorizontalAlignment=\"Left\"
VerticalAlignment=\"Center\" FontSize=\"35\"
Padding=\"10\"/>
<toolkit:ListPicker x:Name=\"lstPlatform\"
ListPickerMode=\"Full\"
Grid.Row=\"0\" CacheMode=\"BitmapCache\"
Margin=\"160 0 10 0\" VerticalAlignment=\"Center\"
ItemTemplate=\"{StaticResource PickerItemTemplate}\"
FullModeItemTemplate=\"{StaticResource PickerFullModeItemTemplate}\" />
<!--End Top Bar -->
</Grid>
</phone:PhoneApplicationPage>
对我可能做错的任何想法?
解决方法
您已在ListPicker控件上设置了ѭ1,以便立即进入全屏选择模式。
,您也可以在列表选择器上设置ѭ2来解决此问题。
,该控件将包含在ѭ3中,并将遵守其大小限制。话虽如此,它不会越过第二行的边界。您需要将其放在另一个具有较大高度的ѭ3中,或在弹出窗口中将其打开。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。