Videos

150 posts

All posts containing video.

Now that we have loaded some Feed data, we need to customize our page with some data binding. To avoid having to worry about managing the title for each blog, we will instead data bind the title text directly to the title of the feed. This will let us offer a consistent user experience, with a minimum of scaffolding in our code. In this video, I will show you how to bind a data item to a grid element, and change the column span of a grid. References XAML Blog Reader – http://msdn.microsoft.com/en-us/library/windows/apps/br211380.aspx

Windows 8 Development - Edit Static Text Property

When we finish navigating to the SplitPage, we need to load some state information from our blog feeds. We will do this through the familiar LoadState method, and using some simple parameter casting we will populate the title of the different blogs. In this video, I will show you how to use a navigation parameter of type Object to load state in a new page. References XAML Blog Reader – http://msdn.microsoft.com/en-us/library/windows/apps/br211380.aspx

Windows 8 Development - Edit Static Text Property

By default, Visual Studio creates new projects with a title of 'My Application'. This is usually acceptable for a hello world application, but we will want to change this to match the intent of our application, being a Blog Reader. We could change this resource in many ways, but we are simply going to edit the Text property as a static resource. In this video, I will show you how to edit a static resource, namely the Text property of a TextBlock representing our page title. References XAML Blog Reader – http://msdn.microsoft.com/en-us/library/windows/apps/br211380.aspx

XCODE IOS View Controller life cycle

Now that the UI for our main application page is working, we need to add navigation to other related pages. While we have looked at adding a navigation bar previously, we can also navigate to a new page by simply adding code to the ItemClick event handler. Additionally, we can pass in parameters to identify the previous page, and give the target page whatever data it needs. In this video, I will show you how to enable the ItemClick event, and add code to the ItemClick event handler. References XAML Blog Reader – http://msdn.microsoft.com/en-us/library/windows/apps/br211380.aspx

Windows 8 Development – XAML DefaultViewModel Binding

Next we're going to hook up the UI for our main application page through the DefaultViewModel collection. A page of type 'Items' has a default View Model defined, and it is possible to hook up to a data source with only a few lines of code. Once done, the page will render the items in the default template format. Of course,customization will likely take place from the default settings. In this video, I will show you how to bind our data feeds to the DefaultViewModel["Items"] element of our ItemsPage. References XAML Blog Reader - http://msdn.microsoft.com/en-us/library/windows/apps/br211380.aspx

Windows 8 Development – Changing XAML Start Page

Developers familiar with Visual Studio are aware that it is possible to change the startup project via a context menu. Similarly, when the application starts, it will load the page defined in the OnLaunched method. In order to change which page is launched, the type of the page passed in just needs to match a type within the current project which derives from LayoutAwarePage. In this video, I will show you how to change the start page for a XAML application through the code-behind file. References XAML Blog Reader - http://msdn.microsoft.com/en-us/library/windows/apps/br211380.aspx

Windows 8 Development – Adding Multiple XAML Pages

Adding UI pages is a fundamental part of creating any interactive application, and can sometimes be quite time consuming. Luckily, there are several templates to choose from which can speed up the process, and reduce development time by enabling rapid deployment of pre-defined templates. In this video, I will show you how to add multiple pages to a XAML application. References XAML Blog Reader - http://msdn.microsoft.com/en-us/library/windows/apps/br211380.aspx

Windows 8 Development – XAML OnLaunched / NetworkInformation Class

Now that we've added our resource for the feed data, we need to override the OnLaunched method in App.xaml. Since our application also needs to check for an internet connection, we will make use of the NetworkInformation class. This class presents a standardized way to check for an active internet connection rather than an arbitrary DNS query, or other methods of checking for connection. OnLaunched is called when the application is launched, and it is in this method that we'll perform our internet check, as well as start pulling down feeds. In this video, I will show you how to override the OnLaunched method with application specific logic, and how to use the NetworkInformation class. References XAML Blog Reader - http://msdn.microsoft.com/en-us/library/windows/apps/br211380.aspx

