Tag

XAML Archives - Falafel Software Blog

Google-Cloud-Platform-UWP-OAuth-Sample-Launch-Browser

Using Google Services in UWP C# Apps – Part 1

By | Cloud Platform | No Comments

This is post 16 of 17 in the series “Google Cloud for the .NET Developer” It’s no secret that I love Windows, and especially writing UWP apps for Windows using C#. In fact I’ve written a bit about creating UWP apps in the past, so as a fan of UWP, I wanted to explore how one can leverage the Google Cloud Platform and other Google services in Windows apps. Unfortunately, as of this writing, Google does not officially support UWP. However, this is not to say you cannot USE Google services in your app; it only means that the SDKs available to…

Read More
Windows-10-Custom-Trigger-Falafel2Go-Complete-Responsive-Layout

Windows 10 Development: Custom StateTriggers

By | Windows | 4 Comments

This is post 14 of 14 in the series “Developing for Windows 10” We’ve seen how the Windows 10 AdaptiveTrigger can help you create a dynamic responsive UI based on the height or width of the device or screen. However, this trigger is limited to a specific value for each dimension, and offers no way to respond to changes in the relationship between them, such as to determine the orientation or aspect ratio of the app. Fortunately, you are not limited to only the AdaptiveTrigger in Windows 10; you can create your own custom statetriggers based on virtually any property, even…

Read More
Windows-10-AdaptiveTriggers-Falafel2Go-Wide

Windows 10 Development: Responsive Design with AdaptiveTriggers

By | Windows | One Comment

This is post 13 of 14 in the series “Developing for Windows 10” In the previous post we looked at the basics of UI automation in Windows 10 apps using Blend to declare the XAML for Visual States. However, while last time we used event handlers in the code-behind of a page to trigger different states, this time we’ll see how to use the new AdaptiveTriggers in Windows 10 to let the application handle state transitions automatically. StateTriggers Each VisualState exposes a StateTriggers property, which is a collection of triggers that it uses to determine whether or not the state should be…

Read More
Windows-10-Visual-States-Sample-App

Windows 10 Development: UI Automation with Blend and VisualStateManager

By | Windows | One Comment

This is post 12 of 14 in the series “Developing for Windows 10” In our previous post we built a UniformGrid container for the ListView, resulting in an evenly-spaced, grid-like view for the main screen of Falafel2Go: This screen is actually made up of two such ListViews in a RelativePanel, allowing it to reposition the lists to support a landscape view, while still keeping the larger size for the featured Blog and Training activities. This layout switch happens automatically as the screen size changes (or, on a phone, if you rotate the screen to its side). Today we’ll see how we…

Read More
Falafel2Go-Windows-10-Desktop-Landscape

Windows 10 Development: Creating a UniformGrid Container

By | Windows | No Comments

This is post 11 of 14 in the series “Developing for Windows 10” This post describes the need for and implementation of a UniformGrid layout control that, when used with a ListView, allows the repeated elements to appropriately stretch to a consistent size to achieve a grid-like layout. Grid Layouts: Simple but Static In our last post we looked at the new RelativePanel control, which we used in the Falafel2Go app for Windows 10 to create a dynamic, responsive layout for the home screen:   You’ll notice that in most of the orientations, the Blog and Training elements are featured and…

Read More
Falafel2Go-Windows-10-Mobile-Landscape

Windows 10 Development: RelativePanel

By | Windows | No Comments

This is post 10 of 14 in the series “Developing for Windows 10” Another new control in the Windows 10 Developer toolbox is the RelativePanel, a layout container which enables flexible positioning between the elements it contains. Today we’ll take a closer look at this control and how we used it to build the UI of the Falafel2Go app for Windows 10. RelativePanel Positioning Using the RelativePanel, each element it contains can specify its position in relation to either another element, or docking to the container itself. By leveraging these position properties, you can easily create dynamic layouts in a…

Read More
Windows-10-Hub-App-Template

Windows 10 Development: Maintaining Application State

By | Windows | 3 Comments

This is post 7 of 14 in the series “Developing for Windows 10” We have so far created a simple app with two pages, that uses simple Frame navigation to go back and forth. However, the app is still missing one crucial feature: state management. When an app is suspended for whatever reason (such as being minimized on the desktop or navigated away from on the phone), it is up to the developer to maintain the current state so that it can be fully restored where the user left off. In this post we’ll look at a simple way we…

Read More
Windows-10-Development-Simple-Navigation-Runtime-Data-Seleced-Item

Windows 10 Development: Adding Simple Navigation

By | Windows | 5 Comments

