Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

Help with a ViewCell in iOS

$
0
0

I've been trying my darndest to get this looking right but can't make it work. Any possibly way this can be solved in Xaml without a custom cell renderer?


Here's what I'm attempting in Xaml:

<ScrollView>
        <StackLayout>
            <ActivityIndicator IsRunning="{Binding IsFetching}" />
            <ListView ItemsSource="{Binding Events}" Header="2015" Footer="">
                <ListView.ItemTemplate>
                    <DataTemplate>
                        <ViewCell Height="55">
                            <ViewCell.View>
                                <StackLayout Orientation="Horizontal" Padding="5" BackgroundColor="White">                                                          
                                    <StackLayout>
                                        <BoxView WidthRequest="44" 
                                             HeightRequest="5"  
                                             BackgroundColor="Purple"
                                             />
                                        <Label Text="AUG" FontSize="12" HeightRequest="13" HorizontalOptions="Center" VerticalOptions="Start" FontAttributes="Bold"/>
                                        <Label Text="31" FontSize="13" VerticalOptions="StartAndExpand" HorizontalOptions="Center" />
                                    </StackLayout>                              
                                    <StackLayout Orientation="Vertical"
                                                 HorizontalOptions="StartAndExpand">
                                        <Label Text="Relay For Life of" FontSize="14" VerticalOptions="End" TextColor="Gray"/>
                                        <Label Text="Hope City" FontSize="16" FontAttributes="Bold" VerticalOptions="StartAndExpand"/>
                                    </StackLayout>
                                </StackLayout>
                            </ViewCell.View>
                        </ViewCell>         
                    </DataTemplate>
                </ListView.ItemTemplate>
            </ListView>
        </StackLayout>
    </ScrollView>

Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>