Newcomers, Snippets, Xamarin.Forms

Useful XAML snippets for XF develpment [Part 2]

👋 Xamarin Devs !

I introduced you in the previous article , how to setup, use , and make C# Snippets

Now , it’s time to see Xaml snippets ! Trust me , these will help you save lot of time ⌚

1.Grid

Grid is a common Layout. I guess it my most used Layout 😎 So to reduce coding time , let’s have fun with snippet.

<Grid RowDefinitions="*,*" ColumnDefinitions="*,*" >
    $selected$
</Grid>
Expansion usage :
SurrondingWith (CTRL K + CTRL S ) usage :

2.Stacklayout

Same thing with StackLayout. Expansion usage is not really usefull , but SurrondingWith is priceless , use it 🥺

<StackLayout>
    $selected$
</StackLayout>

SurrondingWith usage :


3.Sharpnado.Shadows 🐱‍👤 .

You know how much I’m in love with Sharpnado.Shadows 🥰
Pick a view , surround it with Shadows et voilĂ  !

   <sh:Shadows CornerRadius="10">
    <sh:Shadows.Shades>
        <sh:ImmutableShades>
            <sh:Shade BlurRadius="10"
                      Opacity="0.5"
                      Offset="-10,-10"
                      Color="#FE99FE" />
            <sh:Shade BlurRadius="10"
                      Opacity="0.5"
                      Offset="10,10"
                      Color="#00B0FB" />
        </sh:ImmutableShades>
    </sh:Shadows.Shades>
      $selected$
</sh:Shadows>

SurrondingWith usage :


4.Style

Want to customize your controls ? Dont want to waste your time with Style in app.xaml ?
Use jptsyle 😏


And it’s done !

I hope all of those snippets could help you , you can download and install them from here

October is starting ! It’s time for October UI challenge. ( One Design / One Week / One Challenge 💪)

Be Prepared GIF - BePrepared GIFs

Leave a Reply

Your email address will not be published. Required fields are marked *