在wp7中线程休眠后导航到另一个页面(navigate to another page after Thread sleep in wp7)
我正在制作一个启动画面页面。 这将在启动应用程序时显示。 我将线程设置为睡眠状态。 但我无法将其导航到另一个应用程序的主页面。 我在加载时设置了启动画面页面。 它还显示加载应用程序时。 但问题是我无法导航它。
这是我的代码。
public partial class WindowsPhoneControl1 : UserControl { public WindowsPhoneControl1() { InitializeComponent(); Thread.Sleep(4000); { NavigationService.Navigate(new Uri("/MainPage.xaml", UriKind.Relative)); } } }
I am making an splash screen page. That will show on start up of application. I set the thread sleep in it. But i am unable to navigate it to another main page of application. I set the splashscreen page at loading time. It is also showing when app is loaded. But the problem is that i am not able to navigate it.
here is my code.
public partial class WindowsPhoneControl1 : UserControl { public WindowsPhoneControl1() { InitializeComponent(); Thread.Sleep(4000); { NavigationService.Navigate(new Uri("/MainPage.xaml", UriKind.Relative)); } } }
原文:https://stackoverflow.com/questions/16539361
更新时间:2022-11-09 12:11
最满意答案
尝试:
struct _Nodo *solicita
。Try:
struct _Nodo *solicita
.
相关问答
更多-
错误:在XCode核心数据中的...之前的预期说明符限定符列表(Error: Expected specifier-qualifier-list before … in XCode Core Data)[2022-02-28]
你是对的,但是...... #importYou're right, but it's... #import -
std::string没有声明。 如果您在顶部包含#include
,代码将被编译。 std::string is not declared. If you #include at the top, the code compiles. -
编译器不知道spe_context_ptr_t是一个类型。 当编译此代码时,检查相应的typedef是否在范围内。 您可能忘记包含相应的头文件。 The compiler doesn't know that spe_context_ptr_t is a type. Check that the appropriate typedef is in scope when this code is compiled. You may have forgotten to include the appropriat ...
-
你有没有在你的Makefile中定义LINUX或WINDOWS定义? 尝试 gcc -dM -E - < /dev/null 这会打印所有预定义的宏。 这里是Windows宏 。 have you defined LINUX or WINDOWS define in your Makefile? try gcc -dM -E - < /dev/null this prints all the predefined macros. and here the windows macros.
-
它是一个指定符和限定符的列表:-)指定符是像void , char , struct Foo等等,并且限定符是像const和volatile这样的关键字。 有关定义,请参阅此C语法 。 在你的情况下, undefined_type还没有定义,所以解析器将它看作是一个标识符,而不是像预期的那样指定了一个限定符列表。 如果你要typedef ... undefined_type; 在它出现之前,那么undefined_type将成为一个说明符。 如果您认为使用上下文无关语法解析C,则编译器处理typedef的方 ...
-
尝试: struct _Nodo *solicita 。 Try: struct _Nodo *solicita.
-
您需要在头文件(问题中的顶级文件)中导入
而不是 。 You need to import instead of in your header file (the top file in your question). -
编译代码时,#之前的#只处理一次; 它们不会在运行时处理。 例如,这使得以下代码变坏: if (max8986_power->isFullcharged == TRUE) { #define FULLY_CHARGED 1 } else { #define FULLY_CHARGED 0 } 因为你实际上#define FULLY_CHARGED x两次(预处理器忽略实际的C代码;不使用if检查)。 稍后当你if (FULLY_CHARGED = 0)你不仅试图检查一个无效定义的宏,而且你 ...
-
我对你的typedef struct tree {...} TREE_REC, *TR有点困惑。 我宁愿写: typedef struct tree {...} TREE_REC; //Alias on struct tree typedef TREE_REC * TR; //Definition of the pointer to a struct tree 在你的typedef中,令我不安。 你可以测试我的解决方案,或者只是澄清你的typedef的语法吗? I'm a bit confused wi ...
-
发生这种情况是因为除非在数组的声明中包含关键字struct ,否则编译器无法解析first的类型,如下所示: struct first f_array[20]; 或者使用typedef : typedef struct { char a[5]; int b; } first; struct second { first f_array[20]; }; struct second obj = {{0}}; 使用typedef意味着您不再需要在整个地方编写struct并使代码更清 ...