Skip to content

Latest commit

 

History

History
241 lines (178 loc) · 15 KB

README.md

File metadata and controls

241 lines (178 loc) · 15 KB

#Windows App Studio Libraries

This repository contains the source code of the libraries used in Windows App Studio to create our generated apps.

A sample implementation of these libraries is available in the Windows Store: Windows App Studio Uwp Samples. You can see the implementation details in the source code.

There are three libraries: DataProviders, Uwp and Common. The libraries are also available as Nuget packages.

https://www.nuget.org/packages/WindowsAppStudio.Uwp
https://www.nuget.org/packages/WindowsAppStudio.DataProviders
https://www.nuget.org/packages/WindowsAppStudio.Common

Table of Contents

Uwp Library

This library contains XAML controls for Windows 10 apps only.

##Layout Controls ###ResponsiveGridView Control The ResponsiveGridView control allows to present information within a Grid View perfectly adjusting the total display available space. It reacts to changes in the layout as well as the content so it can adapt to different form factors automatically. The number and the width of items are calculated based on the screen resolution in order to fully leverage the available screen space. The property ItemsHeight define the items fixed height and the property DesiredWidth sets the minimum width for the elements to add a new column.

View code
https://github.com/wasteam/waslibs/tree/master/src/AppStudio.Uwp/Controls/ResponsiveGridView

###Pivorama Control The Pivorama control allows to visualize a set of elements optimizing the available space to display them. The Pivorama behaves differently based on the screen size: in big screens, it maximizes the number of items displayed using a table kind layout, with the ability to slide horizontally; in small screens, it behaves more like a Pivot control, showing the items in groups, with a heading inviting to slide horizontally. The Pivorama control is ideal to display big number of items in the best way depending on the device form factor.

View code
https://github.com/wasteam/waslibs/tree/master/src/AppStudio.Uwp/Controls/Pivorama

###VariableSizedGrid Control The VariableSizedGrid control allows to display items from a list using different values for Width and Height item properties. You can control the number of rows and columns to be displayed as well as the items orientation in the panel. Finally, the AspectRatio property allow us to control the relation between Width and Height.

View code
https://github.com/wasteam/waslibs/tree/master/src/AppStudio.Uwp/Controls/VariableSizedGrid

###Carousel Control The Carousel offer an alternative to image visualization adding horizontal scroll to a set of items. The Carousel control is responsive by design, optimizing the image visualization in the different form factors. You can control properties like the AspectRatio, MaxItems, MinHeight, MaxHeight, GradientOpacity and AlignmentX to properly behave depending on the resolution and space available.

View code
https://github.com/wasteam/waslibs/tree/master/src/AppStudio.Uwp/Controls/Carousel

###SectionList Control The SectionList control enables the horizontal item visualization adjusting the number of items shown to the available space. A SectionList is composed by one or more SectionListItem which can contain any XAML code. Each SectionListItem may have a Header and a ViewAll button to navigate to the list of items shown. The control shows a progress indicator while loading. If an exception occurs during the load, an error message is shown.

View code
https://github.com/wasteam/waslibs/tree/master/src/AppStudio.Uwp/Controls/SectionList

###SplitterCard Control The SplitterCard control applies a specific design to strings. For any given string, the controls split the text by spaces. The first two words in the text are displayed one over the other using a specific style and highlighting the first one.

View code
https://github.com/wasteam/waslibs/tree/master/src/AppStudio.Uwp/Controls/SplitterCard

##Foundation Controls ###VisualBreakpoints Enables the definition of different visual breakpoints for a certain layout as well as modifies the properties of child controls based on the breakpoints defined. In other words, adds the ability to change the layout and property values of controls based on the defined 'breakpoint values'. There are two main advantages over the platform VisualStateManager control: 1) all the visual breakpoints are defined in a centralized JSON file, which can reference other JSON files; 2) allows the modification of properties inside controls that belongs to DataTemplates.

View code
https://github.com/wasteam/waslibs/tree/master/src/AppStudio.Uwp/Controls/VisualBreakpoints

###ImageEx Control The ImageEx control extends the default Image platform control improving the performance and responsiveness of your Apps. Source images are downloaded asynchronously showing a load indicator while in progress. Once downloaded, the source image is stored in the App local cache to preserve resources and load time next time the image needs to be displayed.

View code
https://github.com/wasteam/waslibs/tree/master/src/AppStudio.Uwp/Controls/ImageEx

###VirtualBox Control The VirtualBox control allows to redimension any XAML DataTemplate proportionaly. The control works directly with the underlying ContentPresenter to have a smooth behavior and high optimized performance.

View code
https://github.com/wasteam/waslibs/tree/master/src/AppStudio.Uwp/Controls/Virtualbox

###RelativeBox Control The RelativeBox control uses XAML to apply a responsive behavior to the DataTemplate configured.

View code
https://github.com/wasteam/waslibs/tree/master/src/AppStudio.Uwp/Controls/Relativebox

###Relative and VirtualBox The RelativeBox control can be used together with the VirtualBox control to apply a better responsive behavior to the DataTemplate configured.

###SearchBox Control The SearchBox control allows to handle the App search feature. You can decide how the control will be displayed using properties Foreground, Background, PlaceHolderText, FontSize, etc. The SearchCommand property establish the command to execute when the user press enter or click the magnifier.

View code
https://github.com/wasteam/waslibs/tree/master/src/AppStudio.Uwp/Controls/SearchBox

##App Services ###Navigation Service The NavigationService service handles the complexity of navigating among App pages. It can be used in the main rootFrame as well as in other internal frames, like a ShellControl with Hamburger button.

