Giter Site home page Giter Site logo

Comments (4)

chrisglein avatar chrisglein commented on June 1, 2024

Seems like a totally reasonable thing to want to do from a XAML perspective.
Is the missing functionality here having functions that take references to other views?

Setting simple example aside, is your real example a virtual list? Is it possible to declare a virtual data source through JS?

from react-native-xaml.

will-ks avatar will-ks commented on June 1, 2024

Seems like a totally reasonable thing to want to do from a XAML perspective. Is the missing functionality here having functions that take references to other views?

I think so, but my example code may not be the way you want to approach it, and I'm not all that familiar with xaml.

It could also follow the pattern used here: Calling methods on XAML objects. So something like:

ListView.ScrollIntoView(listViewRef, lastListViewItemRef)

We could probably also use StartBringIntoView instead, so something more like:

ListViewItem.StartBringIntoView(lastListViewItemRef)

The docs mention "Some types support custom commands to expose some functionality of the underlying platform" but as far as I can tell this is manually specified and only the MenuFlyout.ShowAt method is exposed so far? https://github.com/microsoft/react-native-xaml/blob/main/package/Codegen/Windows.UI.Xaml.json#L168
Is it simple enough to extend this to other methods via the codegen?

Setting simple example aside, is your real example a virtual list? Is it possible to declare a virtual data source through JS?

In our case it's not virtualized, its 10 - 20 list items mapped directly as ListViewItem component children of the ListView. We could probably use a virtual data source if it would help solve this issue, although would need to check that the list remains nicely accessible for our screen reader users.

from react-native-xaml.

jonthysell avatar jonthysell commented on June 1, 2024

Quick question, are you already using react-native-xaml to use XAML ListView's in your RNW app?

To be clear, adding / exposing the ScrollIntoView() method on react-native-xaml's ListView here will not expose that functionality to the core RN List Views, like FlatList, even if those views are also built on top of XAML ListViews.

from react-native-xaml.

will-ks avatar will-ks commented on June 1, 2024

Hi @jonthysell, yes, we are using rn-xaml's ListView. We use it as we found the keyboard accessibility of the rn-xaml ListView to be superior to RN's FlatList, but that's another issue.

from react-native-xaml.

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.