Skip to content
Permalink
Browse files
add
  • Loading branch information
ezeobio committed Nov 19, 2020
1 parent 8f1ae83 commit f84c178084c8fd0cb2f43e8062662d839d28f46e
Show file tree
Hide file tree
Showing 7 changed files with 139 additions and 0 deletions.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,20 @@
using System;
using System.Collections.ObjectModel;
using System.Windows.Input;
using InfoBlog.Models;
using Xamarin.Forms;

namespace InfoBlog.ViewModel
{
public class BlogPostViewModel
{
public ObservableCollection<PostForm>
PostList{ get; set; }
public BlogPostViewModel()
{
PostList = new ObservableCollection<PostForm>();
PostList.Add(new PostForm { Topic = "Topic.Text", Image = "Image.Text", Contents = "Contents.Text", User = "User.Text" });
}

}
}
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="InfoBlog.Views.BlogPageDetail"
xmlns:controls="clr-namespace:ImageCircle.Forms.Plugin.Abstractions;assembly=ImageCircle.Forms.Plugin ">
<ContentPage.Content>
<ScrollView x:Name="MainScroll" VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand">
<StackLayout BackgroundColor="#211F55">
<Label x:Name="BlogTopic" Margin="8,5" TextColor="Yellow" HorizontalTextAlignment="Center" FontSize="Caption"/>
<Image x:Name="BlogImage" RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent,
ElementName=SearchControlsGrid,
Property=Width,
Factor=1, Constant=0}"
RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent,
ElementName=SearchControlsGrid,
Property=Height,
Factor=1, Constant=0}" Aspect="AspectFill"/>


<Frame BackgroundColor="Chartreuse">
<Label x:Name="BlogContent" Margin="20,10" FontSize="Small" TextColor="Red"/>
</Frame>
<Label x:Name="BlogUser" TextColor="Gray" FontSize="Small"/>
</StackLayout>
</ScrollView>
</ContentPage.Content>
</ContentPage>
@@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using InfoBlog.Models;
using SQLite;
using Xamarin.Forms;

namespace InfoBlog.Views
{
public partial class BlogPageDetail : ContentPage
{
public BlogPageDetail()
{
InitializeComponent();
}

public BlogPageDetail(string Topic, string Image, string Contents, string User)
{
InitializeComponent();
BlogTopic.Text = Topic;
BlogContent.Text = Contents;
BlogUser.Text = User;
BlogImage.Source = new UriImageSource()
{
Uri = new Uri(Image)
};
}
}
}
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="InfoBlog.Views.WelcomePage">
<ContentPage.Resources>
<!-- Implicit styles -->
<Style TargetType="{x:Type Editor}">
<Setter Property="BackgroundColor"
Value="{StaticResource AppBackgroundColor}"/>
</Style>
<Style TargetType="Button"
ApplyToDerivedTypes="True"
CanCascade="True">
<Setter Property="FontSize" Value="17" />
<Setter Property="FontAttributes" Value="Bold" />
<Setter Property="BackgroundColor" Value="#1976D2" />
<Setter Property="TextColor" Value="White" />
<Setter Property="CornerRadius" Value="5" />
<Setter Property="Padding" Value="10, 0, 10, 0"/>
</Style>
</ContentPage.Resources>
<ContentPage.ToolbarItems >
<ToolbarItem Text="Login" Clicked="LoginBtn"/>
<ToolbarItem Text="Register" Clicked="RegisterBtn"/>
</ContentPage.ToolbarItems>

<ContentPage.Content >
<StackLayout BackgroundColor="#211F55">
<Image Source="heart.jpg"/>
<Label Text="Welcome to InfoBlog..." TextColor="White" FontAttributes="Bold" FontSize="Title" HorizontalTextAlignment="Center"/>
<Label Text="To View Exciting Content, You Have to Login or register if you're new" TextColor="Yellow" HorizontalTextAlignment="Center" FontAttributes="Italic"/>
<Frame BackgroundColor="#F8F8F5">
<Label Text="Get the best and latest Gists in Politics, Sports, Relationships, Marriages, Entertainment, Animals, Life Issues, Daily Events
Health, Career and so on.
Login or Register to explore our scintilating contents" VerticalTextAlignment="Center" HorizontalTextAlignment="Center" FontSize="16" TextColor="Black"/>
</Frame>
</StackLayout>
</ContentPage.Content>
</ContentPage>
@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using InfoBlog.Views;

using Xamarin.Forms;

namespace InfoBlog.Views
{
public partial class WelcomePage : ContentPage
{
public WelcomePage()
{
InitializeComponent();
}
void RegisterBtn(object sender, System.EventArgs e)
{
Navigation.PushAsync(new Register());
}
void LoginBtn(object Sender, System.EventArgs e)
{

Navigation.PushAsync(new Login());


}

}
}

0 comments on commit f84c178

Please sign in to comment.