[text] ltybc

Viewer

  1. <Window
  2.         x:Class="WeatherApp.MainWindow"
  3.         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4.         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5.         Title="Weather App" Height="500" Width="760"
  6.         WindowStyle="None"
  7.         ResizeMode="NoResize"
  8.         Background="Transparent"
  9.         AllowsTransparency="True">
  10.  
  11.     <Border Background="#bdc3c7" CornerRadius="20">
  12.         <StackPanel>
  13.             <StackPanel Orientation="Horizontal" >
  14.                 <Border CornerRadius="10" Background="#1e272e" Width="250" Height="40"  Margin="50,50,0,0">
  15.                     <Grid>
  16.                         <Rectangle StrokeThickness="1"></Rectangle>
  17.                         <TextBox HorizontalAlignment="Left"
  18.                                  Width="250"
  19.                                      BorderThickness="0" 
  20.                                      Background="Transparent" 
  21.                                      Padding="5"
  22.                                      Margin="7,0,0,0" 
  23.                                      Foreground="#CFCFCF" 
  24.                                      x:Name="txtSearch" 
  25.                                      FontSize="20"
  26.                                      VerticalContentAlignment="Center"
  27.                                      Text=" "
  28.                                      FontFamily="Roboto" 
  29.                                      FontWeight="Medium"/>
  30.                     </Grid>
  31.                 </Border>
  32.  
  33.                 <Border Width="100" Height="40"  Margin="10,50,0,0">
  34.  
  35.                     <Button x:Name="btnSearch" Click="BtnSearch_Click" Content="Search" FontSize="18" Background="#d35400" FontFamily="Roboto" FontWeight="Medium" BorderThickness="0"  >
  36.                         <Button.Resources>
  37.                             <Style TargetType="Border">
  38.                                 <Setter Property="CornerRadius" Value="10"></Setter>
  39.                             </Style>
  40.                         </Button.Resources>
  41.                     </Button>
  42.                 </Border>
  43.                 <TextBlock x:Name="txtDayOfWeek" Text="{Binding CurrentDayOfWeek}" FontSize="40" Margin="140,50,0,0" Width="150" FontFamily="Roboto" FontWeight="Medium"/>
  44.             </StackPanel>
  45.             <StackPanel Orientation="Horizontal" Margin="0,0,0,0" Height="170">
  46.                 <Image Source="Images/location.png" Width="35" Height="35" VerticalAlignment="Center" Margin="46,0,0,0"/>
  47.                 <TextBlock x:Name="txtCity" Text="{Binding CurrentWeather.City}"  FontSize="40" Margin="0,63,0,0" TextAlignment="Justify" FontFamily="Roboto" FontWeight="Medium" />
  48.                 <Image Source="Images/tempo.png" Width="50" Height="50" VerticalAlignment="Center" Margin="10,0,0,5"/>
  49.                 <TextBlock x:Name="txtTemperature" FontSize="50" Text="{Binding CurrentWeather.Main.Temperature}" Margin="0,55,0,0" TextAlignment="Justify" FontFamily="Roboto" FontWeight="Medium"/>
  50.                 <TextBlock x:Name="txtCelcius" FontSize="30" Text="°С"  Margin="0,60,0,0" FontFamily="Roboto" FontWeight="Medium"/>
  51.                 <Border CornerRadius="20" Background="#bdc3c7" Width="100" Height="100"  Margin="0,0,0,0" >
  52.                     <Image x:Name="imgWeatherIcon" Width="100" Height="100" Visibility="Collapsed" VerticalAlignment="Center" HorizontalAlignment="Center"/>
  53.                 </Border>
  54.             </StackPanel>
  55.             <StackPanel>
  56.                 <StackPanel Orientation="Horizontal">
  57.  
  58.                     <Border  Width=" 200" Height="200" Background="#669bbc" CornerRadius="20" Margin="50,0,0,0" Padding="10">
  59.                         <StackPanel>
  60.                             <StackPanel>
  61.                                 <Image Source="Images/humidity.png" Height="50" Width="50" HorizontalAlignment="Center" Margin="5"/>
  62.                             </StackPanel>
  63.                             <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
  64.                                 <StackPanel>
  65.                                     <TextBlock x:Name="txtHumidity" Text="{Binding CurrentWeather.Main.Humidity}" Margin="55,0,0,0" FontSize="50" TextAlignment="Justify" FontFamily="Roboto" FontWeight="Medium"/>
  66.                                 </StackPanel>
  67.                                 <StackPanel>
  68.                                     <TextBlock Text="%" FontSize="30" Margin="0,15,0,0" FontFamily="Roboto" FontWeight="Bold"/>
  69.                                 </StackPanel>
  70.                             </StackPanel>
  71.                             <StackPanel>
  72.                                 <TextBlock Text="Humidity" FontSize="30" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="0,10,0,0" FontFamily="Roboto" FontWeight="Regular" />
  73.                             </StackPanel>
  74.                         </StackPanel>
  75.                     </Border>
  76.  
  77.                     <Border  Width=" 200" Height="200" Background="#669bbc" CornerRadius="20" Margin="35,0,0,0" Padding="10">
  78.                         <StackPanel>
  79.                             <StackPanel>
  80.                                 <Image Source="Images/wind.png" Height="50" Width="50" HorizontalAlignment="Center" Margin="5" />
  81.                             </StackPanel>
  82.                             <StackPanel Orientation="Horizontal" Margin="0,10,0,0" HorizontalAlignment="Center">
  83.                                 <StackPanel>
  84.                                     <TextBlock  x:Name="txtWindSpeed" Text="{Binding CurrentWeather.Wind.Speed}"  Margin="15,3,0,0" TextAlignment="Justify" FontSize="40" FontFamily="Roboto" FontWeight="Medium"/>
  85.                                 </StackPanel>
  86.                                 <StackPanel>
  87.                                     <TextBlock Text="km/h" FontSize="30" Margin="5,18,0,0" FontFamily="Roboto" FontWeight="Medium"/>
  88.                                 </StackPanel>
  89.                             </StackPanel>
  90.                             <StackPanel>
  91.                                 <TextBlock Text="Wind Speed" FontSize="30" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="0,10,0,0" FontFamily="Roboto" FontWeight="Regular"/>
  92.                             </StackPanel>
  93.                         </StackPanel>
  94.                     </Border>
  95.                     <Border  Width=" 200" Height="200" Background="#669bbc" CornerRadius="20" Margin="35,0,50,0" Padding="10">
  96.                         <StackPanel>
  97.                             <StackPanel>
  98.                                 <Image Source="Images/pressure.png" Height="50" Width="50" HorizontalAlignment="Center" Margin="5"/>
  99.                             </StackPanel>
  100.                             <StackPanel Orientation="Horizontal" Margin="0,10,0,0" HorizontalAlignment="Center">
  101.                                 <StackPanel>
  102.                                     <TextBlock  x:Name="txtPressure" Text="{Binding CurrentWeather.Main.Pressure}" Margin="15,4,0,0" TextAlignment="Justify" FontSize="45" FontFamily="Roboto" FontWeight="Medium"/>
  103.                                 </StackPanel>
  104.                                 <StackPanel>
  105.                                     <TextBlock Text="kPa" FontSize="30" Margin="0,18,0,0" FontFamily="Roboto" FontWeight="Medium"/>
  106.                                 </StackPanel>
  107.                             </StackPanel>
  108.                             <StackPanel>
  109.                                 <TextBlock Text="Pressure" FontSize="30" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="0,10,0,0" FontFamily="Roboto" FontWeight="Regular"/>
  110.                             </StackPanel>
  111.                         </StackPanel>   
  112.                     </Border>
  113.  
  114.                 </StackPanel>
  115.             </StackPanel>
  116.  
  117.         </StackPanel>
  118.  
  119.  
  120.  
  121.  
  122.  
  123.     </Border>
  124.  
  125.  
  126.  
  127. </Window>
  128.  

Editor

You can edit this paste and save as new:


File Description
  • ltybc
  • Paste Code
  • 09 Jun-2023
  • 7.71 Kb
You can Share it: