Completed
Last Updated: 30 Jan 2020 14:48 by ADMIN
Release 2.7.0
Boguslaw
Created on: 09 Dec 2019 13:58
Category: Window
Type: Bug Report
1
Telerik Window is causing following error: The current thread is not associated with the Dispatcher

I'm working on blazor server side application.
After update Telerik.UI.for.Blazor from 2.1 to 2.5 (before I updated .net core from 3.0 to 3.1) it shows following error:
InvalidOperationException: The current thread is not associated with the Dispatcher. Use InvokeAsync() to switch execution to the Dispatcher when triggering rendering or component state.

I investigated that it's cause by Telerik window.
The error occurs when window is on start page or when the page is refreshed.
Below code for Index.razor which cause the error:

 

@page "/"
 
<TelerikWindow @bind-Visible="@WindowIsVisible">
    <WindowTitle>
        <strong>The Title</strong>
    </WindowTitle>
    <WindowContent>
        This is my window <strong>popup</strong> content.
    </WindowContent>
    <WindowActions>
        <WindowAction Name="Minimize"></WindowAction>
        <WindowAction Name="Maximize"></WindowAction>
        <WindowAction Name="Close"></WindowAction>
    </WindowActions>
</TelerikWindow>
 
<TelerikButton OnClick="@( () => WindowIsVisible = !WindowIsVisible )">Toggle window</TelerikButton>
 
@code {
    bool WindowIsVisible { get; set; } = false;
}

Thanks
1 comment
ADMIN
Marin Bratanov
Posted on: 09 Dec 2019 15:00

Hello Boguslaw,

We are aware of this issue, and it stems from pre-rendering and the two-way binding of the Visible property. We are working on it and it will be fixed in our next release. I moved this thread to the public feedback portal so everyone can Follow the status: https://feedback.telerik.com/blazor/1445426-telerik-window-is-causing-following-error-the-current-thread-is-not-associated-with-the-dispatcher.

 

Regards,
Marin Bratanov
Progress Telerik

 UI for Blazor