我切換到我的應用程序,而不是通過Popup
的框架使用ProgressBar
/Grid
內。我使用這個堆棧溢出後得到它的工作:Dynamic Progress bar In WP7幀不與進度使用工具包轉換框架模板
但是,當使用示例我不再有頁面轉換。如果頁面轉換不能正常工作,我很難保證使用它。有什麼我失蹤?我試過的TargetType設置爲「TransitionFrame
」,但是,這並不正常工作,並拋出一個XAML
解析異常(命名空間Microsoft.Phone.Controls.PhoneApplicationPages
)
<ControlTemplate x:Key="LoadingIndicatorTemplate" TargetType="toolkit:TransitionFrame" >
<Grid x:Name="ClientArea">
<ContentPresenter />
<Grid x:Name="ProgressGrid" Background="Black" Opacity="0.85" Visibility="Collapsed" Loaded="ProgressGrid_Loaded">
<StackPanel x:Name="Loading" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10">
<TextBlock HorizontalAlignment="Center" Name="tbLoading" Text="Loading" Style="{StaticResource TextNormalStyle}" />
<ProgressBar Style="{StaticResource PerformanceProgressBar}" HorizontalAlignment="Center" Name="pbLoading" Width="400" Margin="10" IsIndeterminate="False" />
</StackPanel>
</Grid>
</Grid>
</ControlTemplate>
謝謝德里克。我之前試過這個代碼,但問題依然如此。還有什麼我可以嘗試嗎? – 2011-04-13 23:49:19
因此,對於正確類型的ControlTemplate和正確的xmlns,您不會得到XamlParseException,您可以獲取進度條,但是您不會獲取頁面轉換? – 2011-04-14 06:52:00
是的。進度條可以顯示正常,所有頁面也一樣,但實際的頁面轉換不再存在。我已經用實際的ControlTemplate更新了原始帖子。 – 2011-04-14 19:54:19