1
我有一個簡單的應用程序,其上有兩頁。第一頁正常工作,並且在導航到第二頁的頁面上有一個按鈕。在系統OnTouch事件拋出ArgumentException事件
然而,當我到了第二頁,任何時候我嘗試接觸任何東西,在OnTouch
事件觸發和ArgumentException
在ListDictionaryInternal
拋出但是,我有一個與此交互的頁面上沒有OnTouch事件,所以我不確定是什麼原因造成的。
導航到新頁面的代碼:
string page = "valid";
NavigationService.Navigate(
new Uri("/Dialog.xaml?page=" + page,
UriKind.Relative)
);
的崩潰頁面的XAML很簡單:
<Grid x:Name="LayoutRoot" Background="Transparent">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!--TitlePanel contains the name of the application and page title-->
<StackPanel Grid.Row="0" Margin="12,17,0,28">
<TextBlock Name="AppName" Style="{StaticResource PhoneTextNormalStyle}"/>
<TextBlock Name="PageName" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle2Style}"/>
</StackPanel>
<!--ContentPanel - place additional content here-->
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
<Button Click="CancelDownload_Click" Opacity="1.0" Content="Cancel REST Request!" Background="Blue" Foreground="White" BorderBrush="Black" FontWeight="Bold" BorderThickness="1" x:Name="CancelData" VerticalAlignment="Center" Margin="90,327,90,291" Height="150" Width="300" Visibility="Collapsed" />
</Grid>
</Grid>
什麼引起的OnTouch以這樣的方式失敗?
謝謝你的幫助。
你在的PhoneApplicationPage註冊OnTouch?你在OnTouch處理程序中做什麼?並嘗試重建您的項目 – onmyway133
不,我沒有任何PhoneApplicationPages中的任何OnTouch處理程序,這會導致錯誤混淆。 –