예제 #1
0
        private void zmienlivetitle(object sender, RoutedEventArgs e)
        {
            var template = TileContentFactory.CreateTileSquare150x150PeekImageAndText01();

            template.TextBody1.Text = "Wow ale super";
            template.TextBody2.Text = "na";
            template.TextBody3.Text = "150x150";
            template.Image.Src      = "ms-appx:///Assets/aaa.scale-400.png";

            var wideTemlate = TileContentFactory.CreateTileWide310x150PeekImageAndText01();

            wideTemlate.TextBodyWrap.Text    = "WoW WoW 310x150";
            wideTemlate.Image.Src            = "ms-appx:///Assets/aaa.scale-400.png";
            wideTemlate.Square150x150Content = template;

            TileNotification wideNotification = wideTemlate.CreateNotification();
            TileUpdater      updater          = TileUpdateManager.CreateTileUpdaterForApplication();

            updater.Update(wideNotification);
        }
예제 #2
0
        public MainPage()
        {
            this.InitializeComponent();

            ApplicationView.PreferredLaunchViewSize      = new Size(770, 550);
            ApplicationView.PreferredLaunchWindowingMode = ApplicationViewWindowingMode.PreferredLaunchViewSize;


            //notification
            IToastImageAndText02 weather_notifications = ToastContentFactory.CreateToastImageAndText02();

            weather_notifications.TextHeading.Text  = "Aplikacja pogodowa załadowana poprawnie";
            weather_notifications.TextBodyWrap.Text = "WeatherApp";
            ScheduledToastNotification giveittime;

            giveittime    = new ScheduledToastNotification(weather_notifications.GetXml(), DateTime.Now.AddSeconds(2));
            giveittime.Id = "Any_ID";
            ToastNotificationManager.CreateToastNotifier().AddToSchedule(giveittime);


            //live tiles
            var template = TileContentFactory.CreateTileSquare150x150PeekImageAndText01();

            template.TextBody1.Text = "Aplikacja pogodowa";
            template.Image.Src      = "ms-appx:///Assets/pogoda.png";

            var wideTemlate = TileContentFactory.CreateTileWide310x150PeekImageAndText01();

            wideTemlate.TextBodyWrap.Text    = "Aplikacja pogodowa - szerszy tile";
            wideTemlate.Image.Src            = "ms-appx:///Assets/pogoda.png";
            wideTemlate.Square150x150Content = template;

            TileNotification wideNotification = wideTemlate.CreateNotification();
            TileUpdater      updater          = TileUpdateManager.CreateTileUpdaterForApplication();

            updater.Update(wideNotification);
        }