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 8507095
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T02:46:20+00:00 2026-06-11T02:46:20+00:00

If you place the following code in the game loop (Update or Draw) of

  • 0

If you place the following code in the game loop (Update or Draw) of a MonoGame app (can just be the default project template):

new Windows.UI.Xaml.Media.Imaging.WriteableBitmap(150, 150);

It throws a cross-thread error…

The application called an interface that was marshalled for a different thread. (Exception from HRESULT: 0x8001010E (RPC_E_WRONG_THREAD))

So then I tried this:

var dispatcher = Windows.UI.Core.CoreWindow.GetForCurrentThread().Dispatcher;
dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, delegate
{
     new Windows.UI.Xaml.Media.Imaging.WriteableBitmap(150, 150);
});

Same error.

Looking under the covers, it doesn’t look like MonoGame runs the game loop on a background thread or anything. It uses a synchronous loop.

Any ideas of a way to use WriteableBitmap in MonoGame? (I need to use it to render out some live tiles)

  • 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-11T02:46:21+00:00Added an answer on June 11, 2026 at 2:46 am

    If you’re using the Game class then your creating an application that by default does not support XAML.

    Currently the best way to support XAML in a MonoGame app is to use the Siverlight-style XNA game as outlined in this thread…

    http://monogame.codeplex.com/discussions/359544

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

Sidebar

Related Questions

So, I'm finishing up an iPhone App. I have the following code in place
In my controller I am running the following code: @place = Place.new :latitude =>
Im using the following code to place an object inside a container: testParent =
Whenever I place the following code on the first frame of my movie, it
The following code snippetcode has some issue, I don't know where to place it.
I have the following code in place: NSString *mapIDx = @98; NSLog(@map id: %@,
I am using the following code to place an image inside an imagebox in
Following the tutorial Zed A. Shaw , I'm writing a soccer game. My code
Consider the following code, which takes place in a background thread (thread B): List<T>
I used the following code to place a div at the bottom: <div style

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.