Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Opacity not working

$
0
0

I want to set the Opacity for a BoxView:

but the rendered color is a solid black:

to see how it behaves I bound the opacity value to a Slider's Value:

<StackLayout x:Name="stk">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                </Grid.RowDefinitions>
                <local:RadioButtonsGroup x:Name="rbs" SelectedValuePath="Id" DisplayMemberPath="Name" FontAttributes="Bold" FontFamily="Droid Sans Mono" FrontColor="#2061D8"/>
                <Label HorizontalOptions="CenterAndExpand" FontSize="Large" TextColor="Black" Text="{Binding SelectedValue, Source={x:Reference rbs}}"/>
                <BoxView HeightRequest="100" WidthRequest="150" BackgroundColor="Black" Opacity="{Binding Value, Source={x:Reference sd}}" HorizontalOptions="Center" VerticalOptions="Center"/>
                <Slider x:Name="sd" Grid.Row="1"/>
                <Label Text="{Binding Value, Source={x:Reference sd}}" Grid.Row="2"/>
            </Grid>
        </StackLayout>


Viewing all articles
Browse latest Browse all 204402

Trending Articles



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