Tuesday, May 26, 2015

SplitView Control – A New XAML Control VisualStudio2015



SplitView Control – A New XAML Control

The Introduction


The very idea of  SpiltView originates from the Navigation Framework inside a XAML application.The navigation framework was introduced since Silverlight.The major components of the Navigation Framework were
1.Frame
2.Page
The Frame here is much like the browser which was used to contain a page which can be navigated back and forth.Here, the Front forward stack and the Back Stack.
They supported series of methods namely
1.GoBack()
2.GoForward()
3.CanGoBack()
4.CanGoForward()

But often its only about the navigation which the developers are concerned about. This is why you have SplitView . SplitView helps us navigate with “type” and not the URI which we used to do in Silverlight. Also, we don’t have to care the physical location of the file as well. 

The Page
The page has the two methods
1.OnNavigatedTo(Param)
2.OnNavigatedFrom()
These two overridden method which help us to navigate and hence help us to interact with the page.
 Although there are few more things worth noticing in Page.NavigationCacheMode which are primarily concerns of if the page is supposed to be created again or the same instance of the page will be rendered.

 Jumping with SpitView

SplitView is there for navigation affordance which means this gives a smoother way to navigate with menus and making the UI more smoother and fluid.

Where Do you use a SpiltView?



Universally this is Also know as the “Hamburger Menu” because it has two pieces of bread forming a nice Big Boy burger . But yes, That’s the split view. It’s a menu which takes care of a tons of problems a developer has while transiting from one page to another or simply just navigating from one part of the app to another.

Behaviors of a Split View

 
 
SplitView on taping pops out a menu and shows different options. Although its not mandate to have the Split View respond to tap request.






Where do you get the SplitView from?


The new Segoe Font will have the SplitView. All these are vectors and are oriented to Windows 10 Style.

 





Application of the SplitView

SplitView namely has 3 Properties
SplitView.Pane
SplitView.Content
SplitView.PaneDisplayMode


Lets Talk in details about SplitView.Pane


Pane is where the developer puts in all the buttons which are either on the left or the right of the Application.The Pane will also take in what kinds of buttons are going to be available for tapping  in the application.

The SplitView.Content



The most important property is the Content property. The Content Property sits over the frame and gives a navigation affordance. The Content also gives us a lot of grip with the overlay on the UI.

The SplitView.PaneDisplayMode



Depending on if you SplitView is open  or closed we have the PaneDisplayMode has its property.


The Inline when set to true will give a jolting experice to user as the content will shift the SplitView opens up. In case of the overlay although the content will not shift ,It will simply have the splitview menu coming out as a flyer over the content. The CompactInline will have the capabilities of shifting the content to a large extent if the SplitView is set to true or just have a sleek thin outline when set as false. The Compact overlay will have the same properties like the overlay only difference is in both the cases of Compact Overlay there will be a slight shift of content.

Sunday, May 24, 2015

Understading UAP and Building Universal Apps with Blend 2015




This article will be dedicated to Development of Universal Apps . Leveraging Universal App Platform and VS 2015 Blend.


Universal App Platform



This is a collection of Contracts and Versions which are a set of  low level APIs which is exactly against which a developer will be writing their Apps.Everytime one has Windows 10 installed they can go ahead and check out this file which will give them an idea about what UAP versions are supported to him.

Windows as a Service

This is exactly where the fun begins. The APIs in UAP are a converged set of APIs which are going to be the same irrespective of the platform of Windows or the Version of Windows the developer is trying to deploy.The APIs are nothing but the superset of the same which we used in Windows 8.1 . Now, since “Windows as a service” will have regular updates the developers will not have the issue to migrate their solution every now and then. They can simply, build against UAP and which is going to fit in just fine with all the upgrades .



Layout of Apps




The fundamental of  the laying the application has not changed . Although, there are few new tags but the Package.appxmanifest remains unchanged. There is just one single HEAD project, because since in Windows 10 we will targeting multiple platforms against one single Windows Core; there is no family specific binary for each of them.But yes, developers can choose to have multiple Heads can can easliy to go the shared project style , they totally can do that.

Laying out the Interface

The Xaml based UI remains exactly what it used to be. There has been major focus on

1.Reusibility
2.Quality
3.Value
4.Scalable
5.Accessible

Lets start by making a sample application using Blend and making the full use of UAP .






Figure1. Choosing the UAP and Changing the Name.






 Figure2. The XAML file




Figure 3. Choosing any device where I would love to run the App.


 





Figure 4. Adding an Sample Data Source to the App.


 






Figure 5. Dragging it to design where It can run on a runtime


 







Figure 6. The Sample Data source has been added and is ready for building and deployment



 









Figure 7. App is running on a Simulator 






Figure 8. App running successfully!


Exploring Blend and Merits of UAP
1.Blend now uses the same Visual Studio shell which enables the developers to have the exact same capabilities in terms of intellisense , auto complete inside and much more.
2.Blend has Data Management , Resource Management which are a few Unique things which Blend has to itself which have been brought forward to Visual Studio 2015.
3.UAP has made it possible to have one single binary across all the platforms of Windows.




Thursday, May 21, 2015

Setting up Windows 10 For Development



Setting up Windows 10 For Development

Windows 10 is one of the most flexible and robust development platform ever given. Windows Core and UAP has enabled developers to build experiences once and then target it to any device which runs Windows 10 be it a Xbox or Desktop.