This is post 6 of 14 in the series “Developing for Windows 10” So far we’ve setup a few pages with some design-time data to help us layout the app, but running it still yields a blank screen with no interaction possible. We’ll remedy this by loading the sample data at runtime and adding a simple navigation implementation to allow us to go back and forth between the pages. To keep things simple, we’ll briefly break from the MVVM pattern, and navigate directly of the page frame via the code behind, and in future posts see how we can roll…

Read More
Windows-10-MvvmLight-Design-Time-Data-View

Windows 10 Development: Adding Design-Time Data with Blend

By | Windows | 2 Comments

This is post 5 of 14 in the series “Developing for Windows 10” In our last post, we installed the MVVM Light Toolkit and defined the basic framework for a simple two-page app with the MVVM pattern. With the ViewModels we created, we now have the containers for the data, but it would be even more helpful to pre-populate them with some sample data to aid in the designing of the app. Design-Time Data Support Fortunately MVVM Light exposes a static property allowing the ViewModel code to detect whether or not it is running inside a visual designer such as Visual Studio…

Read More
Windows-10-App-Visual-Studio-Template

Hello, Windows 10: Getting Started Developing

By | Windows | 8 Comments

This is post 1 of 14 in the series “Developing for Windows 10” Today is a big day in the history of Microsoft; the long-awaited Windows 10 release is finally here, bringing a whole new level of interactivity, security, productivity and entertainment. And with it comes a whole a whole new App Development model designed to unify and enhance the developer (and ultimately the user) experience. As an avid fan of everything Microsoft, I’m excited to start this new journey, and in addition to sharing my enthusiasm for the platform, I thought I would go a step further and share…

Read More

XAML Inheritance in Xamarin

By | Xamarin | 9 Comments

Now it’s time to build the Fiction page. Hmmm, it is just like the Book page but with a different title (and of course, a subset of the books). We could copy and paste the XAML into the Fiction page. But then the NonFiction page is very similar to the Fiction page ,as is the Biographies pages. In each case, as far as the view is concerned, all we want to do is change the title. We could implement this by copy and paste, but “clipboard-inheritance” makes me itch.

Read More

Windows Phone and MVVM Light: NavigationService and CanGoBack

By | MVVM | 4 Comments

MVVM Light is a simple yet powerful framework for developing apps, and with the latest version 5 includes a new cross-platform NavigationService to aid in abstracting the navigation component of your apps. However, looking at the implementation of the INavigationService interface, there is no property available to support the idea of CanGoBack, which is important for devices like Windows Phone that include a back button. The default code that gets generated for the HardwareButtons.BackPressed event relies on the Windows implementation of NavigationService, which does have such a property, as shown in this example:

However since we’re using the MVVM Light version, we need a…

Read More
star-rating-windows-phone

Telerik UI for Windows Universal: Customizing the RadRating Control

By | Windows Universal Apps | One Comment

I’m working on a project using the new Telerik UI for Windows Universal, specifically the Rating control. This control is highly customizable, supporting different shapes and symbols, and is surprisingly easy to modify. In my case, I was satisfied with the default Star symbol, but needed to modify the color. I expected to see this as a simple property of the Rating control itself, but didn’t see one available in the Properties window nor via Intellisense. It turns out that the Rating control is a templated control, which is much more flexible than a simple property, as it allows you to intuitively specify different…

Read More

Easy Two-color Effect on a Telerik Chart

By | Telerik | No Comments

I was recently asked to create a Telerik Chart (RadCartesianChart) with an AreaSeries. This chart had a Grid Line Annotation marking the series’ average value, and the designer wanted the stroke of the AreaSeries to be one color above the average line and a different color below.  The end result needed to resemble this: Telerik had no official guidance for accomplishing this design goal with their charting component. However, since this was XAML, I realized that I could just use a LinearGradientBrush for the Stroke of the series, as long as I could calculate the gradient stops. Normally, a Gradient…

Read More

Adding Tapped Event Gestures to Any XAML Control with Xamarin Forms

By | Xamarin | 3 Comments

We previously looked at how to create User Controls with Xamarin Forms to display an Image Button for the different activities in our Falafel 2 Go application. Now that we have these reusable buttons, we need to make them tab-enabled so that they can launch the appropriate activity. As we’ll see in today’s post, this is very simple to implement with Xamarin Forms. Native Tap Events By default, only a small selection of Xamarin Forms controls expose events such as “Tapped” or “Selected” natively. ListView and the related ViewCell are examples, which makes sense as that is generally the purpose…

Read More
Xamarin-Forms-Image-Cell

Creating Reusable XAML User Controls with Xamarin Forms

By | Xamarin | 11 Comments

