I'm pretty new to Xamarin in general, and I'm working with Xamarin.Forms. I need to create single reusable controls/ui components that look the same across both Android and iOS. Take the following image as an example:
I need a button that looks exactly like this on both Android and iOS. The way that I found out about after some research is to create custom renders. That way it seems like some things about the control can be modified according to the platform.
However I'm wondering if there's another way that doesn't require the usage of extra logic in the platform-specific projects. Could I achieve this entirely in the Xamarin.Forms project? Also, the button it's just an example, I'll need to do this to entry fields, labels, calendars, radio buttons, check boxes and so on.
Depends a bit on the functionality, but in general you can create cross plat controls only in XAML ( and code ) and not use custom renderers.
For example a buton like this could look like this: ( this code example will create a circle button only in XAML )
<ContentView xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:models="clr-namespace:XamDevSummit.Models"
x:Class="XamDevSummit.Controls.FabButton">
<ContentView.Content>
<Grid RowSpacing="0" ColumnSpacing="0"
HeightRequest="50" WidthRequest="50"
VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand">
<Button x:Name="Fab"
CornerRadius="25" BackgroundColor="Olive"
Text="{x:Static models:IconFont.XamarinOutline}"
Command="{Binding ChatCommand}"
Style="{StaticResource MaterialButton}" />
</Grid>
</ContentView.Content>
</ContentView>
In regards for you other controls you list up, like I said all depends on what the need is for the look and feel. Some things are only possible with Custom Renderers.