In this article I will talk in depth about how one can setup their own dev environment.  Platform without facing much of a hassle.


Lets begin our journey with a clean build of  Windows 10 . I am using  Windows 10 Insider Pro Preview Build 10074.


·       For all the people who are new to development and are very new to Windows 10. Its will be very helpful to go through the Architecture of Windows 10 before , before getting hands dirty with setting up dev build.

People who are very familiar with App Dev and Web Dev on Windows 8/8.1 . Here is how you set up VS 2015 Community RC.

Installing Visual Studios 2015 Community RC

·       People who don’t have VS 2015. It’s a easy task and and requires patience while you are doing it for the first time.
1. Start off by downloading VS2015 Community RC from [
https://www.visualstudio.com/en-us/downloads/visual-studio-2015-downloads-vs.aspx]
2.It will download an exe file named [vs_community.exe]
3. When you are trying to install select “
Custom in setup, and then select the Universal Windows Apps Development Tools.”
4.Then it will complete installing , this might take 4-5 hrs depending on your network speed and the system.
5. You will get this after the installation is done.





·       People who have already installed Visual Studio 2015RC Community without custom can still get to the same page in a jiffy by downloading the tools and updating the Windows SDK
1.
People can follow this link [
https://dev.windows.com/en-US/downloads/install-dev-tools-visual-studio-2015]
2. Click on Add Tools and you guys will get an exe file downloaded.
3. On Executing the .exe file you will get the following screen and after its completion you will be all set to go.








Enabling the Windows 10 Developer option.

When you try to open any new project Windows 10 , you will be prompting you  to enable your device with a dialog. (You also need your device to be enabled to use the designers and debug your app.)


You need to follow these following steps sequentially when you are enabling the developer mode.

1.Open a cmd prompt with administrator privileges.


2.Run Gpedit.msc.




3.Go to Local Computer Policy > Computer Configuration > Administrative Templates > Windows Components > App Package Deployment


4.Edit the policies to enable the following:
◦Allow all trusted apps to install (Enables your device for sideloading apps)
◦Allows development of Windows Store apps and installing them from an integrated development environment (IDE) (Enables your device for development from Visual Studio)


5. Reboot your machine.


After you are done with all the steps you will now be able to build apps and leverage the power of Windows Universal (UAP) . To mark the successful completion of the process you will have the following screen when you open Visual Studio 2015RC .



I will be writing more about the Application Dev taking in the whole power of UAP and much more in the forthcoming articles.

Thursday, May 14, 2015

Windows 10 Architecture



Architecture of Windows 10

In this article I will try to put in a nutshell what are the fundamental differences in Windows 10 compared to prior releases of the same. I will give a small overview of the concept of how Backward Compatibility of the Apps are possible inn Windows 10 and the Converged Kernel Approach to Windows 10.

Windows Core

 This is worth pointing out that finally we have reached the point where Windows core has a common set of APIs which provide , for the first time a true binary compatibility with loads of different platforms.Microsoft  has been shipping whole bunch of OS (s) for a decade now and their were many commonalities between those viz Windows Phone, Windows CE and Windows RT mostly these were same but the underlying layer was different. The Windows Core now is that common refactored core which is common for all the Windows Releases be it for Mobile or Desktops.

This Windows Core is very small and reduced subset of all the windows. This is done to keep in mind that Windows can now be having one single codebase rather than a shared codebase  and also the usage on a whole range of different devices which range from IoT to Desktops .


 The Convergence Journey                                            
                                                         




The converged Kernel approach was all which made a significant difference in shaping Windows 10. The Xbox 360 and Windows 7.5 started having the new look and feel which later got modified in Xbox One(inclusion of a dashboard etc.)and with Windows phone 8 the look feel was fully embedded but there was a big difference underneath which led the users and developers to Windows 8.1 for Mobile and Desktops which created the Converged App Model and resulted in possibility of development of “Universal Apps”. But now with Windows 10, we not only have the Kernel common but also all the fundamental pieces of OS. Also, the Applications which were Universal Apps were having two separate binaries now with Windows Core have one single binary across all platforms.


Universal App Platform

The UAP is a collection of Contracts and Versions.This is the new platform on which the developers will be writing their Applications. The UAP is built on Windows Core which is a collection of Low Level APIs which are arranged in the form of Contracts.

Contracts
Contracts are a kind of assurance given by Microsoft to App Developers stating that they can now start building against the UAP and Microsoft will ensure that no matter what windows platform and device the user are on they will be able to run it and Microsoft will ensure that the App runs smoothly on the back compatibility as well.









This essentially means that no longer the developers will write the Application targeting  Windows rather they will write it against UAP and Microsoft will take guarantees for the Application to run of all Platforms.


How does the UAP help the developers?

So for all those developers who get tired testing their applications for the ever evolving build of Windows.The can now safely rely on UAP which ensure that no mater where ever they target and whichever version they target they are going to have the Application running. So, developers don’t have to worry much about which particular windows to test on.






**The values above are fictitious.

The very idea is to target a platform and set a Min version which is basically the version it was written on and a Max version of where it was tested on.

This is the very basic fundamental change that is happening in the Architecture. I will be documenting few more post on Azure and Windows 10.Also, one dedicated post on UAP and how to start writing Apps in Windows 10.