Xamarin Forms List View Showing Row items in Frames

后端 未结 3 765
抹茶落季
抹茶落季 2021-01-07 02:10

Can you please recommend me some sample code to create framed lines as shown in the picture. As you can see in the image, for example for the first row, M should be in one f

3条回答
  •  爱一瞬间的悲伤
    2021-01-07 02:34

    First of all, grid column indices start at '0'(i.e., if u have 4 columns, their indices will be [0,1,2,3]).

    Back to the question:

    Your approach seems very strange: you put 4 elements in 4 grid cells 'independently', but 3 of this elements have to be placed within common border. You may try to put this 3 elements in another container(for example, in stack layout), and then add a border to this container. Frame class itself is very poor, but here is some workaround using custom renderers.

    Thus, listview cell may look like this:

    
        
            
        
            
                
        
    
    

    PS> I'm not much experienced in Xamarin, so, any suggestions and corrections would be greatly appreciated.

    EDIT: do not put listview inside scrollview

提交回复
热议问题