Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreiMisiukevich committed Dec 20, 2023
1 parent d8d1dd3 commit a66eac7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 13 deletions.
11 changes: 6 additions & 5 deletions PanCardView/Common/CardsView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -832,11 +832,12 @@ protected virtual void SetupBackViews(int? index = null)

protected virtual void SetupLayout(params View[] views)
{
foreach (var view in views.Where(v => v != null))
{
AbsoluteLayout.SetLayoutBounds(view, new Rect(0, 0, 1, 1));
AbsoluteLayout.SetLayoutFlags(view, AbsoluteLayoutFlags.All);
}
// Setup layout if needed
// foreach (var view in views.Where(v => v != null))
// {
// AbsoluteLayout.SetLayoutBounds(view, new Rect(0, 0, 1, 1));
// AbsoluteLayout.SetLayoutFlags(view, AbsoluteLayoutFlags.All);
// }
}

protected virtual void SetSelectedItem()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
<viewModels:CardsSampleViewModel/>
</ContentPage.BindingContext>

<Grid RowDefinitions="*,Auto">
<cards:CoverFlowView
PositionShiftValue="145"
IsCyclical="false"
Expand All @@ -32,6 +31,7 @@
Margin="80"
VerticalOptions="Center"
HorizontalOptions="Fill"
HeightRequest="300"
Padding="0"
HasShadow="false"
IsClippedToBounds="true"
Expand All @@ -43,16 +43,10 @@
</cards:CoverFlowView.ItemTemplate>

<controls:LeftArrowControl
AbsoluteLayout.LayoutBounds="0, 1, -1, -1"
ImageSource="{Static res:ResourcesInfo.BlackLeftArrowImageSource}" />
<controls:RightArrowControl
AbsoluteLayout.LayoutBounds="1, 1, -1, -1"
ImageSource="{Static res:ResourcesInfo.BlackRightArrowImageSource}"/>

</cards:CoverFlowView>

<Button Grid.Row="1" Text="TO LAST" Command="{Binding GoToLastCommand}" />

</Grid>

</ContentPage>
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ if you want to achieve scale or opacity changing effects for side views (**Scale
```

-> If you want to customize indicators, you need set *SelectedIndicatorStyle* and/or *UnselectedIndicatorStyle*, or you are able to extend this class and override several methods.
Also you can customize position of indicators (You need to set Rotation / AbsoluteLayout Flags and Bounds etc.)
Also you can customize position of indicators (You need to set Rotation / Layout Options, Bounds etc.)

This class is describing default indicators styles (each default indicator item is Frame)
https://github.com/AndreiMisiukevich/CardView.MAUI/blob/main/PanCardView/Common/Styles/DefaultIndicatorItemStyles.cs
Expand Down

0 comments on commit a66eac7

Please sign in to comment.