Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9182665
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T18:36:49+00:00 2026-06-17T18:36:49+00:00

I am trying to schedule several messages for update on the tile but the

  • 0

I am trying to schedule several messages for update on the tile but the 4th line on the second method tileTextAttributes[0].InnerText = Message; keeps throwing exceptions saying incorrect parameters. Can you help me solve the problem?

private void SetupTiles()
{
    try
    {
        DateTimeOffset time = DateTime.Now;

        for (int i = 0; i < messages.Count; i++)
        {
            Windows.UI.Notifications.ScheduledTileNotification stf = new ScheduledTileNotification(GetTile(messages[i]), time);
            time.Add(new TimeSpan(0, 0, 0, 30, 0));
            TileUpdateManager.CreateTileUpdaterForApplication().AddToSchedule(stf);
        }
    }
    catch (Exception ex)
    {
        new Windows.UI.Popups.MessageDialog(ex.Message).ShowAsync();
    }
}

XmlDocument  GetTile(string Message)
{
    XmlDocument tileXml = TileUpdateManager.GetTemplateContent(TileTemplateType.TileWideText05);
   string t = tileXml.ToString();

    XmlNodeList tileTextAttributes = tileXml.GetElementsByTagName("text");
    tileTextAttributes[0].InnerText = Message;

    XmlDocument squareTileXml = TileUpdateManager.GetTemplateContent(TileTemplateType.TileSquareText04);

    XmlNodeList squareTileTextAttributes = squareTileXml.GetElementsByTagName("text");
    squareTileTextAttributes[0].AppendChild(squareTileXml.CreateTextNode(Message));

    IXmlNode node = tileXml.ImportNode(squareTileXml.GetElementsByTagName("binding").Item(0), true);
    tileXml.GetElementsByTagName("visual").Item(0).AppendChild(node);

    return tileXml;
}

Edit

System.ArgumentException: The parameter is incorrect.

at
Windows.UI.Notifications.ScheduledTileNotification..ctor(XmlDocument
content, DateTimeOffset deliveryTime)
at
TestProj.MainPage.SetupTiles() in c:\Users\ddds\Documents\Visual
Studio 2012\Projects\TestProj\TestProj\MainPage.xaml.cs:line 398

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T18:36:50+00:00Added an answer on June 17, 2026 at 6:36 pm

    The XML seems fine to me, but you’re scheduling the notification for a moment that has just passed. Add the time offset BEFORE the constructor.

    EDIT
    Looks like it’s a bit more subtle than that, I think perhaps because how the various time functions work vis-à-vis UTC. For example,

    DateTimeOffset time = DateTime.Now.AddMinutes(3);
    

    is ok, but not:

    DateTimeOffset time = DateTime.Now;
    time = time.Add(new TimeSpan(0, 0, 3, 0, 0));
    

    I have some info in my blog post on Scheduled Notifications that might help.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm just trying to schedule an update method once in ccTouchesMoved, but when I
I am trying to schedule a task to update a TextView once a second.
I am trying to build a repeating daily schedule in Quartz.Net but having a
I am trying to use a p:schedule , but the column headers are showing
I am trying to use the schedule backup mechanism from GAE but keep getting
I'm trying to use quartz_jobs.xml to schedule all my jobs, but the following XML
I'm trying to schedule a job in oracle 10g but it says: ORA-01846: not
I am trying to schedule my R script using cron, but it is not
I'm trying to schedule a repeating event to run every minute in Python 3.
I am trying to schedule wall posts to be added to the Facebook business

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.