So, first I have read a ton of threads on this particular problem and I still do not understand how to fix it. Basically, I am trying to communicate with a websocket and store the message received in an observable collection that is bound to a listview. I know that [...] read more
Since the Windows 8 consumer preview was released a few days ago, I am working on the new WinRT (for Metro Applications) in C# and I had ported my self written IRC class to the new threading and networking. The problem is: My class is running an thread for receiving [...] read more
I have a C# UWP app that contains a function I want to call every 5 seconds. The function runs fine when called from a button, and the Timer write to the debug console fine every 5 seconds....When I call the function from the Timer, all heck breaks loose. I [...] read more
I am working on a Windows 8 application using c#/XAML. Everything has been working except for this event handler where I get the following error on this line. await RefreshUserInfoAsync(); The application called an interface that was marshalled for a different thread. (Exception from HRESULT: 0x8001010E (RPC_E_WRONG_THREAD)) This Observable Collection [...] read more
I am trying to get the heart rate from a Microsoft Band. It should be updating whenever the value changes. I am then trying to display that value in a TextBlock. I first create an instance of IBandClient, and set its HeartRate.ReadingChanged method like this: bandClient.SensorManager.HeartRate.ReadingChanged += HeartRate_ReadingChanged; Then I [...] read more
I need to use InkCanvas (which is part of UWP Windows.UI.Xaml.Controls) in a WPF application. I know the WPF has InkCanvas too but they are totally different. The UWP InkCanvas has also InkAnalyzer which I need for handwriting recognition. I created a fresh WPF app and added references bellow: * [...] read more
I am writing a Windows 8 Store App with Live Tiles. Every live tile is an image that needs to be refreshed every x minutes. I am using a Background Task with a time trigger to generate my image and refresh the tile. Generating my image implies creating a new [...] read more
I am really pulling my hair out at this one. I have literally no idea why I am having these issues. Right, I have 3 SSIS packages. One for development, one for user acceptance testing and one for a live release. Each package is pretty much an exact copy of [...] read more
I have 3 SSIS packages. Two out of the 3 SSIS packages work perfectly, the third. Which is a copy of the 2nd one, except changing connection strings keeps throwing the problem: Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.SqlServer.Dts.Pipeline.Wrapper.IDTSObject100'. This operation failed because the QueryInterface [...] read more
I'm trying to create an instance of BitmapImage in a method called IsImageValid. When doing so, I get this exception: > the application called an interface that was marshalled for a different > thread. (exception from hresult: 0x8001010e (rpc_e_wrong_thread)) This is my code: public bool isImageValid(string imagePath) { try { [...] read more
I have a UWP application that receives a dynamic updates via SignalR. I'm using Template10 and the SignalR listener is located in the ViewModel class. When messages are received by SignalR - the Model is updated. The block of code that updates the model is wrapped in Despatcher method: VM [...] read more
I'm trying to do some ocr with windows phone 8.1 using this: https://blogs.windows.com/buildingapps/2014/09/18/microsoft-ocr-library-for-windows-runtime/ private async void camera_PhotoConfirmationCaptured(MediaCapture sender, PhotoConfirmationCapturedEventArgs e) { try { WriteableBitmap bitmap = new WriteableBitmap((int)e.Frame.Width, (int)e.Frame.Height); //crash here await bitmap.SetSourceAsync(e.Frame); OcrResult result = await ocr.RecognizeAsync(e.Frame.Height, e.Frame.Width, bitmap.PixelBuffer.ToArray()); foreach (var line in result.Lines) { } } catch(Exception ex) [...] read more
So, basically, one of my feature ideas would need a secondary window (if you open Windows Mail and then click on "Open in a new Window, you can see what I mean). For that you have two choices: ProjectionView (which is intended for non-interactive displays) and a completely new View. [...] read more
I am loading some data via WCF on the loading of a given page. I then want to populate a Picker with the values once the data has loaded. However, I'm getting a cross threading problem. Here is the code: protected async override void OnAppearing() { base.OnAppearing(); await Task.Factory.StartNew(async () [...] read more
After making the project simpler, I believe I identified the problem is actually a result the async marshalling. UPDATE: I made the code simpler to try to figure out what was going on. So here is an update... The Observable collection is being populated on a new thread (async method). [...] read more
I've been working project in Raspberry Pi 2 running Windows 10 IoT Core. Project subject sensor triggering with open a video. But I am getting the following error: > An exception of type 'System.Exception' occurred in ProjeVol1.exe but was not > handled in user code > > Additional information: The [...] read more
I'm developing a Universal Windows Platform app using XAML that runs on a Raspberry Pi under Windows 10 IoT Core. The app drives a temperature sensor that's on the I2C bus. The sensor class is MLX90614Thermometer. The sensor uses a DispatcherTimer to take readings every 100 milliseconds (approx) and updates [...] read more
I have a problem with the CDB debugger. In particular if I try to use the predefined kit MinGW, all the debugging functionalities work correctly, whereas if I try to use the Visual Studio Kit, Qt Creator generates some issue. Note that I'm using the Visual Studio Express 2012 version [...] read more
I want to create a background task in windows phone 8.1 and I want to use a timer task in order to count down a specific time. Therefore, I try using DispatcherTimer class to do this. However, it shows up an error when I try to create it: DispatcherTimer timer [...] read more
I am creating a Windows 8.1 Phone App. The UI has a button and a TextBox (called txtStatus) Basically, when I click a button in the UI, the following code kicks off (only some of it is shown): private async void btnStart_Click(object sender, RoutedEventArgs e) { try { // Get [...] read more
I am writing a Windows Phone 8.1 App (WINRT). I am showing a StatusBar: 1. MYAPP (WELCOME) 2. MYAPP (CONNECTED VIA WIFI) 3. MYAPP (CONNECTED VIA CELLULAR) If user is connected via Wifi, it shows "MYAPP (CONNECTED VIA WIFI)" and if user is connected via cellular, it shows "MYAPP (CONNECTED [...] read more
I'm using Microsoft.Office.Interop.PowerPoint in my app to control presentation SlideShow. I can connect to PowerPoint using code PowerPointApp = Marshal.GetActiveObject("PowerPoint.Application") as Microsoft.Office.Interop.PowerPoint.Application; and all works ok, but I can't release refereces (after SlideShow ends and PowerPoint was CLOSED) using Marshal.FinalReleaseComObject(PowerPointApp); This call still throws an exception: A first chance exception [...] read more
I'm trying to generate my own custom tile from xaml. I've converted some code from C++ to C# in order to integrate it into my app. Basically I've got this method: async Task GenerateHighResTileImage(string inputMarkupFilename, string outputImageFilename, Size size) { StorageFolder assetsFolder = await Package.Current.InstalledLocation.GetFolderAsync("Assets"); StorageFile markupStorageFile = await assetsFolder.GetFileAsync(inputMarkupFilename); [...] read more
I have a MediaPlayerElement and the following class to control it: class MediaPlayer : INotifyPropertyChanged { private MediaPlaybackState _State; public MediaPlaybackState State { get { return _State; } set { _State = value; OnPropertyChanged(); } } public BitmapImage AlbumArt; public string Title; public string Subtitle; private MediaPlayerElement mediaPlayer; public event [...] read more
i am using Uno prism template for my Uno platform App. After making an async call in UWP app. i.e. var content = await GetHttpContentWithTokenAsync(graphAPIEndpoint,authResult.AccessToken).ConfigureAwait(false); whenever RaisePropertyChanged() method hits I am getting following error=> {"The application called an interface that was marshalled for a different thread. (Exception from HRESULT: 0x8001010E [...] read more
whenever i opend my ssis package giving error message Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.SqlServer.Dts.Pipeline.Wrapper.IDTSObject100'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{30E5D0EF-E33D-4945-8A7F-F5178FC64C24}' failed due to the following error: The application called an interface that [...] read more
I'm building an small App that gather data from website. and I managed to gather data. Following picture depicts what my app does. enter image description here [https://i.stack.imgur.com/EJSHU.png] when I click the button "시작", my App get html of the specific page, and get data from it. This works are [...] read more
On my SSIS project I keep getting a COM error when I open the project, and then everything runs incredibly slow. The message says this: > Uable to case COM object of type 'System.__ComObject' to interface type > 'Microsoft.sqlServer.Dts.Pipeline.Wrapper.IDTSObject100' This operation failed > because the QueryInterface call on the COM [...] read more
I'm trying to use RenderTargetBitmap to get a screenshot of a Windows Hosted Web App (HWA) window, but I can't seem to instantiate it when handling a request from the Javascript web app running on the HWA app: public async Task<IBuffer> CaptureScreenshotToFileAsync(uint thumbnailWidth, uint thumbnailHeight, string fileName) { // Throws [...] read more
I'm using MVVM-Light with Windows Template Studio. My app works fine but when i open a view/viewmodel in a separate windows using WTS's WindowManagerService it gives me this error: > "System.Exception: 'The application called an interface that was marshalled > for a different thread. (Exception from HRESULT: 0x8001010E > (RPC_E_WRONG_THREAD))'" [...] read more
I am new to this. I am trying to do a Audio Message Player on Rasp Pi 3 with Win IoT core. I manage to play audio file from my USB thumbdrive but I need to know when the audio file has completed playing. mediaPlayer = new MediaPlayer(); mediaPlayer.MediaEnded += [...] read more
My Windows Runtime Application reads a NDEF NFC-Tag. When the App reads the NFC-Tag correct my method message receivedwill open. private void messageReceived(ProximityDevice sender, ProximityMessage message) { device.StopSubscribingForMessage(NFCID); var ndefMessage = NdefMessage.FromByteArray(message.Data.ToArray()); StringBuilder sb = new StringBuilder(); foreach (NdefRecord record in ndefMessage) sb.AppendLine(Encoding.UTF8.GetString(record.Payload, 0, record.Payload.Length)); String data= sb.ToString(); ShowData(data); } [...] read more
This is my first question here. As English is not my first language, forgive me for any mistakes. I'm trying to develop an application for Windows Phone 8.1 (XAML and C#) and I'm using .NET Framework 4.5.2. I just started studying multithreading in C# and would appreciate if anyone here [...] read more
This error probably has been seen so many times and was avoided with some changes in code to run the specific code on UI Thread rather than worker thread. But in my situation the things are different. Problem: In my app, I was not able to implement Incremental Loading because [...] read more
I have a running uwp app. Now I want to run it in win 10 kiosk mode to avoid that the users can close the app. My app structure is like followes: SplashScreen (LoadingScreen) where I start a awaited task to load all the data form network (approx. 5 min [...] read more
I have Visual Studio 2010, 2012, 2013 installed. I also have the VS2015 SSDT Preview installed. I'm editing some existing SSIS Packages that have Teradata as a source. The properties are set in the connection manager. I have the following Teradata drivers installed: * .NET Data Provider for Teradata 14.11.0.3 [...] read more
I am trying to make a program that, at the same time, displays text that the user inputted and writes to a text file of that same user input data. I've tried wrapping the the code with Task.Run: private void button_Click(object sender, RoutedEventArgs e) { show.Text = inputText.Text; //Debug.WriteLine(check1_cont.ToString()); //Debug.WriteLine(check2_cont.ToString()); [...] read more
I have a Problem with my timer in C#. The Problem is following: > The application called an interface that was marshalled for a different > thread. (Exception from HRESULT: 0x8001010E (RPC_E_WRONG_THREAD)) Can you help me and solve this? I have no plan. Thank you. Here is my Code: using [...] read more
I am using php 5.0 and IIS 5. When i am trying to access my application i get 2 erros like PHP has encountered an Access Violation at 011173CD and HTTP/1.1 500 Server Error Server: Microsoft-IIS/5.1 Date: Thu, 15 Sep 2011 10:26:36 GMT Content-Type: text/html Content-Length: 44 -2147417842 (0x8001010e) I [...] read more
I have an issue where my UWP User Controls cause an exception in (XAML) design mode because the thread is marshalled to the wrong thread? What I have is several controls that use the same Brush and it makes sense that they all use reference value rather than creating many [...] read more
I have a WebView in a Page that is used in a NavigationView. When I swicth to the corresponding tab the following exception is thrown: Exception thrown at 0x75234662 (KernelBase.dll) in MyApp.exe: WinRT originate error - 0x8001010E : 'DispatcherQueueController is already created on this thread.'. I determined it was the [...] read more
I need to make a Xaml UI element in a .cpp file my C++/WinRT project (in also Win32 Desktop and WinUI3, not UWP), but I'm having a threading error. WinRT originate error - 0x8001010E : 'The application called an interface that was marshalled for a different thread.' I think one [...] read more
i get always on Xamarin with UWP the following Error: The application called an interface that was marshalled for a different thread. (Exception from HRESULT: 0x8001010E (RPC_E_WRONG_THREAD)) I want to use: Xamarin.Forms.BindingBase.EnableCollectionSynchronization(MyList, null, ObservableCollectionCallback); I won't use: Xamarin.Forms.Device.BeginInvokeOnMainThread(() => MyList.Add(DateTime.Now.ToLongTimeString())); I have my reasons. Here is the very simple c# [...] read more
So I have a program that Calls an API once the user has entered a search term Like so: LoadTVShows load = new LoadTVShows(); private async void searchShow(object sender, EventArgs e) { searchString = searchBox.Text; try { var getTvShow = await load.GetAPI(searchString).ConfigureAwait(false); } catch { } showName.Text = load.name; showSummary.Text [...] read more
Please help me understand how to properly await long executing tasks to keep the UI responsive in a Universal Windows application. In the code below OperateSystem is a model class which inherits ObservableObject. OperateSystem.GetLatestDataFromAllDevices connects to a variety of instruments, collects data, and updates class properties with the information from [...] read more
When trying to add data to an ObservableCollection, which is x:Binded in XAML to a ListView on the UI, I get this error:The application called an interface that was marshalled for a different thread (Exception from HRESULT: 0x8001010E (RPC_E_WRONG_THREAD)) My app implements MVVM. VieModel pulls data with an eventhandler. I [...] read more
Aim: Get content from the clipboard using C++/WinRT APIs. Problem: Since I'm just testing this API, I tried to code a simple console app with the blocking get() method on Clipboard's async text getter. However, I'm getting the "The application called an interface that was marshalled for a different thread" [...] read more
I'm making an application that updates a UI element after a press on a button connected to the GPIO pins. it's my first time working with windows iot core. I thought it would be as easy as this "lblQuestion.Text = "Button works!";" but it isn't. can anyone tell me what [...] read more
I am using a BackgroundWorker to monitor if a bit has flipped on an external device every couple of seconds. I then want it to call a function that is to be run on the main UI thread, but is instead being run on the same thread as the BackgroundWorker. [...] read more
I'm working on UWP Application which downloads images from the server asynchronously, Image downloading part works perfect and I am able to display thumbnails of the downloading image groups. My Problem is showing a progress bar as I download these images. I know you need to use Dispatcher in order [...] read more
I am creating an application that uses two threads, one for the whole UI and the other for the background task that retrieves the data received by the serial link. When launching my application, an extended splash screen is displayed, to unlock it and go to the main page, the [...] read more
I'm developing a UWP application with two window pages on two separate screens. It's include: * Mainpage.xaml * Mainpage.xaml.cs * Page2.xaml * Page2.xaml.cs My scenario: 1. get the mouse position(X) while moving on the secondary screen (Page2). 2. write it in the text block on the first screen (MainPage), Changing [...] read more
if interface need a picture it saves request in ConcurrentDictionary<key, Delegate> and when picture is on the disk read it and SavedDelegate?.Invoke(key, byte[]). But there is an error in this place: private async void OnDelegateInvokeAsync(ImageItem item, byte[] body) { ... item.Image = new BitmapImage(); ... } > System.Exception: Calling Async [...] read more
I'm developing another sample where Messaging Center send status messages not coupled from device code to my view models. At this point I used: * A alert message; * Label in my view; * A method by dependency injection from native code(interfaced and created before). To notice the events before [...] read more
I have a windows 10 UWP app and hockey app SDK integrated in it. I am unable to find the exact reason why app is crashing. I am providing the Hockey app crash log, please help me to fix the issue. This is happening after installing and opening the app [...] read more
I would like to have both a UWP xaml application (called my_xaml_app) and a UWP Core application (called my_core_app) running in the same program in their own respective thread. So far I have tried the following approach: my_core_app::my_core_app() { ViewProviderFactory viewProviderFactory; winrt::Windows::ApplicationModel::Core::CoreApplication::Run(viewProviderFactory); } winrt::Windows::Foundation::IAsyncAction init_core_app() { co_await winrt::resume_background(); my_core_app coreApp; [...] read more
I am very new to C# and Azure IoT. Perhaps the problem I have is very simple to solve. I would like to update the an UI Element by invoking a method from the cloud. But I am getting the following Error: > The application called an interface that was [...] read more
I have a UWP application, I want to use the method in MainPage.xaml.cs in App.xaml.cs, for some reason, the method in MainPage.xaml.cs can't be declared to be static, so I instantiate the MainPage class in App.xaml.cs, but throw the following exception: > The application invokes an interface that has been [...] read more
I have the following problem. I am using a simple Windows Runtime Component to communicate between the application and a WebView. I am doing this according to documentation This is the code for the Windows Runtime Component public delegate void NotifyAppHandler( string str ); [AllowForWeb] public sealed class WebViewInjectionObject { [...] read more
I've some hard time trying to display images in my UWP App. My images are located in the Images library. The question is: How to show jpg in the Image Xaml control on a UWP, that is not in the projects "Assets"? So far using Binding, I’ve * Try to [...] read more
I'm creating a DelayedTextbox. I did this by extending the TextBox and adding dependency properties (thanks to help on another question) So I have a cs file that looks like this: public class DelayedTextBox : TextBox { public int Delay { get { return (int)GetValue(DelayProperty); } set { SetValue(DelayProperty, value); [...] read more
I'm trying to make a simple speech controlled app, that is activated like cortana. When I speak something specific like "banana" I want the app to listen for commands. Here is my code: public async Task SetupRecognizer() { var WebGrammar = new SpeechRecognitionTopicConstraint(SpeechRecognitionScenario.WebSearch, "webSearch"); Recognizer.Timeouts.InitialSilenceTimeout = TimeSpan.FromSeconds(6.0); Recognizer.Timeouts.BabbleTimeout = TimeSpan.FromSeconds(4.0); [...] read more
Thanks in advance. as I know, The first view that’s created when your app starts is called the main view, and Other views, including all views that you create by calling CreateNewView in your app code, are secondary views. I also know, I can't update UI in thread if they [...] read more
I have a ConnectButton binded to a Command. In his Command Im calling the DevicePicker and set the DeviceSelected Event to a method. private void connectButtonCommand() { DevicePicker myDevicePicker = new DevicePicker(); myDevicePicker.Show(new Rect(10, 10, 200, 200)); //myDevicePicker.Filter.SupportedDeviceSelectors.Add(BluetoothDevice.GetDeviceSelectorFromPairingState(false)); myDevicePicker.Filter.SupportedDeviceSelectors.Add(BluetoothDevice.GetDeviceSelectorFromPairingState(true)); myDevicePicker.DeviceSelected += MyDevicePicker_DeviceSelected; } and the Method private async void MyDevicePicker_DeviceSelected(DevicePicker [...] read more
SSIS pakage throw an errror "**[SSIS.Pipeline] Error: Script Component failed the post-execute phase and returned error code 0x80004002. **" In Script component its shows task run successfully but Control flow task shows Error. Control flow task [https://i.stack.imgur.com/GH197.png] Data flow Task [https://i.stack.imgur.com/4UmGD.png] Here is my Script task Code: public override void [...] read more
I am programming for UWP with C# language. I am reading about background task and create and register an in-process background task. The registration code of background Task: public static async Task RegisterBackgroundTask() { // // Check for existing registrations of this background task. // foreach (var cur in BackgroundTaskRegistration.AllTasks.Values) [...] read more
So as i'm learning more and more stuff of UWP and XAML i bumped into two issues, one is (i think) "navigation" related and the second a threading issue. What i'm trying to achieve is simple. I have two pages, one "home" and one "Settings". On the Home page i [...] read more
(Windows 10, UWP, C#, XAML) I'm trying to change a rectangle's Fill from a class that is not the main method. I've sent my rectangle to the other class and from there I can set it's Fill. However, I need the Fill to change during an ongoing asynchronous method (rather, [...] read more
I am trying to set a ViewModel List property from an async method, but this ends with the following error: > {"The application called an interface that was marshalled for a different > thread. (Exception from HRESULT: 0x8001010E (RPC_E_WRONG_THREAD))"} The error is pretty clear. What is not clear to me [...] read more
I'm having a hard time with some code I have that apparently struggles when called from the second window created by the ShareTarget contract (when you share something to the app, it opens in a small standalone window). This is my code so far: // Blur and resize the image [...] read more
i try to develop a equivalent to a android app (just for fun / 2 learn) and i try to add round about 3500 UserControls to my GUI in a StackPanel. One UserControl contain 2 textblocks (titel and subtitle), two buttons and one image. If i add the controls in [...] read more
I'm developing an application with windows-10-t platform on raspberry-pi3. The application has several pages and listens GPIO ports asyncrhonously in the background. It collects data from GPIO and sends to the WCF-Service, after a bit the UI should be updated by the data coming from the WCFService. I've also tried [...] read more
I'm trying to use MVVM for a Universal Windows project but the interfaces for Storage File complains a lot about using async. The following code sometimes works: public object Convert(object value, Type targetType, object parameter, string language) { var storageFile = value as StorageFile; return GetImageAsync(storageFile).Result; } private static async [...] read more
i am devloping a qrcode scanner custom app for windows phone 8.1. i am using the Nokia Imaging SDK to render the back camera so as to preview the QRCode image, after decoding, i cant display a message dialog. it throws the following exception: > The application called an interface [...] read more
I have the following sceanrio: void Method_A() { Method_B(); } void Method_B() { Method_C(); } Now I do this: Thread myThread = new Thread(Method_A); myThread.Start(); and I get the following exception: > This operation failed because the QueryInterface call on the COM component for > the interface with IID '{9149349D-5A91-11CF-8700-00AA0060263B}' [...] read more
I'm creating a small universal windows application. I'd like to use MapControl to present some data downloaded from the Internet. This data refreshes every minute and I want to update MapIcons positions everytime that it happens. So... After loading a map, I create a Timer that runs every 60 seconds [...] read more
The application called an interface that was marshalled for a different thread. (Exception from HRESULT: 0x8001010E (RPC_E_WRONG_THREAD)) enter image description here [https://i.stack.imgur.com/EbD75.jpg] In one of my Views I instantiate an options view within it. Not sure if the options of should be an entirely separate object or not. When the [...] read more
I am trying to crop an image from a Run method from Windows 10 app (UWP) IBackgroundTask. To achive that I'm using the WriteableBitmapEx but at the moment that I try to instantiate a new object, I got the exception: > The application called an interface that was marshalled for [...] read more
I am trying to update listbox form ObservableCollection but don't know what am doing wrong that i always get the exception below. i am new to winRT. > The application called an interface that was marshalled for a different > thread. (Exception from HRESULT: 0x8001010E (RPC_E_WRONG_THREAD)) <ListBox x:Name="UserList" HorizontalContentAlignment="Stretch" Margin="12,41,12,12"> [...] read more
So I have come to a problem that I have never had before and I cant find any information about my specific problem. Basically when i start the program i have a panel that displays time and weather information. When i start it, the weather is refreshed as well as [...] read more
I have a c++ DLL that uses an IDispatch interface to invoke methods on a third party DLL. It works if I invoke those methods from the original thread but if a new thread is started (not the one CoCreateInstance was called on) to invoke the method after the it [...] read more
I want to bind listbox in windows phone app 8.1. I am using following code but It raise an error : > Additional information: The application called an interface that was > marshalled for a different thread. (Exception from HRESULT: 0x8001010E > (RPC_E_WRONG_THREAD)). I am using the following code private [...] read more
I need to get the CurrentState from a MediaElement several times. I've created a simple function that looks like this: private string getCurrentState(MediaElement m) { return m.CurrentState.ToString(); } But everytime this function is called I get this: > An exception of type 'System.Exception' occurred in MyProject but was not > [...] read more
I'm doing some cloud operations involving a BitmapImage in my code, and on the response (basically a none-UI thread for sure) I'm getting a "The application called an interface that was marshalled for a different thread. (Exception from HRESULT: 0x8001010E (RPC_E_WRONG_THREAD))" on - BitmapImage cImage = new BitmapImage(); AFAK this [...] read more
I used this method (from msdn) to extend splashscreen in my app but while navigating after showing extended splash screen it is throwing error. Error: The application called an interface that was marshalled for a different thread. (Exception from HRESULT: 0x8001010E (RPC_E_WRONG_THREAD)) Code: void DismissedEventHandler(SplashScreen sender, object e) { dismissed [...] read more
I have adopted the following example from MSDN for incrementally loading thumbnails in a list view in an WinRT App: https://code.msdn.microsoft.com/windowsapps/Data-Binding-7b1d67b5 I would like to remove the "await Task.Delay(10)" line below. When I do, I get a warning that the method lacks an await operator. protected async override Task<IList<object>> LoadMoreItemsOverrideAsync(System.Threading.CancellationToken [...] read more
I have an Office addin (Outlook if it makes a difference) created with VSTO. The addin creates a Windows Form at startup. My Form creates several threads. I'm looking for either concrete guidance or peoples' experiences with what safely works for the following situations: 1.) A thread created by the [...] read more
I have problem with failing RaisePropertyChanged in my application. It is called after receiving message from another class. This message is sent after await calling. var storedData = await localFolder.GetFileContentAsync("data.json").ConfigureAwait(false); if (!string.IsNullOrEmpty(storedData)) { snags = JsonConvert.DeserializeObject<Data>(storedData); messenger.Send(new ChangeDataCountMessage()); } Failing RaisePropertyChanged public Data DataProperty { get { return dataProperty; } [...] read more
I am working with a SettingsPane that holds settings, and I have all my problems solved - except for one thing I apparently have no control over. This is the relevant SettingsPane.xaml: <ComboBox Name="Themes" SelectionChanged="SettingSelectionChanged"> <ComboBoxItem Content="Theme 1" /> <ComboBoxItem Content="Theme 2" /> <ComboBoxItem Content="Theme 3" /> </ComboBox> This is [...] read more
I'm quite confused as at runtime I get this error: The application called an interface that was marshalled for a different thread. (0x8001010E (RPC_E_WRONG_THREAD))' I have a on object that has: <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> <TextBlock Grid.Column="0" FontFamily="Segoe MDL2 Assets" Foreground="{Binding ImageColor, Mode=OneWay}" Text="{Binding ImageSrc, [...] read more
On a Mainpage XAML I have a CommandBar that I use to display the application main buttons and a message area. It looks a bit like this: <CommandBar x:Name="topcmdbar" Grid.Column="0 " Grid.ColumnSpan="3" IsDynamicOverflowEnabled="False" ClosedDisplayMode="Compact" VerticalAlignment="Top" Opacity=".5" Background="Transparent" Visibility="Visible" > <CommandBar.Content> <Grid > <TextBlock x:Name="TopCmdBarContent" x:FieldModifier="public" HorizontalAlignment="Left" Margin="10,5,0,0" VerticalAlignment="Stretch"/> </Grid> </CommandBar.Content> [...] read more
I have a Windows 10 UWP application that I want to start intialising some classes asap, and only later need them to be complete. I am new to multithreaded programming so apologies for apparent stupidity of my approach. I started a task in the App constructor, assigning the task to [...] read more
I'm writing an application that uses a COM library. I have a class library that wraps the calls to the COM library and adds some more functionality. Eventually this will run as a Windows Service. For now I test it using a Winforms test harness. When the class library is [...] read more
today I've got a special problem. I have a Raspberry Pi running Win10IoT, with a pushbutton connected to GPIO6. In my App, there's an Ellipse, which should be painted red, when the button is pressed. It worked.. until today! I've added a MediaElement with a simple ComboBox to load some [...] read more
I am trying to update the band Me Tile image from a background task and i get the following error at WriteableBitmap: System.Exception: The application called an interface that was marshalled for a different thread. (Exception from HRESULT: 0x8001010E (RPC_E_WRONG_THREAD)) at Windows.UI.Xaml.Media.Imaging.WriteableBitmap..ctor(Int32 pixelWidth, Int32 pixelHeight) at BackgroundTaskCS.UpdateBandTask.<LoadImage>d__f.MoveNext() --- End of [...] read more
I used two Task.Run. In the first one everything works correctly, but in the second an exception is thrown: > Exception from HRESULT: 0x8001010E (RPC_E_WRONG_THREAD). I do not understand how to solve it. I would like to understand from the code that the Task.Run returns a TextHighlighter. What is the [...] read more
After PivotItem pivotItem = new PivotItem(); I'm getting Additional information: The application called an interface that was marshalled for a different thread. (Exception from HRESULT: 0x8001010E (RPC_E_WRONG_THREAD)). What should it be? I'm pretty confused of it. Code: foreach (Source source in sources) { PivotItem pivotItem = new PivotItem(); /* At [...] read more
I've got this function that receives a digital output pin address uscita as Integer and status high as boolean, and updates the pin-out and fills color red in a LED-like Ellipse on the UI. Private Function comandaUscita(ByVal uscita As Integer, ByVal high As Boolean) As Boolean If high Then Select [...] read more
I'm getting an error (Exception from HRESULT: 0x8001010E (RPC_E_WRONG_THREAD)). What should be the problem here, my senior dev said I need to set it to the UI Thread, here's my code: private bool CanPrintReceipt() { return _receipt != null && !IsBusy; } private async void PrintReceipt() { IsBusy = true; [...] read more