We've created a class that will handle the blog data feeds we are interested in, but now we have to incorporate that class into our program. Using App.xaml, we can insert a named instnace of our feed data, and then later manipulate that instance to retrieve data feeds. For those familiar with XML, XAML allows for easily defining a resource, and inserting it at an appropriate point in the schema. In this video, I will show you how to add a resource to an application using XAML. References XAML Blog Reader - http://msdn.microsoft.com/en-us/library/windows/apps/br211380.aspx

Windows 8 Development – XAML Blog Reader Code Review / Await Keyword

After creating our project and copying some code from our tutorial, we will now examine that code. The SyndicationClient makes pulling down feeds next to trivial, however to make a responsive application asynchronous programming is the best approach. The await keyword takes care of a lot of work behind the scenes such as creating callbacks, and allows updating UI elements in the same piece of code as an asynchronous call is made, without the need to invoke any external dispatchers. In this video, I will discuss the sample code and the asynchronous approach. References XAML Blog Reader – http://msdn.microsoft.com/en-us/library/windows/apps/br211380.aspx

Windows 8 Development – XAML Blog Reader Introduction

As we enter the final portion of our XAML Windows 8 series, we will start creating a meaningful application beyond our PhotoViewer, a Blog Reader. Windows Team blogs will be chosen, but any blog that syndicates over RSS is feasible to use in our application. In this video, I will show you how to create a new project for the Blog Reader and add a data class. References XAML Blog Reader - http://msdn.microsoft.com/en-us/library/windows/apps/br211380.aspx

Windows 8 Development – Load File Picker State XAML

Previously, we explained how to save the currently selected state of a file picker in a XAML application. As before, however, we need to load the saved state to have the changed reflected in the relaunch of our application. Now, we will add logic to load the state at program launch, and demonstrate the full lifecycle of data within the application. In this video, I will show you how to load state from a file picker. XAML File Pickers – http://msdn.microsoft.com/en-us/library/windows/apps/jj655411.aspx

Windows 8 Development – Save File Picker State XAML

In our last video, we used the picture selected via our file picker to populate properties to text blocks. Now, we want to save the state of our new page, so that the picture selected will persist across application launches. At first glance it might seem as easy as just preserving the file path, but we will need to consider permissions to that image first. When a file picker is launched, file access permissions are given to the application to any file the user selects (implicitly). To maintain these permissions, we will need to register the file as a 'Most Recently Used' file, and use the token returned from that operation for future access. In this video, I will show you how to save the state of a file picker. References XAML File Pickers – http://msdn.microsoft.com/en-us/library/windows/apps/jj655411.aspx

Windows 8 Development – Data Binding XAML

Data binding is an essential concept to software development, and one that is luckily made near-trivial by Visual Studio. In a one-way binding, data is populated in one direction, to the end UI control. In this system, changing a value in the control does not reflect in the data source. In a two-way binding scenario, data can flow back from the control to the data source. This is useful for an 'edit' role, versus a 'label' role which would more appropriately make use of one-way binding. Data binding was made popular in WinForms (.NET 2.0), and Visual Studio 2012 makes it intuitive. Through multiple methods, such as Binding.Source and DataContext switching, a control can be bound to a source in just a few clicks. In this video, I will show you how to bind a TextBlock to the DisplayName property in a file chosen from a FilePicker. References XAML File Pickers - http://msdn.microsoft.com/en-us/library/windows/apps/jj655411.aspx

Windows 8 Development – File Picker Code Review XAML

Previously we have used boilerplate code, with some modification, to add a file picker workflow to our application. Now, we need to review that code to understand each step, and any modifications which may be needed for different uses for the workflow. We will also leverage asynchronous programming, to ensure this operation does not block any other elements of the application. In this video, I will review the code we previously used for the file picker workflow. References XAML File Pickers – http://msdn.microsoft.com/en-us/library/windows/apps/jj655411.aspx