UWP: Things Required To Do Right After Creation of New Project.

May 17, 2016
2 mins read

Microsoft Visual Studio really supports you during the App development. It provides you lot of facilities and easiness in the form of pre-defined required code, Intellisense and important files that makes the developers life so much easier than ever before.

Perhaps there are few things which you might want to do right after creation of new project.

Pick the Right Template

When you create the project then even at the time of project creation Visual Studio provides you lot of templates so you can pick up the right project type for you that will help to fully concentrate upon your project.

Choose the Target Versions

After you choose the project template and click OK, Visual Studio will ask you for target platform versions. Here you can choose the Maximum and Minimum Target Version which I recommend is to choose the latest target version in “Target Version” and choose the earliest target version in “Minimum Version”. That will allow you to target all the target versions of UWP Platforms.

Perhaps its upon you, choose whatever your requirement is. If you are want to target a specific build, then choose accordingly…

Then after you choose the Target Versions, Visual Studio will create lot of stuff for you so you can now directly focus upon your app goal…

DisableFrameRateCounter

Now the first thing which you should do is change the EnableFrameRateCounter = false. Basically the Frame Rate Counter really disturb while testing your app.

So to remove that counter, simply change it from true to false.

So that’s how you can get yourself free from that ugly counter…

Change the Splash Screen

The next thing you should do is to replace that default splash screen and other icons from Assets folder…

So for that, simply open Package.appxmanifest file from the Solution Explorer. Here you can fully customize your app.

So from here you can customize your all basic visual assets;

But to customize assets you need to care about parameters and size etc…

That will make your app cool from the beginning and keep your interest to play with stuff…

Add a Back Button

Next thing you should do is to add Back Button in your app if required. Most of the apps which you develop might require go back to previous frame or in common term, previous page.

So for that, simply add the following code in to your App.xaml.cs file to your OnLaunched event handler.

rootFrame.Navigated += RootFrame_Navigated;

// Register a handler for BackRequested events and set the 

// visibility of the Back button 

SystemNavigationManager.GetForCurrentView().BackRequested += OnBackRequested; 

SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility = rootFrame.CanGoBack ?  AppViewBackButtonVisibility.Visible : AppViewBackButtonVisibility.Collapsed;

Now simply defined the methods which we declared above;

private void RootFrame_Navigated(object sender, NavigationEventArgs e) 

    // Each time a navigation event occurs, update the Back button’s visibility 

    SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility = 

        ((Frame)sender).CanGoBack ? 

        AppViewBackButtonVisibility.Visible : 

        AppViewBackButtonVisibility.Collapsed; 

private void OnBackRequested(object sender, BackRequestedEventArgs e) 

    Frame rootFrame = Window.Current.Content as Frame; 

      if (rootFrame.CanGoBack) 

    { 

        e.Handled = true; 

        rootFrame.GoBack(); 

    } 

And there you go… So whenever you go to next frame in your app it will add back button on the top bar in Desktop version. In Mobile, the back button will navigate you to previous frame…

Default Page

Another thing which you might want to do is to make make your own default page for your app rather than MainPage.xaml And for that simply add new page and named it whatever you like.

Now from App.xaml.cs simply change the root frame navigation from MainPage to your own default page (In this case justSajid.xaml).

And now you may simply delete your MainPage.xaml from solution explorer.

Conclusion

Hope that will help you to JumpStart into your project whenever you are going to develop an Idea into app…

FOR HANDS ON DEMO

In order to get a best hands-on experience along with the Blog. Try out the code either By MSDN Code Samples or By GitHub.

Data Scientist & Solution Architect || IBM Recognised Speaker, Mentor, and Teacher || Debater || Blogger || Guinness World Record Holder || Watson Solution Developer || IBM Community Activist || Aspiring to Inspire.

Leave a Reply

Your email address will not be published.

Previous Story

EVOLVE16: Steve Wozniak at Evolve16

Next Story

They arrived in fifty mother ships

Latest from Blog

Quantum Computing | What, Why & How

Now as we are starting the 5th decade after the very first proposed model in the 1980s, quantum computers are now commercially available, brought out of the lab, and into the industry by IBM Quantum. With many experts predicting it will revolutionize the way we approach problem-solving. With the recent

Case Study: Digital Transformation of “justSajid Bank”

In this current era of what we call “digital first”, industries are repeatedly changing and evolving with the help of technology. So as the banking industry is reshaping itself, banks need to keep adopting positive changes to counter and overcome the key challenges of the modern world to overcome the

Metaverse || A Whole New World.

Things are going to be super dramatic in the next few years. Metaverse is going to open a lot of new doors to revise things that we are doing now. The culture and lifestyle would be changed. Some new cultures would have emerged and everybody would be living without physical

Pakistan Day 2020 | Coronavirus Technical Solutions

