Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ChasakisD/Xamarin.Forms-Coordinator-Workaround
A Xamarin.Forms (Android Only) Implementation of CoordinatorLayout with CollapsingToolbar
https://github.com/ChasakisD/Xamarin.Forms-Coordinator-Workaround
collapsingtoolbarlayout coordinator-layout coordinatorlayout xamarin xamarin-android xamarin-forms
Last synced: 29 days ago
JSON representation
A Xamarin.Forms (Android Only) Implementation of CoordinatorLayout with CollapsingToolbar
- Host: GitHub
- URL: https://github.com/ChasakisD/Xamarin.Forms-Coordinator-Workaround
- Owner: ChasakisD
- Created: 2018-03-13T18:56:27.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-04-05T19:03:22.000Z (over 6 years ago)
- Last Synced: 2024-11-08T07:42:49.636Z (about 1 month ago)
- Topics: collapsingtoolbarlayout, coordinator-layout, coordinatorlayout, xamarin, xamarin-android, xamarin-forms
- Language: C#
- Homepage:
- Size: 978 KB
- Stars: 14
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-xamarin-forms - Xamarin.Forms-Coordinator-Workaround ★15
README
# Xamarin.Forms-Coordinator-Workaround
A Xamarin.Forms (Android Only) Implementation of CoordinatorLayout with CollapsingToolbar[![NuGet version](https://badge.fury.io/nu/XamarinForms.CoordinatorLayout.Android.svg)](https://badge.fury.io/nu/XamarinForms.CoordinatorLayout.Android)
# Documentation
![Alt Text](https://media.giphy.com/media/1gUWeJoxIm66WXaaqr/giphy.gif)
## Installation
#### Xamarin.Android
Initialize the renderer below the Xamarin.Forms.Init
```cs
global::Xamarin.Forms.Forms.Init(this, bundle);
CoordinatorWorkaround.Droid.Renderers.Forms.Init();```
#### Xamarin.Forms (.NetStandard)
Create the page as normal page and navigate to it
```cs
var page = new CoordinatorPage
{
Title = "Finally Worked Monkeys!",
NestedContent = //the instance of my ContentPage here,
ImageSource = "my image source here",
StatusBarColor = Color.DarkMagenta,
ToolbarBackgroundColor = Color.DimGray,
CoordinatorBackgroundColor = Color.Green,
CoordinatorScrimBackgroundColor = Color.Red,
FloatingButtonImageSource = "my image source here",
FloatingButtonBackgroundColor = Color.DarkRed,
FloatingButtonCommand = new Command(async () => await DisplayAlert("hehe", "hehe", "ok"), () => true),
ChangeStatusBarColor = true,
HasBackButton = true
};
```## Bindable Properties
| Property | Type | Description |
|------------------|---------|-------------|
| `NestedContent` | `ContentPage` | The content of the NestedScrollView |
| `ImageSource` | `ImageSource` | The Source of the image that is used inside the CollapsingToolbar |
| `ToolbarBackgroundColor` | `Xamarin.Forms.Color` | The background color of the toolbar |
| `ChangeStatusBarColor` | `bool` | Type of bool, if you want to change the color of the status bar |
| `StatusBarColor` | `Xamarin.Forms.Color` | The background color of the status bar *(only if ChangeStatusBarColor is set to **true**)* |
| `CoordinatorScrimBackgroundColor` | `Xamarin.Forms.Color` | The color of the scrim effect in the collapsing toolbar |
| `CoordinatorBackgroundColor` | `Xamarin.Forms.Color` | The background color of the coordinator layout (the background of the image source) |
| `HasBackButton` | `bool` | If you want the toolbar have the back button |
| `IsFloatingButtonEnabled` | `bool` | If you want the floating action button to be enabled |
| `FloatingButtonImageSource` | `ImageSource` | The image source of the icon of the FAB *(only if IsFloatingButtonEnabled is set to **true**)* |
| `FloatingButtonBackgroundColor` | `Xamarin.Forms.Color` | The background color FAB *(only if IsFloatingButtonEnabled is set to **true**)* |
| `FloatingButtonCommand` | `ICommand` | The command that will execute when the user presses the FAB *(only if IsFloatingButtonEnabled is set to **true**)* |