我正在努力应用我的应用中的xaml页面。我有一个包含几个按钮的scrollviewer,然后是一个包含Autocompletebox的网格。它的工作方式应该如此。但是,当我从最新的Silverlight工具包应用TransitionService时,自动完成框的建议 - 弹出窗口会“居中”,因此一半的建议位于键盘“下方”。它在所有其他页面上都能完美运行。过渡本身正在发挥作用,它只是自动完成框中弹出窗口的位置变得很时髦。 我试图删除Scrollviewer,而是使用了Grid,但同样的事情发生了。
这是转换的代码:
<toolkit:TransitionService.NavigationInTransition>
<toolkit:NavigationInTransition>
<toolkit:NavigationInTransition.Backward>
<toolkit:TurnstileTransition Mode="BackwardIn"/>
</toolkit:NavigationInTransition.Backward>
<toolkit:NavigationInTransition.Forward>
<toolkit:TurnstileTransition Mode="ForwardIn"/>
</toolkit:NavigationInTransition.Forward>
</toolkit:NavigationInTransition>
</toolkit:TransitionService.NavigationInTransition>
<toolkit:TransitionService.NavigationOutTransition>
<toolkit:NavigationOutTransition>
<toolkit:NavigationOutTransition.Backward>
<toolkit:TurnstileTransition Mode="BackwardOut"/>
</toolkit:NavigationOutTransition.Backward>
<toolkit:NavigationOutTransition.Forward>
<toolkit:TurnstileTransition Mode="ForwardOut"/>
</toolkit:NavigationOutTransition.Forward>
</toolkit:NavigationOutTransition>
</toolkit:TransitionService.NavigationOutTransition>
简化代码,代码中有更多按钮。 和
<ScrollViewer x:Name="ContentPanel" Grid.Row="1" VerticalScrollBarVisibility="Auto" HorizontalContentAlignment="Center" VerticalAlignment="Top" >
<StackPanel x:Name="buttons">
<Button Content="Vis alle navn i en liste" Name="cmdShowInList" VerticalAlignment="Top" Click="cmdShowInList_Click"></Button>
</StackPanel>
</ScrollViewer>
<Grid x:Name="Search" Grid.Row="2" Margin="0,20,0,0">
<toolkit:AutoCompleteBox x:Name="txtSearch" FontSize="32" Text="Search here" Width="330" HorizontalAlignment="Left" FilterMode="Custom" MouseEnter="txtSearch_MouseEnter" DropDownClosed="txtSearch_DropDownClosed">
<toolkit:AutoCompleteBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding Name}" />
</StackPanel>
</DataTemplate>
</toolkit:AutoCompleteBox.ItemTemplate>
</toolkit:AutoCompleteBox>
<Button Name="cmdGoToName" Content="Show" Width="160" HorizontalAlignment="Right" Click="cmdGoToName_Click"></Button>
</Grid>
这是一个知道问题,还是我在这里遗漏了什么?