Well, on Pakistan Day 2020 our nation along with the rest of the world is facing Corona Pandemic. As the sons of this great motherland, we are trying to play our roles at our places. Within the last few weeks, Alhamdulillah I’ve got a chance to develop two technical solutions

Password: Choose the Secure, Easy and Cool Password

A super secure Password is very common nowadays. Although according to experts the password is going to expire very soon. Moreover, the pin codes are also replacing password in some why. Perhaps still there is a lot of importance of a secure password in many places. The one of the most

JumpStart with DevOps

What is DevOps; DevOps is a Software Development Strategy, that bridges the gap between the Dev and the Ops side of the company. * It’s not a tool, it’s a Methodology to bridge the gap b/w development and operations teams! As there is always a lot of conflicts between the

JumpStart Programming with Python 3

Motivation; Well, if you want to play with data and deal with complex analytics problems then Python is the best for you. We can use Python for developing complex scientific and numeric apps. Python is designed with features to facilitate data analysis and visualization. The syntax in Python helps the programmers to do coding

Understanding of Data Science Methodology

Motivation: It’s all about the different methods used in data science. Data Science Methodology: There is the following methodology used in data science which can further categories into different phases; From Problem to Approach Business Understanding Analytical Approach Working with Data Data Requirements Data Collection Data Understanding Data Preparation Deriving the

Understanding Machine Learning Methodology

Motivation Well, if we talk about a human cell sample extracted from a patient. The cell would have some characteristics. One of the interesting questions we can ask, what kind of statistics that cell have? One could easily presume that only a doctor with years of experience could diagnose a tumor and

SIMPLE NAVIGATION IN WINDOWS APPLICATION

The Navigation of UWP Apps is extremely cool and easier than other platforms. It allows enabling a variety of intuitive user experiences for moving between apps, pages, and content. Navigation is the key part of the Application. In your small Apps, you may maintain your contents and functionality in a

UNDERSTANDING THE ARCHITECTURE OF UNIVERSAL WINDOWS PLATFORM

The architecture of Universal Windows Platform is most exclusive with the center of gravity which is One Windows Core. Now the whole development will follow the common refactored core that will common for all the windows Releases. It’s all about One Core, One Hardware Platform, Universal Hardware Driver and Standalone

Guinness World Record Holder | Hajj Hackathon | Khadim Al-Haramain Al-Sharifain

Khadim Al-Haramain Al-Sharifain Built an MVP of a cognitive platform name “Khadim Al-Haramain Al-Sharifain“.  Objective The objective was to facilitate Hajj operations by introducing cognitive services integrated with Hajj systems. Hence millions of Muslims who are there for Allah Rab-ul-Izat, can perform anything without disturbing their focuses and concentrations.  Functionalities

JumpStart with IBM Bluemix

IBM Bluemix is the world most exclusive cloud platform that provides developers to quickly develop, Deploy and manage Apps over the cloud without dealing with any underline infrastructure. Bluemix provides great open source platforms for your needs. Tech experts believe that up to 2020 the computing era would completely change.

JumpStart Into Big Data With HDInsight

What would happen when the volume of your data increased repeatedly over time and you need high velocity at the same time. Not only that but you have a different variety of data and Variability also exists in your data. So how would you handle all that data? If we

Microsoft SharePoint: Create an Intranet in SharePoint

As you should already have some hands on with SharePoint. So, Lets do some hands on with SharePoint Intranet for Small company. Simply start with a Blank Site Collection. Let’s assume that the company has 3 Departments: Sales, Production and Support. They each have their own area in which they should

.NET Core

.NET Core 1.0  .NET Core 1.0 is a major new investment in the future of .NET and laying the foundation for decades to come. Still, it is in its early stage, and for some time you might still focus .NET Framework 4.6 depending on your application needs. But for many scenarios,

JUMPSTART WITH DATA BINDING IN UWP

Data Binding is one of the most interesting topics in Universal App Development. In order to perform the better functionality, you really need to have some great usage of Data Binding in you Apps. So! First thing first. What is actually the Data Binding and is its usage in UWP.

justSajid | A PLACE FOR MY THOUGHTS

This blog is my personal mental playground. The views expressed are mine, and mine alone. They do not represent the views of my employer, my family, my friends, my imaginary friends, my neighbors, people who live in my city, province, country, region, or planet, nor do they represent the views

justSajid | A PLACE FOR MY THOUGHTS

justSajid is my personal mental playground. The views expressed are mine, and mine alone. They do not represent the views of my employer, my family, my friends, my imaginary friends, my neighbors, people who live in my city, province, country, region, or planet, nor do they represent the views of

Agentic AI: The Future of Machines Acting with Purpose

Artificial Intelligence (AI) has come a long way from being a fancy algorithm for chess games to becoming our digital assistant, creative collaborator, and even a philosopher’s muse. One of the more intriguing advancements in AI is Agentic AI—an AI system that can act autonomously, pursue goals, and make decisions,
GoUp