Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
146386 | Aug 2,2019 06:14 AM UTC | Aug 5,2019 11:26 AM UTC | Xamarin.Forms | 7 |
![]() |
Tags: SfGradientView |
<Grid RowSpacing="0">
<Grid.RowDefinitions>
<RowDefinition Height="25*" />
<RowDefinition Height="65*" />
<RowDefinition Height="10*" />
</Grid.RowDefinitions>
<Grid Grid.Row="0" >
<!--This is my header I would like another gradietn -->
<sync1:SfGradientView >
<sync1:SfGradientView.BackgroundBrush>
<sync1:SfLinearGradientBrush>
<sync1:SfLinearGradientBrush.GradientStops>
<sync1:SfGradientStop Color="#2d265b" Offset="0.0" />
<sync1:SfGradientStop Color="#b8495c" Offset="1.0" />
</sync1:SfLinearGradientBrush.GradientStops>
</sync1:SfLinearGradientBrush>
</sync1:SfGradientView.BackgroundBrush>
</sync1:SfGradientView>
</Grid>
<Grid Grid.Row="1" >
<!--in this section I will put a collection view and I want particular gradient -->
<sync1:SfGradientView >
<sync1:SfGradientView.BackgroundBrush>
<sync1:SfLinearGradientBrush>
<sync1:SfLinearGradientBrush.GradientStops>
<sync1:SfGradientStop Color="Red" Offset="0.25" />
<sync1:SfGradientStop Color="Gold" Offset="1" />
</sync1:SfLinearGradientBrush.GradientStops>
</sync1:SfLinearGradientBrush>
</sync1:SfGradientView.BackgroundBrush>
</sync1:SfGradientView>
</Grid>
<Grid Grid.Row="2">
<!--in this section will be my footer with another gradient -->
<sync1:SfGradientView >
<sync1:SfGradientView.BackgroundBrush>
<sync1:SfLinearGradientBrush>
<sync1:SfLinearGradientBrush.GradientStops>
<sync1:SfGradientStop Color="Blue" Offset="0.25" />
<sync1:SfGradientStop Color="Orange" Offset="0.75" />
</sync1:SfLinearGradientBrush.GradientStops>
</sync1:SfLinearGradientBrush>
</sync1:SfGradientView.BackgroundBrush>
</sync1:SfGradientView>
</Grid>
</Grid> |
[XAML]
<Grid RowSpacing="0">
<Grid.RowDefinitions>
<RowDefinition Height="25*" />
<RowDefinition Height="65*" />
<RowDefinition Height="10*" />
</Grid.RowDefinitions>
<Grid Grid.Row="0" >
<sync1:SfGradientView >
<sync1:SfGradientView.BackgroundBrush>
<sync1:SfLinearGradientBrush>
<sync1:SfLinearGradientBrush.GradientStops>
<sync1:SfGradientStop Color="white" Offset="0.0" />
<sync1:SfGradientStop Color="white" Offset="1.0" />
</sync1:SfLinearGradientBrush.GradientStops>
</sync1:SfLinearGradientBrush>
</sync1:SfGradientView.BackgroundBrush>
</sync1:SfGradientView>
</Grid>
<Grid Grid.Row="1" >
<sync1:SfGradientView >
<sync1:SfGradientView.BackgroundBrush>
<sync1:SfLinearGradientBrush>
<sync1:SfLinearGradientBrush.GradientStops>
<sync1:SfGradientStop Color="White" Offset="0.0" />
<sync1:SfGradientStop Color="PaleTurquoise" Offset="1.0" />
</sync1:SfLinearGradientBrush.GradientStops>
</sync1:SfLinearGradientBrush>
</sync1:SfGradientView.BackgroundBrush>
</sync1:SfGradientView>
<ListView x:Name="list"
WidthRequest="40"
HeightRequest="40"
SeparatorVisibility="None"
HasUnevenRows="True">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<StackLayout VerticalOptions="FillAndExpand"
Orientation="Horizontal"
Padding="20,10,0,10"
Spacing="20">
<Image Source="{Binding Icon}"
WidthRequest="20"
HeightRequest="20"
VerticalOptions="Center" />
<Label Text="{Binding Title}"
FontSize="Medium"
VerticalOptions="Center"
TextColor="Black"/>
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</Grid>
<Grid Grid.Row="2">
<!--in this section will be my footer with another gradient -->
<sync1:SfGradientView >
<sync1:SfGradientView.BackgroundBrush>
<sync1:SfLinearGradientBrush>
<sync1:SfLinearGradientBrush.GradientStops>
<sync1:SfGradientStop Color="White" Offset="0.0" />
<sync1:SfGradientStop Color="GreenYellow" Offset="1.0" />
</sync1:SfLinearGradientBrush.GradientStops>
</sync1:SfLinearGradientBrush>
</sync1:SfGradientView.BackgroundBrush>
</sync1:SfGradientView>
<Label Text="AAAAA"></Label>
</Grid>
</Grid> |
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.