{"id":37499,"date":"2024-11-01T09:58:03","date_gmt":"2024-11-01T09:58:03","guid":{"rendered":"http:\/\/atmokpo.com\/w\/?p=37499"},"modified":"2024-11-01T11:02:29","modified_gmt":"2024-11-01T11:02:29","slug":"uwp-development-creating-a-new-project-based-on-the-prism-framework","status":"publish","type":"post","link":"https:\/\/atmokpo.com\/w\/37499\/","title":{"rendered":"UWP Development, Creating a New Project Based on the Prism Framework"},"content":{"rendered":"<p><body><\/p>\n<article>\n<header>\n<p>Write date: October 10, 2023<\/p>\n<\/header>\n<section>\n<h2>1. What is UWP?<\/h2>\n<p>\n                UWP (Universal Windows Platform) is a platform from Microsoft that allows you to develop applications that run on a variety of devices (PCs, tablets, smartphones, etc.). UWP maximizes developer productivity by enabling the creation of apps that can run on multiple devices with a single codebase.\n            <\/p>\n<p>\n                Key features of UWP include the ability to run apps on various platforms such as mobile, PC, and Xbox,<br \/>\n                XAML-based UI composition, and the provision of various APIs for modern app development.<br \/>\n                Thanks to these advantages, UWP is becoming increasingly popular among developers.\n            <\/p>\n<\/section>\n<section>\n<h2>2. What is the Prism Framework?<\/h2>\n<p>\n                The Prism Framework is a library designed to enhance the quality and maintainability of XAML-based applications such as WPF, Xamarin.Forms, and UWP.<br \/>\n                It adopts the MVVM (Model-View-ViewModel) pattern to help developers easily organize and manage their apps.\n            <\/p>\n<p>\n                Prism provides the following key features:\n            <\/p>\n<ul>\n<li>Modularity: Applications can be divided into multiple modules, distributing work and increasing code reuse.<\/li>\n<li>Dependency Injection: It provides an easy-to-manage structure for necessary components, making it convenient for testing.<\/li>\n<li>Event Aggregation: It effectively manages and binds a variety of events and commands.<\/li>\n<\/ul>\n<\/section>\n<section>\n<h2>3. Installing the Prism Framework<\/h2>\n<p>\n                To use the Prism Framework, you need to install the NuGet package.<br \/>\n                After creating a new UWP project in Visual Studio, install the required Prism package through the NuGet Package Manager as follows:\n            <\/p>\n<pre><code>Install-Package Prism.Windows<\/code><\/pre>\n<p>\n                Once the installation is complete, the basic structure of the project is ready.\n            <\/p>\n<\/section>\n<section>\n<h2>4. Creating a New UWP Project<\/h2>\n<p>\n                Launch Visual Studio and select the &#8216;Create a new project&#8217; option. In the &#8216;Platform&#8217;<br \/>\n                category, choose &#8216;Windows&#8217;, and then select &#8216;UWP App&#8217;.\n            <\/p>\n<p>\n                After setting the project name and save location, click the &#8216;Create&#8217; button to generate the new project.\n            <\/p>\n<\/section>\n<section>\n<h2>5. Setting Up the Prism-Based Structure<\/h2>\n<p>\n                To introduce the Prism Framework into the newly created UWP project, you need to set up the basic structure.<br \/>\n                In this step, modify the App.xaml.cs file to set it up as a Prism Application.\n            <\/p>\n<pre><code>using Prism;\nusing Prism.Ioc;<\/code><\/pre>\n<pre><code>public sealed partial class App : PrismApplication\n{\n    public App() : base() { }\n\n    protected override void RegisterTypes(IContainerRegistry containerRegistry)\n    {\n        \/\/ Register services here.\n    }\n\n    protected override void OnInitialized()\n    {\n        InitializeComponent();\n        NavigationService.NavigateAsync(\"MainPage\");\n    }\n}<\/code><\/pre>\n<\/section>\n<section>\n<h2>6. Creating and Configuring Modules<\/h2>\n<p>\n                Another advantage of Prism is support for modularity. You can manage each feature as a separate module.<br \/>\n                Create a new module and write the Registration file.\n            <\/p>\n<pre><code>public class MyModule : IModule\n{\n    public void OnInitialized()\n    {\n        \/\/ Called when the module is initialized.\n    }\n\n    public void RegisterTypes(IContainerRegistry containerRegistry)\n    {\n        containerRegistry.RegisterForNavigation<mypage>();\n    }\n}<\/mypage><\/code><\/pre>\n<\/section>\n<section>\n<h2>7. Implementing the MVVM Pattern<\/h2>\n<p>\n                Implement the MVVM pattern using UWP and Prism. Create a ViewModel and bind it to the View to easily manage data and testing.\n            <\/p>\n<pre><code>public class MainViewModel : BindableBase\n{\n    private string _title;\n    public string Title\n    {\n        get { return _title; }\n        set { SetProperty(ref _title, value); }\n    }\n\n    public MainViewModel()\n    {\n        Title = \"Hello, Prism!\";\n    }\n}<\/code><\/pre>\n<\/section>\n<section>\n<h2>8. Implementing Pages and Data Binding<\/h2>\n<p>\n                Bind the ViewModel in MainPage.xaml to create interaction with UI elements.<br \/>\n                Below is a simple example of XAML code.\n            <\/p>\n<pre><code>&lt;Page x:Class=\"YourAppNamespace.MainPage\"\n      xmlns=\"http:\/\/schemas.microsoft.com\/winfx\/2006\/xaml\/presentation\"\n      xmlns:x=\"http:\/\/schemas.microsoft.com\/winfx\/2006\/xaml\"&gt;\n\n    &lt;Grid&gt;\n        &lt;TextBlock Text=\"{Binding Title}\" \n                   FontSize=\"24\" \n                   HorizontalAlignment=\"Center\" \n                   VerticalAlignment=\"Center\"\/&gt;\n    &lt;\/Grid&gt;\n&lt;\/Page&gt;<\/code><\/pre>\n<\/section>\n<section>\n<h2>9. Testing and Debugging<\/h2>\n<p>\n                After building the application, run debugging and testing before deploying to the UWP store.<br \/>\n                Utilize Visual Studio&#8217;s debugging tools to quickly identify problems in the code.\n            <\/p>\n<\/section>\n<section>\n<h2>10. Conclusion and Additional Resources<\/h2>\n<p>\n                Through the above steps, I hope you have gained an understanding of the basic flow of UWP app development using the Prism Framework.<br \/>\n                I encourage you to refer to websites and books for deeper learning.<br \/>\n                Check out the <a href=\"https:\/\/prismlibrary.com\/\">official Prism documentation<\/a> or<br \/>\n                <a href=\"https:\/\/docs.microsoft.com\/en-us\/windows\/uwp\/get-started\/\">Getting Started with UWP<\/a>.\n            <\/p>\n<\/section>\n<footer>\n<p>\u00a9 2023 Developer Blog. All rights reserved.<\/p>\n<\/footer>\n<\/article>\n<p><\/body><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Write date: October 10, 2023 1. What is UWP? UWP (Universal Windows Platform) is a platform from Microsoft that allows you to develop applications that run on a variety of devices (PCs, tablets, smartphones, etc.). UWP maximizes developer productivity by enabling the creation of apps that can run on multiple devices with a single codebase. &hellip; <a href=\"https:\/\/atmokpo.com\/w\/37499\/\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;UWP Development, Creating a New Project Based on the Prism Framework&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[115],"tags":[],"class_list":["post-37499","post","type-post","status-publish","format-standard","hentry","category-uwp-programming"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>UWP Development, Creating a New Project Based on the Prism Framework - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/atmokpo.com\/w\/37499\/\" \/>\n<meta property=\"og:locale\" content=\"ko_KR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"UWP Development, Creating a New Project Based on the Prism Framework - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"og:description\" content=\"Write date: October 10, 2023 1. What is UWP? UWP (Universal Windows Platform) is a platform from Microsoft that allows you to develop applications that run on a variety of devices (PCs, tablets, smartphones, etc.). UWP maximizes developer productivity by enabling the creation of apps that can run on multiple devices with a single codebase. &hellip; \ub354 \ubcf4\uae30 &quot;UWP Development, Creating a New Project Based on the Prism Framework&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/atmokpo.com\/w\/37499\/\" \/>\n<meta property=\"og:site_name\" content=\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"article:published_time\" content=\"2024-11-01T09:58:03+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-01T11:02:29+00:00\" \/>\n<meta name=\"author\" content=\"root\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@bebubo4\" \/>\n<meta name=\"twitter:site\" content=\"@bebubo4\" \/>\n<meta name=\"twitter:label1\" content=\"\uae00\uc4f4\uc774\" \/>\n\t<meta name=\"twitter:data1\" content=\"root\" \/>\n\t<meta name=\"twitter:label2\" content=\"\uc608\uc0c1 \ub418\ub294 \ud310\ub3c5 \uc2dc\uac04\" \/>\n\t<meta name=\"twitter:data2\" content=\"3\ubd84\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/atmokpo.com\/w\/37499\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/37499\/\"},\"author\":{\"name\":\"root\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7\"},\"headline\":\"UWP Development, Creating a New Project Based on the Prism Framework\",\"datePublished\":\"2024-11-01T09:58:03+00:00\",\"dateModified\":\"2024-11-01T11:02:29+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/atmokpo.com\/w\/37499\/\"},\"wordCount\":499,\"publisher\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\"},\"articleSection\":[\"UWP Programming\"],\"inLanguage\":\"ko-KR\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/atmokpo.com\/w\/37499\/\",\"url\":\"https:\/\/atmokpo.com\/w\/37499\/\",\"name\":\"UWP Development, Creating a New Project Based on the Prism Framework - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#website\"},\"datePublished\":\"2024-11-01T09:58:03+00:00\",\"dateModified\":\"2024-11-01T11:02:29+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/atmokpo.com\/w\/37499\/#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/atmokpo.com\/w\/37499\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/atmokpo.com\/w\/37499\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\ud648\",\"item\":\"https:\/\/atmokpo.com\/w\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"UWP Development, Creating a New Project Based on the Prism Framework\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/atmokpo.com\/w\/#website\",\"url\":\"https:\/\/atmokpo.com\/w\/\",\"name\":\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/atmokpo.com\/w\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ko-KR\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\",\"name\":\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"url\":\"https:\/\/atmokpo.com\/w\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png\",\"contentUrl\":\"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png\",\"width\":400,\"height\":400,\"caption\":\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\"},\"image\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/bebubo4\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7\",\"name\":\"root\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g\",\"caption\":\"root\"},\"sameAs\":[\"http:\/\/atmokpo.com\/w\"],\"url\":\"https:\/\/atmokpo.com\/w\/author\/root\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"UWP Development, Creating a New Project Based on the Prism Framework - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/atmokpo.com\/w\/37499\/","og_locale":"ko_KR","og_type":"article","og_title":"UWP Development, Creating a New Project Based on the Prism Framework - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","og_description":"Write date: October 10, 2023 1. What is UWP? UWP (Universal Windows Platform) is a platform from Microsoft that allows you to develop applications that run on a variety of devices (PCs, tablets, smartphones, etc.). UWP maximizes developer productivity by enabling the creation of apps that can run on multiple devices with a single codebase. &hellip; \ub354 \ubcf4\uae30 \"UWP Development, Creating a New Project Based on the Prism Framework\"","og_url":"https:\/\/atmokpo.com\/w\/37499\/","og_site_name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","article_published_time":"2024-11-01T09:58:03+00:00","article_modified_time":"2024-11-01T11:02:29+00:00","author":"root","twitter_card":"summary_large_image","twitter_creator":"@bebubo4","twitter_site":"@bebubo4","twitter_misc":{"\uae00\uc4f4\uc774":"root","\uc608\uc0c1 \ub418\ub294 \ud310\ub3c5 \uc2dc\uac04":"3\ubd84"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/atmokpo.com\/w\/37499\/#article","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/37499\/"},"author":{"name":"root","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7"},"headline":"UWP Development, Creating a New Project Based on the Prism Framework","datePublished":"2024-11-01T09:58:03+00:00","dateModified":"2024-11-01T11:02:29+00:00","mainEntityOfPage":{"@id":"https:\/\/atmokpo.com\/w\/37499\/"},"wordCount":499,"publisher":{"@id":"https:\/\/atmokpo.com\/w\/#organization"},"articleSection":["UWP Programming"],"inLanguage":"ko-KR"},{"@type":"WebPage","@id":"https:\/\/atmokpo.com\/w\/37499\/","url":"https:\/\/atmokpo.com\/w\/37499\/","name":"UWP Development, Creating a New Project Based on the Prism Framework - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/#website"},"datePublished":"2024-11-01T09:58:03+00:00","dateModified":"2024-11-01T11:02:29+00:00","breadcrumb":{"@id":"https:\/\/atmokpo.com\/w\/37499\/#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/atmokpo.com\/w\/37499\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/atmokpo.com\/w\/37499\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\ud648","item":"https:\/\/atmokpo.com\/w\/en\/"},{"@type":"ListItem","position":2,"name":"UWP Development, Creating a New Project Based on the Prism Framework"}]},{"@type":"WebSite","@id":"https:\/\/atmokpo.com\/w\/#website","url":"https:\/\/atmokpo.com\/w\/","name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","description":"","publisher":{"@id":"https:\/\/atmokpo.com\/w\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/atmokpo.com\/w\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ko-KR"},{"@type":"Organization","@id":"https:\/\/atmokpo.com\/w\/#organization","name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","url":"https:\/\/atmokpo.com\/w\/","logo":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/","url":"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png","contentUrl":"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png","width":400,"height":400,"caption":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8"},"image":{"@id":"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/bebubo4"]},{"@type":"Person","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7","name":"root","image":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g","caption":"root"},"sameAs":["http:\/\/atmokpo.com\/w"],"url":"https:\/\/atmokpo.com\/w\/author\/root\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/37499","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/comments?post=37499"}],"version-history":[{"count":1,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/37499\/revisions"}],"predecessor-version":[{"id":37500,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/37499\/revisions\/37500"}],"wp:attachment":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/media?parent=37499"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/categories?post=37499"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/tags?post=37499"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}