Windows 8 Store Apps Learning (36) Notice: Tile detailed

Source: Internet
Author: User
Tags xmlns

Introduced

Re-imagine the Windows 8 Store Apps Notice

Tile-Basic applications See http://www.cnblogs.com/webabcd/archive/2013/06/17/3139740.html

Tile-All Tile templates

Tile-Loops display multiple tilenotification on a Tile

Tile-an app with multiple Tile

Tile-Tile notifications are updated as scheduled, polling the service side to update Tile notifications

Example

1, display Tile all 46 kinds of templates

Notification/tile/alltemplates.xaml

<page x:class= "XamlDemo.Notification.Tile.AllTemplates" xmlns= "http://schemas.microsoft.com/winfx/2006/xaml/p Resentation "xmlns:x=" Http://schemas.microsoft.com/winfx/2006/xaml "xmlns:local=" using: XamlDemo.Notification.Tile "xmlns:d=" http://schemas.microsoft.com/expression/blend/2008 "xmlns:mc=" http:// schemas.openxmlformats.org/markup-compatibility/2006 "mc:ignorable=" D "> <grid background=" Transparent "&
        Gt <Grid.Resources> <style x:key= "Itemtitlestyle" targettype= "TextBlock" > <setter Property= "FontSize" value= "14.667"/> </Style> <itemspaneltemplate x:k ey= "Storefrontgriditemspaneltemplate" > <wrapgrid maximumrowsorcolumns= "3" verticalchildrenalignment= "Top" horizontalchildrenalignment= "left"/> </ItemsPanelTemplate> <style x:key= "St Orefronttilestyle "targettype=" Gridviewitem ";
                <setter property= "FontFamily" value= "Segoe UI"/> <setter property= "Height" value= "/>"
                <setter property= "Width" value= "/> <setter property=" Padding "value=" "0"/> <setter property= "Margin" value= "0"/> <setter property= "Horizontalcontentalignmen" T "value=" left "/> <setter property=" verticalcontentalignment "value=" Top "/> ;
            Setter property= "borderthickness" value= "0"/> <setter property= "tabnavigation" value= "local"/> </Style> <datatemplate x:key= "Storefronttiletemplate" > <grid Ho
                        Rizontalalignment= "left" background= "Transparent" > <stackpanel orientation= "Vertical" > <textblock textwrapping= "Wrap" verticalalignment= "Center" text= "{Binding FileName}" Horizontalalignme Nt= "LEFT "/> <image source=" {Binding Path} "stretch=" None "verticalalignment=" Center "Horizontala Lignment= "left" margin= "0,10,0,0"/> </StackPanel> </Grid> & Lt;/datatemplate> </Grid.Resources> <!--display 46 different Tile templates--> <grid View x:name= "GridView" margin= "0 0 0" itemtemplate= "{StaticResource storefronttiletemplate}" I Temcontainerstyle= ' {StaticResource Storefronttilestyle} ' itemspanel= ' {StaticResource StoreFrontGridItemsPanelT Emplate} "borderbrush=" Lightgray verticalalignment= "Top" scrollviewer.verticalscrollbarvisibility = "Auto" scrollviewer.horizontalscrollbarvisibility= "Auto" selectionmode= "None"/> </grid > </Page>

Notification/tile/alltemplates.xaml.cs

* * Displays all 46 templates for Tile/using System;
Using System.Linq;
Using Windows.applicationmodel;
Using Windows.UI.Xaml.Controls;
    
Using Windows.UI.Xaml.Navigation; Namespace XamlDemo.Notification.Tile {public sealed partial class Alltemplates:page {public Alltemplat Es () {this.
        InitializeComponent (); } protected async override void Onnavigatedto (NavigationEventArgs e) {//Xamldemo/notifi The 46 images in the Cation/tile/templatedemo folder are used to demonstrate the 46 templates for Tile var folder = await Package.Current.InstalledLoca tion.
            Getfolderasync (@ "Notification\tile\templatedemo"); var files = await folder.
    
            Getfilesasync ();
                                 var dataSource = from P in files select new { FileName = p.displayname, Path = "Ms-appx:///notification/tile/templatedem
                o/"+ p.name             };
        Gridview.itemssource = DataSource; }
    }
}

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.