The navigation can be implemented in multiple ways: using the .NET Type of the page we want to navigate to; using a string with the page name as target page; or through an element which implements the INavigable interface. We can use the NavigationService to open the web browser as well.

View code
https://github.com/wasteam/waslibs/tree/master/src/AppStudio.Uwp/Navigation

###AppCache Service The AppCache is a service class which use local storage to maintain persisten information among App executions hiding the complexity of saving to and load from the local storage the elements added to memory.

View code
https://github.com/wasteam/waslibs/tree/master/src/AppStudio.Uwp/Cache

##Utilities ###ErrorNotification Control The ErrorNotificationControl allows to show a message when an exception occurs. You can configure the message background color and the user can close it once read.

View code
https://github.com/wasteam/waslibs/tree/master/src/AppStudio.Uwp/Controls/ErrorNotificationControl

###ActionsCommandBar Control The ActionsCommandBar control extends the system Windows.UI.Xaml.Controls.CommandBar allowing to dynamically load the AppBarButtons through binding the control to a List of ActionInfo items created from C#. The control can define the AppBarButtons in XAML as well.

View code
https://github.com/wasteam/waslibs/tree/master/src/AppStudio.Uwp/Actions

###Animation Extensions The Animation Extensions are a set of extension Methods on the FrameworkElement control which allows to execute animations from C# code. The animations can be invoked asynchronously.

View code https://github.com/wasteam/waslibs/tree/master/src/AppStudio.Uwp/Extensions

###Converters Converters allow you to transform a certain value from a data type in other different value. Using Converters leads to have a cleaner XAML code. In the samples shown, the first converter is used to change the Visibility of an image based in the value a Toggle control. If the Toggle is True (Boolean value), the converter returns 'Visible' for the Visibility property of the image control. When the Toggle is False, it returns 'Collapsed' for the Visibility property.

View code https://github.com/wasteam/waslibs/tree/master/src/AppStudio.Uwp/Converters

#Data Providers Library This library contains the implementation of all the data sources available in Windows App Studio apps.

This is a Portable Class Library that can be used in:

  • Windows 10
  • Windows 8.1
  • Windows Phone 8.1

Among the Data Provider classes implemented in Windows App Studio, those which access third party data, help handling the complexity of each particular provider (API calls, authentication and authorization requirements, data parsing, etc.) so provides a smooth and uniform way to access the content from these providers. All Data Providers take advantage of the AppCache service to improve the App performance.

##Facebook Data Provider The FacebookDataProvider allow to retrieve Facebook data through its API. You have to be registered in Facebook Apps to be able to interact with the Facebook API and you must obtain an AppId and AppSecret to configure the data access. Finally, you must use the Page ID from what you want to get the information.

Further info
https://developers.facebook.com/apps/
https://developers.facebook.com/docs/graph-api/using-graph-api

View Code
https://github.com/wasteam/waslibs/tree/master/src/AppStudio.DataProviders/Facebook

##Twitter Data Provider The TwitterDataProvider retrieve data using the Twitter API. To be able to request Twitter data, the user must be registered in Twitter Apps and obtain a ConsumerSecret, an AccessToken and an AccessTokenSecret. This Data Provider can retrieve the user TimeLine or gather data by Twitter User Name or Hashtag. Further info
https://apps.twitter.com/
https://dev.twitter.com/rest/public

View Code
https://github.com/wasteam/waslibs/tree/master/src/AppStudio.DataProviders/Twitter

##Flickr Data Provider The FlickrDataProvider gets images using the Flickr API. You can retrieve content based on tags or you can access the images from a Flickr account by using the UserID. To resolve which UserID is assigned to a certain Flickr account use http://idgettr.com/

Further info
https://www.flickr.com/services/feeds/
http://idgettr.com/

View code
https://github.com/wasteam/waslibs/tree/master/src/AppStudio.DataProviders/Flickr

##YouTube Data Provider The YouTube Data Provider retrieve data through the YouTube API by using the YouTube ChannelID, the PlaylistID, or a search term. To be able to request data using this provider, you must be registered for Google Developers Console and get an API Key.

Further info
https://console.developers.google.com/project https://dev.twitter.com/rest/public

View code
https://github.com/wasteam/waslibs/tree/master/src/AppStudio.DataProviders/YouTube

##WordPress Data Provider The WordPress Data Provider retrieve data from the Word Press blog configured in the property WordPressQuery. You can configure the search in the Data Provider by using one of the following options: Posts, Categories or Tags. The information is read in JSON format and transformed to the WordPressSchema entity. This Data Provider relies on the REST API to access the source content. If the target blog is self-hosted (not in Wordpress.com) it must have the JetPack plug-in installed and the JSON API enabled.

View code
https://github.com/wasteam/waslibs/tree/master/src/AppStudio.DataProviders/WordPress

##Rss Data Provider The RssDataProvider retrieve information from the configured RSS Url, the data is read form the source in XML format and transformed to a RssSchema entity.

View code
https://github.com/wasteam/waslibs/tree/master/src/AppStudio.DataProviders/Rss

##Bing Data Provider The Bing DataProvider allows you to retreive Microsoft Bing web search engine results direct to your App.

View code
https://github.com/wasteam/waslibs/tree/master/src/AppStudio.DataProviders/Bing

##LocalStorage Data Provider This Data Provider access data from the LocalStorage. You can configure which file will be used as content source. The information, stored in JSON format, is transformed to the specified data type.

View code
https://github.com/wasteam/waslibs/tree/master/src/AppStudio.DataProviders/LocalStorage

Common

This library contains utility classes to create XAML applications. This is a Portable Class Library that can be used in:

  • Windows 10
  • Windows 8.1
  • Windows Phone 8.1