嘿,夥計們請幫助列出我的問題,我做了一個應用程序,我必須上傳它在Windows商店,但問題是,它不支持快照視圖。我希望它不應該在快照視圖中工作,當應用程序進入快照視圖時,它只會顯示一條消息「切換到全屏」。請告訴我如何編碼以及在XAML或XAML.cs中編碼的位置。提前致謝。問題與快照查看地鐵應用程序
0
A
回答
0
一個可能的解決方案
- 創建您將要用於捕捉
- 聽,當用戶卡的應用程序,它是引發事件的新頁。
- 導航到網頁,其中有「切換至全屏」
- 聽當用戶unsnaps
- 回到原來的頁面
爲了實現這一目標,其引發的事件,
在OnLaunched事件您App.xaml.cs寫這
Window.Current.SizeChanged += Current_SizeChanged;
現在的事件句柄[R
void Current_SizeChanged(object sender, Windows.UI.Core.WindowSizeChangedEventArgs e)
{
ApplicationViewState viewState = ApplicationView.Value;
if (viewState == ApplicationViewState.Snapped)
{
//Navigate to the new common snap page
}
else{
//Write the code to check if the previous state was snapped and then navigate back
}
}
0
添加基本頁和替換XAML與此:
<common:LayoutAwarePage
x:Name="pageRoot"
x:Class="App1.OopsPage"
DataContext="{Binding DefaultViewModel, RelativeSource={RelativeSource Self}}"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:App1"
xmlns:common="using:App1.Common"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid>
<!-- Full screen content. -->
<Grid x:Name="FullScreenGrid">
<TextBlock>Here is your content.</TextBlock>
</Grid>
<!-- Snapped view content. -->
<Grid x:Name="SnappedViewGrid" Visibility="Collapsed">
<TextBlock>Please go back to full screen :(</TextBlock>
</Grid>
<VisualStateManager.VisualStateGroups>
<!-- Visual states reflect the application's view state -->
<VisualStateGroup x:Name="ApplicationViewStates">
<VisualState x:Name="FullScreenLandscape"/>
<VisualState x:Name="Filled"/>
<VisualState x:Name="FullScreenPortrait" />
<!-- The back button and title have different styles when snapped -->
<VisualState x:Name="Snapped">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="FullScreenGrid" Storyboard.TargetProperty="Visibility">
<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="SnappedViewGrid" Storyboard.TargetProperty="Visibility">
<DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
</Grid>
</common:LayoutAwarePage>
確保您的應用命名空間來代替App1
,你必須有LayoutAwarePage.cs在常見夾。
相關問題
- 1. iOS - 創建像照片應用程序的照片查看器
- 2. 地鐵中的在線應用程序
- 3. HttpClient /在地鐵應用程序
- 4. Actionscript地鐵應用程序開發
- 5. 地鐵應用程序中的Dapper
- 6. 在地鐵應用程序中的Webservice
- 7. 查看快照時出現內存問題
- 8. 新手問題 - Android Webview查看網絡攝像頭的快照?
- 9. 在地鐵應用程序中創建WCF應用程序
- 10. 在桌面應用程序中託管地鐵應用程序
- 11. Windows 8的地鐵應用程式sqlite的問題
- 12. 使用Google Drive SDK與地鐵應用程序
- 13. 快照應用程序和文字
- 14. 移動標題或應用程序中的文本地鐵
- 15. FileSavePicker在C#窗口地鐵燈主題應用程序
- 16. 用於查看快照的HBase命令
- 17. C#啓動與地鐵api外部應用程序
- 18. 與Windows 8地鐵的JavaScript應用程序
- 19. 錯誤的應用程序與地鐵DevDefined.OAuth
- 20. 護照本地304重定向錯誤快車應用程序
- 21. Windows 8地鐵應用程序:訪問按鈕屬性
- 22. SKScene查看渲染問題(見照片)
- 23. 地鐵應用程序的後臺傳輸(上載器)進度問題
- 24. 導航欄窗口中的css問題8地鐵應用程序
- 25. 問題與應用程序池參考 - IIS 7.5快遞
- 26. Proto主題谷歌地圖問題與DNN應用程序
- 27. 跨線程問題與列表查看
- 28. 通過分享魅力共享視頻和照片在地鐵應用程序
- 29. wp7應用程序+ skydrive,查看文件時遇到問題
- 30. IE10 extjs兼容性應用程序查看問題
哥們可以告訴我更多的細節.. – user2808491
和我得到的邏輯,但在哪裏寫代碼.. – user2808491