Creating base app, including search bar
This commit is contained in:
parent
13f578641a
commit
d5b5006553
|
@ -1,4 +1,6 @@
|
|||
namespace MAUI_Weather;
|
||||
using MAUI_Weather.MVVM.Views;
|
||||
|
||||
namespace MAUI_Weather;
|
||||
|
||||
public partial class App : Application
|
||||
{
|
||||
|
@ -6,6 +8,6 @@ public partial class App : Application
|
|||
{
|
||||
InitializeComponent();
|
||||
|
||||
MainPage = new AppShell();
|
||||
MainPage = new WeatherView();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,8 +54,12 @@
|
|||
|
||||
<ItemGroup>
|
||||
<Folder Include="MVVM\Models\" />
|
||||
<Folder Include="MVVM\Views\" />
|
||||
<Folder Include="MVVM\ViewModels\" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<MauiXaml Update="MVVM\Views\WeatherView.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</MauiXaml>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MAUI_Weather.MVVM.ViewModels
|
||||
{
|
||||
public class WeatherViewModel
|
||||
{
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="MAUI_Weather.MVVM.Views.WeatherView"
|
||||
Title="WeatherView">
|
||||
|
||||
<Grid Margin="15" RowDefinitions=".08*,.1*,.5*,.1*,.3*">
|
||||
<Grid>
|
||||
<Frame/>
|
||||
<SearchBar Placeholder="Search" VerticalOptions="Center"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</ContentPage>
|
|
@ -0,0 +1,12 @@
|
|||
using MAUI_Weather.MVVM.ViewModels;
|
||||
|
||||
namespace MAUI_Weather.MVVM.Views;
|
||||
|
||||
public partial class WeatherView : ContentPage
|
||||
{
|
||||
public WeatherView()
|
||||
{
|
||||
InitializeComponent();
|
||||
BindingContext = new WeatherViewModel();
|
||||
}
|
||||
}
|
|
@ -4,6 +4,11 @@
|
|||
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
|
||||
|
||||
<!--
|
||||
https://colorhunt.co/palette/0c134f1d267d5c469cd4adfc
|
||||
-->
|
||||
<Color x:Key="Darkblue">#0c134f</Color>
|
||||
|
||||
<Color x:Key="Primary">#512BD4</Color>
|
||||
<Color x:Key="Secondary">#DFD8F7</Color>
|
||||
<Color x:Key="Tertiary">#2B0B98</Color>
|
||||
|
|
|
@ -373,7 +373,7 @@
|
|||
|
||||
<Style TargetType="Page" ApplyToDerivedTypes="True">
|
||||
<Setter Property="Padding" Value="0"/>
|
||||
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource Black}}" />
|
||||
<Setter Property="BackgroundColor" Value="{StaticResource Darkblue}" />
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Shell" ApplyToDerivedTypes="True">
|
||||
|
|
Loading…
Reference in New Issue