Advertisement
Guest User

Untitled

a guest
Feb 25th, 2020
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.63 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
  4. xmlns:forms="clr-namespace:SkiaSharp.Views.Forms;assembly=SkiaSharp.Views.Forms"
  5. xmlns:touch="clr-namespace:CalcFeud.Touch"
  6. xmlns:yummy="clr-namespace:Xamarin.Forms.PancakeView;assembly=Xamarin.Forms.PancakeView"
  7. x:Class="CalcFeud.Views.MainPage">
  8. <!--<Image Source="C:\Users\kjerg\source\repos\CalcFeud\CalcFeud\CalcFeud\Images/CalcFeudBG.png"></Image>-->
  9.  
  10. <ContentPage.Content>
  11.  
  12.  
  13. <Grid>
  14.  
  15. <Grid.RowDefinitions>
  16. <RowDefinition Height="5"/>
  17. <RowDefinition Height="30"/>
  18. <RowDefinition x:Name="GameView" Height="*"/>
  19. <RowDefinition Height="15"/>
  20. <RowDefinition x:Name="LabelView" Height="0" />
  21. <RowDefinition x:Name="ButtonView" Height="Auto" />
  22. </Grid.RowDefinitions>
  23.  
  24. <!-- Top buttons -->
  25. <Grid Row="1" BackgroundColor="Transparent" HorizontalOptions="FillAndExpand">
  26. <Grid.ColumnDefinitions>
  27. <ColumnDefinition Width="10"/>
  28. <ColumnDefinition Width="*"/>
  29. <ColumnDefinition Width="*"/>
  30. <ColumnDefinition Width="30"/>
  31. <ColumnDefinition Width="30"/>
  32. <ColumnDefinition Width="10"/>
  33. </Grid.ColumnDefinitions>
  34.  
  35. <Button Grid.Column="3" CornerRadius="6" Clicked="ShareOnFacebook" x:Name="FacebookShareButton" HeightRequest="30" WidthRequest="30" BackgroundColor="#3b579d" />
  36. <Button Grid.Column="4" CornerRadius="6" Clicked="EnterRulesMethod" x:Name="HowToButton" HeightRequest="30" WidthRequest="30" BackgroundColor="#686869" />
  37.  
  38. </Grid>
  39.  
  40.  
  41.  
  42.  
  43. <!-- Board -->
  44. <Grid Row="2">
  45.  
  46. <forms:SKCanvasView x:Name="CanvasView"
  47. PaintSurface="OnCanvasViewPaintSurface" />
  48. <Grid.Effects>
  49. <touch:TouchEffect Capture="True"
  50. TouchAction="OnTouchEffectAction" />
  51. </Grid.Effects>
  52.  
  53. </Grid>
  54.  
  55.  
  56. <Grid Row="3" Margin="0, -80, 0, 0">
  57.  
  58.  
  59.  
  60. </Grid>
  61.  
  62.  
  63. <!-- Labels -->
  64. <Grid Row="3" BackgroundColor="red">
  65.  
  66.  
  67. <StackLayout Grid.Column="0" BackgroundColor="blue" Margin="0, -25, 0, 0">
  68.  
  69. <StackLayout>
  70. <Label Margin="10, 20, 0, 0" Text="Swaps left: " HorizontalOptions="StartAndExpand" HorizontalTextAlignment="Start" FontSize="Micro"/>
  71. <Label x:Name="SwapsLeftLabel" HorizontalTextAlignment="Start" FontSize="Micro"/>
  72. </StackLayout>
  73.  
  74. <StackLayout>
  75. <Label Margin="10, -20, 0, 0" Text="Tiles left: " HorizontalOptions="StartAndExpand" HorizontalTextAlignment="Start" FontSize="Micro"/>
  76. <Label x:Name="TilesLeftLabel" HorizontalTextAlignment="End" FontSize="Micro"/>
  77. </StackLayout>
  78.  
  79. </StackLayout>
  80.  
  81. <StackLayout Grid.Column="3" BackgroundColor="green" Margin="0, -25, 0, 0">
  82.  
  83. <StackLayout>
  84. <Label Margin="20, 20, 0, 0" Text="Your points: " HorizontalOptions="StartAndExpand" HorizontalTextAlignment="Start" FontSize="Micro"/>
  85. <Label x:Name="PlayersPointsLabel" HorizontalTextAlignment="End" FontSize="Micro"/>
  86. </StackLayout>
  87.  
  88. <StackLayout>
  89. <Label Margin="20, -20, 0, 0" x:Name="OpponentsNamePoints" HorizontalOptions="StartAndExpand" HorizontalTextAlignment="Start" FontSize="Micro"/>
  90. <Label x:Name="OpponentsPoints" HorizontalTextAlignment="End" FontSize="Micro"/>
  91. </StackLayout>
  92.  
  93. </StackLayout>
  94. </Grid>
  95.  
  96. <!-- Buttons -->
  97. <Grid Row="5" HorizontalOptions="FillAndExpand" >
  98. <Grid.RowDefinitions>
  99. <RowDefinition Height="2"/>
  100. <RowDefinition/>
  101. <RowDefinition Height="2"/>
  102. </Grid.RowDefinitions>
  103.  
  104. <Grid.ColumnDefinitions>
  105. <ColumnDefinition Width="10"/>
  106. <ColumnDefinition Width="*"/>
  107. <ColumnDefinition Width="*"/>
  108. <ColumnDefinition Width="*"/>
  109. <ColumnDefinition Width="10"/>
  110. </Grid.ColumnDefinitions>
  111.  
  112. <Button Grid.Column="1" Grid.Row="1" FontSize="Micro" CornerRadius="20" TextColor="White" FontAttributes="Bold" BackgroundColor="#686869" x:Name="PlayPassButton" Text="Pass" Clicked="PassMethod"/>
  113. <Button Grid.Column="2" Grid.Row="1" FontSize="Micro" CornerRadius="20" TextColor="White" FontAttributes="Bold" BackgroundColor="#686869" x:Name="SwapButton" Text="Swap" Clicked="SwapMethod" />
  114. <Button Grid.Column="3" Grid.Row="1" FontSize="Micro" CornerRadius="20" TextColor="#FFFFFF" FontAttributes="Bold" BackgroundColor="#686869" x:Name="SurrenderButton" Text="Give In" Clicked="SurrenderMethod" />
  115.  
  116. <!-- Labels -->
  117.  
  118.  
  119.  
  120.  
  121.  
  122. </Grid>
  123. </Grid>
  124. </ContentPage.Content>
  125.  
  126. </ContentPage>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement