Xamarin Forms TableView Color Binding doesnt work

lkraemerlkraemer DEMember

hi,

I'm building an interface for a settings page of an app. Currently I am at the themes of the app. Everything works very well. The colors are exchanged automatically against the new ones (header, text, etc.). For the individual setting points I use the TableView element on the basis of an example. However, the colors of the TableView are not changed when the theme is changed. I can't find a solution. Can anyone help?

The XAML of the page:

<ContentPage.Content>

    <StackLayout BackgroundColor="{DynamicResource StackLayoutBackgroundColor}">

        <TableView Intent="Settings"
                   BackgroundColor="{DynamicResource TableViewBackgroundColor}">

            <TableRoot>

                <TableSection TextColor="{DynamicResource TableViewTitleForegroundColor}" Title="Darstellung">

                    <SwitchCell On="true" Text="Moderner Feed" OnColor="{DynamicResource PrimaryColor}" />

                    <ViewCell>
                        <StackLayout
                            Padding="15,0,20,0"
                            Orientation="Horizontal"
                            VerticalOptions="Center">
                            <StackLayout.GestureRecognizers>
                                <TapGestureRecognizer NumberOfTapsRequired="1"
                                                      Tapped="Handle_Tapped" />
                            </StackLayout.GestureRecognizers>

                            <Label Text="Theme" XAlign="Center" />
                            <Label
                                HorizontalOptions="EndAndExpand"
                                Text="&gt;"
                                XAlign="Center" />
                        </StackLayout>
                    </ViewCell>

                </TableSection>

            </TableRoot>

        </TableView>

    </StackLayout>

</ContentPage.Content>

kind regards

Answers

Sign In or Register to comment.