Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <Grid>
- <Frame
- Margin="5,15,5,5"
- BorderColor="LightGray"
- CornerRadius="5"
- HasShadow="False">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto" />
- </Grid.RowDefinitions>
- <Grid IsVisible="{Binding IsExpanded, Source={x:Reference _carView}}">
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto" />
- <RowDefinition Height="*" />
- </Grid.RowDefinitions>
- <Label
- HorizontalOptions="End"
- Text="{Binding Notes}"
- TextColor="Gray" />
- <Label Grid.Row="1" Text="{Binding Description}" />
- </Grid>
- </Grid>
- </Frame>
- <StackLayout
- Margin="20,0,0,0"
- BackgroundColor="White"
- HorizontalOptions="Start"
- Orientation="Horizontal"
- VerticalOptions="Start">
- <local:CarCircleView
- Margin="7,0,0,0"
- xct:TouchEffect.Command="{Binding ToggleCollapseCommand, Source={x:Reference _carView}}"
- xct:TouchEffect.CommandParameter="{x:Reference _carView}"
- HeightRequest="30"
- HorizontalOptions="Start"
- VerticalOptions="Start"
- WidthRequest="30" />
- <Label
- Margin="0,0,7,0"
- FontAttributes="Bold"
- Text="{Binding Name}"
- VerticalTextAlignment="Center" />
- </StackLayout>
- </Grid>
- </ContentView.Content>
- ViewModel anim
- private void ToggleCollapse(ContentView cv)
- {
- //if (DeviceInfo.Platform == DevicePlatform.Android)
- //{
- //BUG iOS pre7+: doesn't collapse the section, only makes the label invisible
- cv.LayoutTo(cv.Bounds, 600, Easing.SpringIn);
- IsExpanded = !IsExpanded;
- OnPropertyChanged(nameof(IsExpanded));
- //}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement