Hi everybody,
I am new to Xamarin Forms my layout is lagging so ineed some help.
This is my Ui Code :
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:d="http://xamarin.com/schemas/2014/forms/design"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:neo="clr-namespace:Xamarin.Forms.NeoControls;assembly=Xamarin.Forms.NeoControls"
xmlns:extensions="clr-namespace:NeomorphismSmartHomeApp.Extensions"
mc:Ignorable="d"
FlowDirection="LeftToRight"
xmlns:yummy="clr-namespace:Xamarin.Forms.PancakeView;assembly=Xamarin.Forms.PancakeView" xmlns:renderers="clr-namespace:NeomorphismSmartHomeApp.Renderes"
x:Class="NeomorphismSmartHomeApp.MainPage"
BackgroundColor="#e3edf7">
<NavigationPage.TitleView>
<Label Text="صفحه اصلی"
FontSize="Medium"
TextColor="White"
HorizontalOptions="Center"
FontFamily="MyFont"/>
</NavigationPage.TitleView>
<ScrollView>
<StackLayout CompressedLayout.IsHeadless="True">
<Frame Margin="10" CornerRadius="10">
<StackLayout Orientation="Horizontal" Spacing="10" Padding="0">
<Button Text="مشاهده تنظیمات"
FontFamily="MyFont"
Clicked="Button_Clicked"
CornerRadius="10"/>
<Label Text="برای استفاده از برنامه باید تنظیمات را انجام دهید."
FontSize="Small"
VerticalOptions="Center"
HorizontalOptions="End"
FontFamily="MyFont"/>
</StackLayout>
</Frame>
<Grid HorizontalOptions="FillAndExpand"
VerticalOptions="FillAndExpand"
ColumnSpacing="12"
Padding="35">
<Grid.RowDefinitions>
<RowDefinition Height="15*"/>
<RowDefinition Height="15*"/>
<RowDefinition Height="15*"/>
<RowDefinition Height="15*"/>
<RowDefinition Height="15*"/>
<RowDefinition Height="15*"/>
<RowDefinition Height="15*"/>
<RowDefinition Height="18*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="50*" />
<ColumnDefinition Width="50*" />
</Grid.ColumnDefinitions>
<neo:NeoButton Grid.Row="0"
Elevation=".25"
x:Name="btnSemiActive"
CornerRadius="70,20,20,20"
BackgroundColor="#e3edf7">
<StackLayout Orientation="Vertical"
VerticalOptions="FillAndExpand"
HorizontalOptions="FillAndExpand"
Padding="30">
<Image VerticalOptions="Start"
HorizontalOptions="Start"
HeightRequest="40"
Source="{extensions:ImageResource NeomorphismSmartHomeApp.Resources.Images.mid.png }"/>
<Label Text="نیمه فعال"
FontFamily="MyFont"
FontSize="Small"
TextColor="#95a3b8"
VerticalOptions="EndAndExpand"/>
</StackLayout>
<neo:NeoButton.GestureRecognizers>
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped"/>
</neo:NeoButton.GestureRecognizers>
</neo:NeoButton>
<neo:NeoButton Grid.Row="0"
Grid.Column="1"
Elevation=".25"
CornerRadius="20,70,20,20"
BackgroundColor="#e3edf7">
<StackLayout Orientation="Vertical"
VerticalOptions="FillAndExpand"
HorizontalOptions="FillAndExpand"
Padding="30">
<Image VerticalOptions="Start"
HorizontalOptions="Start"
HeightRequest="40"
Source="{extensions:ImageResource NeomorphismSmartHomeApp.Resources.Images.on.png }"/>
<Label Text="تمام فعال"
FontFamily="MyFont"
FontSize="Small"
TextColor="#95a3b8"
VerticalOptions="EndAndExpand"/>
</StackLayout>
<neo:NeoButton.GestureRecognizers>
<TapGestureRecognizer Tapped="FullActiveClicked"/>
</neo:NeoButton.GestureRecognizers>
</neo:NeoButton>
<neo:NeoButton Grid.Row="1"
Elevation=".25"
CornerRadius="20,20,70,20"
BackgroundColor="#e3edf7">
<StackLayout Orientation="Vertical"
VerticalOptions="FillAndExpand"
HorizontalOptions="FillAndExpand"
Padding="30">
<Image VerticalOptions="Start"
HorizontalOptions="Start"
Source="{extensions:ImageResource NeomorphismSmartHomeApp.Resources.Images.on.png }"/>
<Label Text="رله شماره 1 فعال"
FontFamily="MyFont"
FontSize="Small"
TextColor="#95a3b8"
VerticalOptions="EndAndExpand"/>
</StackLayout>
<neo:NeoButton.GestureRecognizers>
<TapGestureRecognizer Tapped="ActiveRele1Clicked"/>
</neo:NeoButton.GestureRecognizers>
</neo:NeoButton>
<neo:NeoButton Grid.Row="1"
Grid.Column="1"
Elevation=".25"
CornerRadius="20,20,20,70"
BackgroundColor="#e3edf7">
<StackLayout Orientation="Vertical"
VerticalOptions="FillAndExpand"
HorizontalOptions="FillAndExpand"
Padding="30">
<Image VerticalOptions="Center"
HorizontalOptions="Start"
HeightRequest="30"
Source="{extensions:ImageResource NeomorphismSmartHomeApp.Resources.Images.off.png }"/>
<Label Text="غیرفعال"
FontFamily="MyFont"
FontSize="Small"
TextColor="#95a3b8"
VerticalOptions="EndAndExpand"/>
</StackLayout>
<neo:NeoButton.GestureRecognizers>
<TapGestureRecognizer Tapped="DisableClicked"/>
</neo:NeoButton.GestureRecognizers>
</neo:NeoButton>
<neo:NeoButton Grid.Row="2"
Elevation=".25"
CornerRadius="70,20,20,20"
BackgroundColor="#e3edf7">
<StackLayout Orientation="Vertical"
VerticalOptions="FillAndExpand"
HorizontalOptions="FillAndExpand"
Padding="30">
<Image VerticalOptions="Start"
HorizontalOptions="Start"
HeightRequest="40"
Source="{extensions:ImageResource NeomorphismSmartHomeApp.Resources.Images.on.png }"/>
<Label Text="رله شماره 2 فعال"
FontFamily="MyFont"
FontSize="Small"
TextColor="#95a3b8"
VerticalOptions="EndAndExpand"/>
</StackLayout>
<neo:NeoButton.GestureRecognizers>
<TapGestureRecognizer Tapped="ActiveRele2Clicked"/>
</neo:NeoButton.GestureRecognizers>
</neo:NeoButton>
<neo:NeoButton Grid.Row="2"
Grid.Column="1"
Elevation=".25"
CornerRadius="20,70,20,20"
BackgroundColor="#e3edf7">
<StackLayout Orientation="Vertical"
VerticalOptions="FillAndExpand"
HorizontalOptions="FillAndExpand"
Padding="30">
<Image VerticalOptions="Start"
HorizontalOptions="Start"
HeightRequest="40"
Source="{extensions:ImageResource NeomorphismSmartHomeApp.Resources.Images.off.png }"/>
<Label Text="رله شماره 1 غیرفعال"
FontFamily="MyFont"
FontSize="Small"
TextColor="#95a3b8"
VerticalOptions="EndAndExpand"/>
</StackLayout>
<neo:NeoButton.GestureRecognizers>
<TapGestureRecognizer Tapped="DisableRele1Clicked"/>
</neo:NeoButton.GestureRecognizers>
</neo:NeoButton>
<neo:NeoButton Grid.Row="3"
Elevation=".25"
CornerRadius="20,20,70,20"
BackgroundColor="#e3edf7">
<StackLayout Orientation="Vertical"
VerticalOptions="FillAndExpand"
HorizontalOptions="FillAndExpand"
Padding="30">
<Image VerticalOptions="Start"
HorizontalOptions="Start"
Source="{extensions:ImageResource NeomorphismSmartHomeApp.Resources.Images.on.png }"/>
<Label Text="رله شماره 3 فعال"
FontFamily="MyFont"
FontSize="Small"
TextColor="#95a3b8"
VerticalOptions="EndAndExpand"/>
</StackLayout>
<neo:NeoButton.GestureRecognizers>
<TapGestureRecognizer Tapped="ActiveRele3Clicked"/>
</neo:NeoButton.GestureRecognizers>
</neo:NeoButton>
<neo:NeoButton Grid.Row="3"
Grid.Column="1"
Elevation=".25"
CornerRadius="20,20,20,70"
BackgroundColor="#e3edf7">
<StackLayout Orientation="Vertical"
VerticalOptions="FillAndExpand"
HorizontalOptions="FillAndExpand"
Padding="30">
<Image VerticalOptions="Center"
HorizontalOptions="Start"
HeightRequest="30"
Source="{extensions:ImageResource NeomorphismSmartHomeApp.Resources.Images.off.png }"/>
<Label Text="رله شماره 2 غیرفعال"
FontFamily="MyFont"
FontSize="Small"
TextColor="#95a3b8"
VerticalOptions="EndAndExpand"/>
</StackLayout>
<neo:NeoButton.GestureRecognizers>
<TapGestureRecognizer Tapped="DisableRele2Clicked"/>
</neo:NeoButton.GestureRecognizers>
</neo:NeoButton>
<neo:NeoButton Grid.Row="4"
Elevation=".25"
CornerRadius="70,20,20,20"
BackgroundColor="#e3edf7">
<StackLayout Orientation="Vertical"
VerticalOptions="FillAndExpand"
HorizontalOptions="FillAndExpand"
Padding="30">
<Image VerticalOptions="Start"
HorizontalOptions="Start"
HeightRequest="40"
Source="{extensions:ImageResource NeomorphismSmartHomeApp.Resources.Images.sound.png }"/>
<Label Text="پخش صدای دینگ دینگ"
FontFamily="MyFont"
FontSize="Small"
TextColor="#95a3b8"
VerticalOptions="EndAndExpand"/>
</StackLayout>
<neo:NeoButton.GestureRecognizers>
<TapGestureRecognizer Tapped="DingDingSoundClicked"/>
</neo:NeoButton.GestureRecognizers>
</neo:NeoButton>
<neo:NeoButton Grid.Row="4"
Grid.Column="1"
Elevation=".25"
CornerRadius="20,70,20,20"
BackgroundColor="#e3edf7">
<StackLayout Orientation="Vertical"
VerticalOptions="FillAndExpand"
HorizontalOptions="FillAndExpand"
Padding="30">
<Image VerticalOptions="Start"
HorizontalOptions="Start"
HeightRequest="40"
Source="{extensions:ImageResource NeomorphismSmartHomeApp.Resources.Images.off.png }"/>
<Label Text="رله شماره 3 غیرفعال"
FontFamily="MyFont"
FontSize="Small"
TextColor="#95a3b8"
VerticalOptions="EndAndExpand"/>
</StackLayout>
<neo:NeoButton.GestureRecognizers>
<TapGestureRecognizer Tapped="DisableRele3Clicked"/>
</neo:NeoButton.GestureRecognizers>
</neo:NeoButton>
<neo:NeoButton Grid.Row="5"
Elevation=".25"
CornerRadius="20,20,70,20"
BackgroundColor="#e3edf7">
<StackLayout Orientation="Vertical"
VerticalOptions="FillAndExpand"
HorizontalOptions="FillAndExpand"
Padding="30">
<Image VerticalOptions="Start"
HorizontalOptions="Start"
Source="{extensions:ImageResource NeomorphismSmartHomeApp.Resources.Images.mute.png }"/>
<Label Text="قطع آژیر"
FontFamily="MyFont"
FontSize="Small"
TextColor="#95a3b8"
VerticalOptions="EndAndExpand"/>
</StackLayout>
<neo:NeoButton.GestureRecognizers>
<TapGestureRecognizer Tapped="DisableAzhirClicked"/>
</neo:NeoButton.GestureRecognizers>
</neo:NeoButton>
<neo:NeoButton Grid.Row="5"
Grid.Column="1"
Elevation=".25"
CornerRadius="20,20,20,70"
BackgroundColor="#e3edf7">
<StackLayout Orientation="Vertical"
VerticalOptions="FillAndExpand"
HorizontalOptions="FillAndExpand"
Padding="30">
<Image VerticalOptions="Center"
HorizontalOptions="Start"
HeightRequest="30"
Source="{extensions:ImageResource NeomorphismSmartHomeApp.Resources.Images.disable.png }"/>
<Label Text="قطع شماره گیری"
FontFamily="MyFont"
FontSize="Small"
TextColor="#95a3b8"
VerticalOptions="EndAndExpand"/>
</StackLayout>
<neo:NeoButton.GestureRecognizers>
<TapGestureRecognizer Tapped="DisableNumberClicked"/>
</neo:NeoButton.GestureRecognizers>
</neo:NeoButton>
<neo:NeoButton Grid.Row="6"
Elevation=".25"
CornerRadius="70,20,20,20"
BackgroundColor="#e3edf7">
<StackLayout Orientation="Vertical"
VerticalOptions="FillAndExpand"
HorizontalOptions="FillAndExpand"
Padding="30">
<Image VerticalOptions="Start"
HorizontalOptions="Start"
HeightRequest="40"
Source="{extensions:ImageResource NeomorphismSmartHomeApp.Resources.Images.sim.png }"/>
<Label Text="کنترل میزان اعتبار سیم کارت"
FontFamily="MyFont"
FontSize="Small"
TextColor="#95a3b8"
VerticalOptions="EndAndExpand"/>
</StackLayout>
<neo:NeoButton.GestureRecognizers>
<TapGestureRecognizer Tapped="HandleSimCardChargeClicked"/>
</neo:NeoButton.GestureRecognizers>
</neo:NeoButton>
<neo:NeoButton Grid.Row="6"
Grid.Column="1"
Elevation=".25"
CornerRadius="20,70,20,20"
BackgroundColor="#e3edf7">
<StackLayout Orientation="Vertical"
VerticalOptions="FillAndExpand"
HorizontalOptions="FillAndExpand"
Padding="30">
<Image VerticalOptions="Start"
HorizontalOptions="Start"
HeightRequest="40"
Source="{extensions:ImageResource NeomorphismSmartHomeApp.Resources.Images.disable.png }"/>
<Label Text="قطع آیدی و شماره گیر"
FontFamily="MyFont"
FontSize="Small"
TextColor="#95a3b8"
VerticalOptions="EndAndExpand"/>
</StackLayout>
<neo:NeoButton.GestureRecognizers>
<TapGestureRecognizer Tapped="DisableAzhirAndNumberClicked"/>
</neo:NeoButton.GestureRecognizers>
</neo:NeoButton>
<neo:NeoButton Grid.Row="7"
Grid.Column="1"
Elevation=".25"
CornerRadius="20,20,70,20"
BackgroundColor="#e3edf7">
<StackLayout Orientation="Vertical"
VerticalOptions="FillAndExpand"
HorizontalOptions="FillAndExpand"
Padding="30">
<Image VerticalOptions="Start"
HorizontalOptions="Start"
Source="{extensions:ImageResource NeomorphismSmartHomeApp.Resources.Images.sim.png }"/>
<Label Text="شارژ سیم کارت"
FontFamily="MyFont"
FontSize="Small"
TextColor="#95a3b8"
VerticalOptions="EndAndExpand"/>
</StackLayout>
<neo:NeoButton.GestureRecognizers>
<TapGestureRecognizer Tapped="SimCardChargeClicked"/>
</neo:NeoButton.GestureRecognizers>
</neo:NeoButton>
</Grid>
</StackLayout>
</ScrollView>
</ContentPage>