Code Monkey home page Code Monkey logo

Comments (5)

stevemonaco avatar stevemonaco commented on June 12, 2024

INCC needs to be on the UI thread. Using their ObservableList<T> works fine. It's only an issue with the INotifyCollectionChangedSynchronizedView<T>. Their WPF sample shows using BindingOperations.EnableCollectionSynchronization, so not being on the UI thread seems to be a possible scenario. I would have expected an exception or log message on Verbose, but I don't seem to get either.

from avalonia.

cdytoby avatar cdytoby commented on June 12, 2024

I saw it, but I don't need to synchronize across thread (at least not right now), so I thought this is optional. ObservableList<T> don't have INCC, so INotifyCollectionChangedSynchronizedView<T> is the only option here if I want to keep using this.

from avalonia.

timunie avatar timunie commented on June 12, 2024

Can you please file a minimum sample? I'll not explore a random file renamer as that could be harmful to my machine.

from avalonia.

cdytoby avatar cdytoby commented on June 12, 2024

Hi, this name "DumbRenamer" is a project I just started, despite the solution name, there is not much code, and not much going on, that's why I upload it, and it's without any dll or built binary.

But I understand your concern. Here are the some sample code files in a zip (.cs file and .axaml files are not directly allowed somehow)

Code.zip

PS: CommunityToolkit.Mvvm package and ObservableCollections package from "https://github.com/Cysharp/ObservableCollections" are required.

from avalonia.

timunie avatar timunie commented on June 12, 2024

You need the Dispather if you update things from a Task.

private async Task ChangeValue()
{
    await Task.Delay(1000);
    Dispatcher.UiThread.Post(() => { TestInt = 10 });
    ExecutePreview();
}

from avalonia.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.