In the previous post on making fancy layouts with Xamarin Forms we saw how you can design a Dashboard style application that stretches to fill any device size. However one of the challenges of the particular design we chose for Falafel 2 Go was the need to support the concept of an Image Button, where both the icon and the text work as a single control to launch an activity. Xamarin Forms does provide an ImageCell control, which can be used in a TableView to render both text and image as a single control. However, this control is laid out…

Read More
falafel2go-xamarin-forms

Beyond the ListView: Fancy Layouts with Xamarin Forms

By | Xamarin | 5 Comments

We’ve already seen how Xamarin Forms makes it easy to create cross-platform applications that share common layout and behavior. While the included controls like ListView encapsulate a lot of useful behavior, they don’t make for the fanciest layouts. In early versions of Falafel 2 Go we had a simple ListView control as the main page, displaying all of the Activities we want to showcase, such as Blogs and Training as well as links to our social profiles. This worked great for testing but didn’t make for a very compelling application interface: In an attempt to at least add some visual…

Read More
Falafel Blog

Microsoft OCR Library

By | .NET, Blogs, C#, Fun, Microsoft, Multi-Device, News | 2 Comments

Microsoft recently announced that their OCR Library for Windows Runtime has been released as a NuGet package. This library enables you to add text reading capabilities to your Windows Phone 8/8.1 and Windows 8.1 Store apps. I wanted to get a simple working example up and running and found it to be quite easy and functional. I created a basic Windows 8.1 Store app. The XAML for the main page is listed below.

The code behind has only one event handler for the button click and because this is just a simple working example contains all of the code necessary…

Read More

Loading Indicators and Automatic ViewModel Refresh in Xamarin Forms

By | Xamarin | 7 Comments

This is post 4 of 5 in the series “Azure Mobile Services and Xamarin” This post continues the series on building a cross-platform app with Xamarin Forms. Although the focus is to demonstrate using Azure Mobile Services, there is a lot that we can do first to improve the user experience of the app. Today we will look at how easy it is to add a loading indicator as well as automatically refresh the app views when changes are made. ActivityIndicator Xamarin Forms includes a handy ActivityIndicator control which can be used to indicate that a long-running process is occurring….

Read More

Creating Device-Specific Properties in Cross-Platform Apps with Xamarin Forms

By | Xamarin | No Comments

The previous post Cross-Platform Apps with Xamarin Forms and Azure Mobile Services demonstrated a simple Xamarin forms app to store and manage rebates. However, there were a few issues that impeded the user experience that should be polished up.

Specifically, there are some discrepancies between the different platforms, such as different font sizes as well as a missing Page title on the Windows Phone version.

Today we’ll look at how we can create and use page resources to create device-specific properties allowing us to update the Rebate Reminder app to create a more unified user experience.

Read More

First Look at Windows and Windows Phone 8.1 Universal Apps with Visual Studio 2013 Update 2 RC

By | Windows | No Comments

Although I didn’t have the honor of attending Build this year (someday!!), I thought I’d do the next best thing and grab the latest bits and get my feet wet with the new Universal apps for Windows and Windows Phone, available with the newly released Visual Studio Update 2 RC. The installer ran without a hitch, and after a quick reboot I was up and running, though as far as I can tell nothing significant in the UI has changed. I was worried I would first need to install the Windows 8.1 Update as well, but apparently this is either…

Read More

Jesse Liberty Joins Falafel Software

By | News | No Comments

Tech influencer and former Microsoft and Telerik evangelist Jesse Liberty joins Falafel Software. Capitola, CA  August 29, 2013 – Today, Falafel Software is proud to announce and welcome Jesse Liberty to the team as a Master Consultant. Liberty is an esteemed author of numerous popular software development books and Pluralsight courses, a regular blogger and conference speaker, and the host of the popular “Yet Another Podcast” where he hosts “Intelligent Technical Conversations” weekly. In his new role, Liberty will supply hands on software development assistance to Falafel Software customers and take over several of Falafel’s online training courses. “I am…

Read More

Spicing up boring Windows 8 pages with the Telerik HubTile

By | Uncategorized | No Comments

This is a video blog post on how to spice up your boring Windows 8 pages using Telerik’s HubTile.   Attached Properties review : http://blog.falafel.com/Blogs/BaryNusz/bary-nusz/2013/01/16/using-generic-attached-properties-to-simplify-windows-8-settings-charm-pages Telerik HubTile: http://www.telerik.com/products/windows-8/controls-xaml/hubtile.aspx Falafel Bugs for Windows 8: http://www.falafel.com/store/falafel-bugs-for-windows-8 Boring example: https://github.com/physicspackage/Boring.git

Read More