Coder Social home page Coder Social logo

Comments (12)

daniel-luberda avatar daniel-luberda commented on August 10, 2024

Hi @ravensorb,

Simple Data Template (basic usage with 1 template)

Sure. Could you give more details?

Horizontal Scroll Grid (1 row)

Horizontal scrolling is not supported as Xamarin.Forms ListView doesn't support that (and FlowListView derives from it)

from dltoolkit.forms.controls.

ravensorb avatar ravensorb commented on August 10, 2024

I was looking over the sample and am having a little bit of a tough time figuring out how to use it :)

Example:

  • Line 17 and 18 as well as 19 and 20 appear to be duplicate lines. But I am not sure why each entry is being declared twice
  • How would I use this for a single data template (one template for all items) in a Grid type layout? Say a Grid of Pictures (like a gallery)

from dltoolkit.forms.controls.

daniel-luberda avatar daniel-luberda commented on August 10, 2024

Line 17 and 18 as well as 19 and 20 appear to be duplicate lines. But I am not sure why each entry is being declared twice

What file are you referring to?:)

How would I use this for a single data template (one template for all items) in a Grid type layout? Say a Grid of Pictures (like a gallery)

I'll upload some new better examples today.

from dltoolkit.forms.controls.

ravensorb avatar ravensorb commented on August 10, 2024

I suppose a link the specific file would help 😄

https://github.com/daniel-luberda/DLToolkit.Forms.Controls/blob/master/Examples/Pages/FlowListViewExpandPage.xaml

from dltoolkit.forms.controls.

daniel-luberda avatar daniel-luberda commented on August 10, 2024

Column definitions (4 columns with 2 layout used multiple times). The new thing (not on nuget yet) is FlowAutomaticColumnCount with FlowAutomaticColumnMinimumWidth. You define just one column template and set it to true, and column number will be automatically calculated to fill container.

from dltoolkit.forms.controls.

daniel-luberda avatar daniel-luberda commented on August 10, 2024

FlowSelectors.CustomAdvancedTemplateSelector is advanced template selector (basing on current binding context - it can provide different template for a cell for every item)

from dltoolkit.forms.controls.

ravensorb avatar ravensorb commented on August 10, 2024

So do that mean if I have 6 columns, I need to define the type 6 times? Wouldn't it be easier to have it match a selector to an object type during binding -- that would allow more reuse (and less copy/pasting in the xaml)

from dltoolkit.forms.controls.

daniel-luberda avatar daniel-luberda commented on August 10, 2024

You can have one definition only with FlowAutomaticColumnCount set to true.

You don't need to define any type multiple times. Could you elaborate?:) FlowColumnSimpleTemplateSelector is built in and can be used for simple scenarios. Multiple column definitions are used in scenarios where you want left/center/right items to be different - so it's needed.

Why selectors? It's because you can have any cell to have any type of view dynamically basing or binding context. I didn't find simpler way to do it and be compatible with XAML.

from dltoolkit.forms.controls.

daniel-luberda avatar daniel-luberda commented on August 10, 2024

I started to update some samples

The simplest one is:

C#

XAML

from dltoolkit.forms.controls.

dylinmaust avatar dylinmaust commented on August 10, 2024

How would I use this for a single data template (one template for all items) in a Grid type layout? Say a Grid of Pictures (like a gallery)

Forgive me if it's obvious, but is it possible to just define an inline column template rather than abstracting it out to a view? I'm trying to create a 3 column gallery similar to the previous request and it's not immediately clear to me.

from dltoolkit.forms.controls.

daniel-luberda avatar daniel-luberda commented on August 10, 2024

@TimeBomb006 You mean that you don't want to have view definition defined in a separate file? If yes it's not possible yet, but the new release will have this (standard Forms data templates).

If you want to have auto generated column count just use FlowAutoColumnCount and FlowMinimumWidth, property and define just one column template. Column count will be calculated automatically then.

from dltoolkit.forms.controls.

daniel-luberda avatar daniel-luberda commented on August 10, 2024

Samples should be better now.

from dltoolkit.forms.controls.

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.