{"id":622,"date":"2016-11-16T22:36:08","date_gmt":"2016-11-16T22:36:08","guid":{"rendered":"https:\/\/ibex.tech\/windows-iot\/?p=62"},"modified":"2016-11-16T22:36:08","modified_gmt":"2016-11-16T22:36:08","slug":"main-function","status":"publish","type":"post","link":"https:\/\/ibex.tech\/csharp\/uwp-programming-in-c\/projects-general\/main-function","title":{"rendered":"main() function"},"content":{"rendered":"<p>\n\t&quot;App.xaml&quot; contains the class code that initialises the project and is the logical equivalent of main().\n<\/p>\n<p>\n\tConstructor\n<\/p>\n<p style=\"margin-left: 40px\">\n\tEffectively the app&rsquo;s main method. The plumbing that makes it the app&rsquo;s entry point is enabled by an &ldquo;Entry point&rdquo; setting in the package manifest (on the Application tab). When you create a project, Visual Studio automatically sets it to the namespace-qualified name of the project&rsquo;s App class.\n<\/p>\n<p>\n\tOnLaunched method\n<\/p>\n<p style=\"margin-left: 40px\">\n\tEnables the frame rate counter overlay in debug mode, navigates to the app&rsquo;s first page, and calls Window.Current.Activate to dismiss the splash screen. If you want to add a new page and make it be the starting point of the app, or if you want to customize the initialization logic, this is where you can do it.\n<\/p>\n<p>\n\tOnSuspending method\n<\/p>\n<p style=\"margin-left: 40px\">\n\tAttached to the base class&rsquo;s Suspending event. This gives you an opportunity to save state before your app is suspended, although the generated code does nothing here other than provide a TODO comment.&nbsp;\n<\/p>\n<p>\n\t&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&quot;App.xaml&quot; contains the class code that initialises the project and is the logical equivalent of main(). Constructor Effectively the app&rsquo;s main method. The plumbing that makes it the app&rsquo;s entry point is enabled by an &ldquo;Entry point&rdquo; setting in the package manifest (on the Application tab). When you create a project, Visual Studio automatically sets [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-622","post","type-post","status-publish","format-standard","hentry","category-projects-general"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/posts\/622","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/comments?post=622"}],"version-history":[{"count":0,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/posts\/622\/revisions"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/media?parent=622"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/categories?post=622"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/tags?post=622"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}