Slide to max page hight

Borisoprit 371 Reputation points
2021-02-26T18:51:39.353+00:00

I have a slider and can fill in the slide length .

For example 300 or 400 .

In the code the length 550 what to fill in for the whole screen ?

var mainDisplayInfo = DeviceDisplay.MainDisplayInfo;


            if (MyDraggableView.Height == 0)
            {
                Action<double> callback = input => MyDraggableView.HeightRequest = input;
                double startHeight = 0;
                double endHeight = mainDisplayInfo.Height / 4;
                uint rate = 32;
                uint length = 550;
                Easing easing = Easing.CubicOut;
                MyDraggableView.Animate("anim", callback, startHeight, endHeight, rate, length, easing);
            }
            else
            {
                Action<double> callback = input => MyDraggableView.HeightRequest = input;
                double startHeight = mainDisplayInfo.Height / 4;
                double endiendHeight = 0;
                uint rate = 32;
                uint length = 550;
                Easing easing = Easing.SinOut;
                MyDraggableView.Animate("anim", callback, startHeight, endiendHeight, rate, length, easing);

            }
Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,296 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Borisoprit 371 Reputation points
    2021-03-01T12:24:01.19+00:00

    The MyDraggableView is the name of the slider , and this is the code of the slider itself in xaml.
    This part is sliding up

    <PanCake:PancakeView  VerticalOptions="EndAndExpand" BackgroundColor="{StaticResource Kleurlichtgroengrijs}"  x:Name="MyDraggableView" CornerRadius="25,25,0,0" HorizontalOptions="FillAndExpand" HeightRequest="0">  
                        <ScrollView>  
                            <Grid>  
                                <Grid.RowDefinitions>  
                                    <RowDefinition Height="25"/>  
                                    <RowDefinition Height="Auto"/>  
                                    <RowDefinition Height="Auto"/>  
                                    <RowDefinition Height="Auto"/>  
                                    <RowDefinition Height="Auto"/>  
                                    <RowDefinition Height="Auto"/>  
                                    <RowDefinition Height="Auto"/>  
                                    <RowDefinition Height="Auto"/>  
                                    <RowDefinition Height="Auto"/>  
                                    <RowDefinition Height="Auto"/>  
                                </Grid.RowDefinitions>  
      
                                <Grid Grid.Row="0">  
                                    <BoxView HeightRequest="2"  Margin="10" VerticalOptions="CenterAndExpand" HorizontalOptions="CenterAndExpand" BackgroundColor="Gray" WidthRequest="90"/>  
                                    <Grid.GestureRecognizers>  
                                        <TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped"/>  
                                    </Grid.GestureRecognizers>  
                                </Grid>  
      
                                <StackLayout Margin="0,20,0,20" Grid.Row="1" VerticalOptions="CenterAndExpand">  
                                    <Label Text="Highscore" TextColor="{StaticResource Backgroundoverall }"  
                                              HorizontalOptions="Center"  
                                                FontSize="Medium"                     
                           Grid.Row="2"/>  
      
                                    <CollectionView  
      
                        x:Name="lstPersons2"   Grid.Row="3"  
                                ItemsSource="{Binding personList}"  
                                       Margin="05,0"  
                                     SelectionChanged="lstPersons_SelectionChanged"  
                         SelectionMode="Single"  
                                   
                                       HeightRequest="150"  
                                        WidthRequest="80"  
                                       VerticalOptions="FillAndExpand"  
                                       HorizontalScrollBarVisibility="Never" >  
      
                                        <CollectionView.ItemTemplate>  
                                            <DataTemplate>  
                                                <Grid Padding="0,5,0,5" BackgroundColor="#ff9500"  >  
      
                                                    <Grid.RowDefinitions>  
                                                        <RowDefinition Height="25" />  
                                                        <RowDefinition Height="1" />  
                                                    </Grid.RowDefinitions>  
                                                    <Grid.ColumnDefinitions>  
                                                        <ColumnDefinition Width="30" />  
                                                        <ColumnDefinition Width="200" />  
                                                        <ColumnDefinition Width="50" />  
                                                    </Grid.ColumnDefinitions>  
                                                    <Frame Grid.Row="0" Grid.RowSpan="2" CornerRadius="5"  
                           Grid.Column="1" BackgroundColor="#e3edf7" HeightRequest="12"   />  
      
                                                    <Label Text="{Binding Name}"  Grid.Row="0" TranslationY="0" TranslationX="3"  
                           Grid.Column="1"    
                                       HorizontalOptions="Start" VerticalOptions="Center" TextColor="#ff15616d" FontSize="18"  />  
      
                                                    <Frame Grid.Row="0" CornerRadius="60" Grid.RowSpan="2"  
                           Grid.Column="2" BackgroundColor="{StaticResource Kleuroranjebruin}" HeightRequest="12"   />  
      
                                                    <Label Text="{Binding Score}"   
                                       Grid.Row="0"    
                           Grid.Column="3" HorizontalTextAlignment="Center" TranslationY="2" TranslationX="-45"   HorizontalOptions="Start" VerticalOptions="Center" TextColor="{StaticResource Kleurgroengrijs}" FontSize="Medium" />  
      
      
                                                </Grid>  
                                            </DataTemplate>  
                                        </CollectionView.ItemTemplate>  
                                    </CollectionView>  
                                </StackLayout>  
      
                                <Grid Grid.Row="3">  
                                    <Grid.ColumnDefinitions>  
                                        <ColumnDefinition Width="3*"/>  
                                        <ColumnDefinition Width="4*"/>  
                                        <ColumnDefinition Width="3*"/>  
                                    </Grid.ColumnDefinitions>  
      
                                </Grid>  
                            </Grid>  
      
                        </ScrollView>  
                    </PanCake:PancakeView>  
    

    And this is the slider , but i want to slide it al the way up , on every phone .

    73005-img-2868.jpg