Skip to content

Setting TextColor to be different than TintColor #101

Description

@BicycleMark

Hello All:
I have a user request to make the expanded view text a different color than TintColor Property. Here is my xaml code:

I want the text to be black.
SegmentedControlOption has no TextColor on it.

<exp:ExpandableView.SecondaryViewTemplate>
<DataTemplate>
    <StackLayout VerticalOptions="StartAndExpand" >
        <segmented:SegmentedControl HeightRequest="54" FontSize="Micro" Margin="5,15,5,15"
                                    TintColor="{x:Static const:Colors.ClientFacingColor}"
                                    SelectedSegment="{Binding Answer, Mode=TwoWay}"
                                    SegmentSelectedCommand="{Binding Path=BindingContext.SelectAnswerCommand, &#xA;
                                                            Source={x:Reference mainStack}}"
                                    SegmentSelectedCommandParameter="{Binding}">
            <segmented:SegmentedControl.Children>
                <segmented:SegmentedControlOption Text="{x:Static localRes:AppResources.Disagree}"  />
                <segmented:SegmentedControlOption Text="{x:Static localRes:AppResources.Uncertain}" />
                <segmented:SegmentedControlOption Text="{x:Static localRes:AppResources.Agree}" />
                <segmented:SegmentedControlOption Text="{x:Static localRes:AppResources.StronglyAgree}" />
            </segmented:SegmentedControl.Children>
        </segmented:SegmentedControl>
    </StackLayout>
</DataTemplate>

</exp:ExpandableView.SecondaryViewTemplate>

here is the visual this draws:

image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions