Skip to content
This repository has been archived by the owner on May 19, 2020. It is now read-only.

Commit

Permalink
Separating GlyphList, so that it will work with VS 2017
Browse files Browse the repository at this point in the history
  • Loading branch information
thudugala committed Jul 16, 2019
1 parent 3158663 commit d2d6b6f
Show file tree
Hide file tree
Showing 8 changed files with 670 additions and 636 deletions.
439 changes: 439 additions & 0 deletions Source/Plugin.Glypher.FontAwesome5Free/GlyphListBrand.cs

Large diffs are not rendered by default.

164 changes: 164 additions & 0 deletions Source/Plugin.Glypher.FontAwesome5Free/GlyphListRegular.cs

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Product>$(AssemblyName) ($(TargetFramework))</Product>
<DefaultLanguage>en-US</DefaultLanguage>
Expand All @@ -20,7 +20,7 @@
<Description>This plugin extend support for font glyphs (font icons) using FontAwesomeFree in Xamarin.Forms applications.</Description>
<PackageIconUrl>https://raw.githubusercontent.com/thudugala/Plugin.Glypher/master/screenshots/fontAwesomeIcon.png</PackageIconUrl>
<Copyright>Copyright © Elvin (Tharindu) Thudugala</Copyright>
<Version>5.9.0</Version>
<Version>5.9.0.1</Version>
<PackageReleaseNotes>Check: https://github.com/thudugala/Plugin.Glypher/releases </PackageReleaseNotes>
<owners>ththlk</owners>

Expand All @@ -39,5 +39,4 @@
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta2-19351-01" PrivateAssets="All" />
<PackageReference Include="Plugin.Glypher" Version="1.0.1" />
</ItemGroup>

</Project>
</Project>
2 changes: 2 additions & 0 deletions sample/Direct/Sample.sln.DotSettings
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/UserDictionary/Words/=Glypher/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
4 changes: 3 additions & 1 deletion sample/Direct/Sample/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ public App()
//GlyphRegister.Current.Init(typeof(Plugin.Glypher.FontAwesome5Pro.GlyphListLight));
//GlyphRegister.Current.Init(typeof(Plugin.Glypher.FontAwesome5Pro.GlyphListRegular));
//GlyphRegister.Current.Init(typeof(Plugin.Glypher.FontAwesome5Pro.GlyphListSolid));
GlyphRegister.Current.Init(typeof(Plugin.Glypher.FontAwesome5Free.GlyphList));
GlyphRegister.Current.Init(typeof(Plugin.Glypher.FontAwesome5Free.GlyphListBrand));
GlyphRegister.Current.Init(typeof(Plugin.Glypher.FontAwesome5Free.GlyphListRegular));
GlyphRegister.Current.Init(typeof(Plugin.Glypher.FontAwesome5Free.GlyphListSolid));
GlyphRegister.Current.Init(typeof(Plugin.Glypher.WeatherIcons.GlyphList));

InitializeComponent();
Expand Down
95 changes: 54 additions & 41 deletions sample/Direct/Sample/MainPage.xaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
<?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:local="clr-namespace:Sample"
xmlns:fontAwesome5Free="clr-namespace:Plugin.Glypher.FontAwesome5Free;assembly=Plugin.Glypher.FontAwesome5Free"
xmlns:weatherIcons="clr-namespace:Plugin.Glypher.WeatherIcons;assembly=Plugin.Glypher.WeatherIcons"
xmlns:glypher="clr-namespace:Plugin.Glypher;assembly=Plugin.Glypher"
xmlns:ios="clr-namespace:Xamarin.Forms.PlatformConfiguration.iOSSpecific;assembly=Xamarin.Forms.Core"
ios:Page.UseSafeArea="True"
x:Class="Sample.MainPage">
<ContentPage
x:Class="Sample.MainPage"
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:fontAwesome5Free="clr-namespace:Plugin.Glypher.FontAwesome5Free;assembly=Plugin.Glypher.FontAwesome5Free"
xmlns:glypher="clr-namespace:Plugin.Glypher;assembly=Plugin.Glypher"
xmlns:ios="clr-namespace:Xamarin.Forms.PlatformConfiguration.iOSSpecific;assembly=Xamarin.Forms.Core"
xmlns:local="clr-namespace:Sample"
xmlns:weatherIcons="clr-namespace:Plugin.Glypher.WeatherIcons;assembly=Plugin.Glypher.WeatherIcons"
ios:Page.UseSafeArea="True">

<NavigationPage.TitleView>
<Grid>
Expand All @@ -24,22 +25,25 @@
</Grid.Resources>

<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>

<Label Grid.Column="0" Style="{StaticResource ToolbarTitle}" Text="Title" />
<Label
Grid.Column="0"
Style="{StaticResource ToolbarTitle}"
Text="Title" />
<StackLayout Grid.Column="1" Orientation="Horizontal">
<StackLayout.Resources>
<ResourceDictionary>
<Style TargetType="Label" BasedOn="{StaticResource ToolbarTitle}">
<Style BasedOn="{StaticResource ToolbarTitle}" TargetType="Label">
<Setter Property="Margin" Value="5,0" />
<Setter Property="FontSize" Value="Large" />
</Style>
</ResourceDictionary>
</StackLayout.Resources>

<Label x:Name="ToolbarItemLabel" glypher:FontGlyph.Glyph="{x:Static fontAwesome5Free:GlyphList.Fas_Redo}">
<Label x:Name="ToolbarItemLabel" glypher:FontGlyph.Glyph="{x:Static fontAwesome5Free:GlyphListSolid.Fas_Redo}">
<Label.GestureRecognizers>
<TapGestureRecognizer Tapped="Redo_Tapped" />
</Label.GestureRecognizers>
Expand All @@ -49,39 +53,48 @@
</NavigationPage.TitleView>

<StackLayout>
<Label Text="Welcome to Plugin Glypher!"
HorizontalOptions="Center"
VerticalOptions="CenterAndExpand" />
<Label
HorizontalOptions="Center"
Text="Welcome to Plugin Glypher!"
VerticalOptions="CenterAndExpand" />

<Label glypher:FontGlyph.Glyph="{x:Static weatherIcons:GlyphList.Wi_Cloudy}"
TextColor="Purple"
FontSize="48"
HorizontalOptions="Center"
VerticalOptions="CenterAndExpand" />
<Label
glypher:FontGlyph.Glyph="{x:Static weatherIcons:GlyphList.Wi_Cloudy}"
FontSize="48"
HorizontalOptions="Center"
TextColor="Purple"
VerticalOptions="CenterAndExpand" />

<Label x:Name="Label1" glypher:FontGlyph.Glyph="{x:Static fontAwesome5Free:GlyphList.Fab_Bluetooth}"
FontSize="48"
TextColor="CornflowerBlue"
HorizontalOptions="Center"
VerticalOptions="CenterAndExpand" />
<Label x:Name="Label2" glypher:FontGlyph.Glyph="far-angry"
FontSize="48"
TextColor="LightSeaGreen"
HorizontalOptions="Center"
VerticalOptions="CenterAndExpand" />
<Label
x:Name="Label1"
glypher:FontGlyph.Glyph="{x:Static fontAwesome5Free:GlyphListBrand.Fab_Bluetooth}"
FontSize="48"
HorizontalOptions="Center"
TextColor="CornflowerBlue"
VerticalOptions="CenterAndExpand" />
<Label
x:Name="Label2"
glypher:FontGlyph.Glyph="far-angry"
FontSize="48"
HorizontalOptions="Center"
TextColor="LightSeaGreen"
VerticalOptions="CenterAndExpand" />

<Button x:Name="Button1" glypher:FontGlyph.Glyph="{x:Static fontAwesome5Free:GlyphList.Fab_Bitcoin}"
FontSize="48"
TextColor="IndianRed"
HorizontalOptions="Center"
VerticalOptions="CenterAndExpand" />
<Button
x:Name="Button1"
glypher:FontGlyph.Glyph="{x:Static fontAwesome5Free:GlyphListBrand.Fab_Bitcoin}"
FontSize="48"
HorizontalOptions="Center"
TextColor="IndianRed"
VerticalOptions="CenterAndExpand" />

<Image HorizontalOptions="Center"
VerticalOptions="CenterAndExpand">
<Image HorizontalOptions="Center" VerticalOptions="CenterAndExpand">
<Image.Source>
<FontImageSource Size="48" Color="Orange" glypher:FontGlyph.Glyph="{x:Static fontAwesome5Free:GlyphList.Far_Bell_Slash}" />
<FontImageSource
glypher:FontGlyph.Glyph="{x:Static fontAwesome5Free:GlyphListRegular.Far_Bell_Slash}"
Size="48"
Color="Orange" />
</Image.Source>
</Image>
</StackLayout>

</ContentPage>
</ContentPage>
6 changes: 3 additions & 3 deletions sample/Direct/Sample/MainPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ private void Redo_Tapped(object sender, EventArgs e)
ToolbarItemLabel.TextColor = ToolbarItemLabel.TextColor == toolbarItemLabelColor ? Color.GreenYellow : toolbarItemLabelColor;

var oldValueLabel1 = FontGlyph.GetGlyph(Label1);
FontGlyph.SetGlyph(Label1, oldValueLabel1 == GlyphList.Fab_Bluetooth ? GlyphList.Fab_Adobe : GlyphList.Fab_Bluetooth);
FontGlyph.SetGlyph(Label1, oldValueLabel1 == GlyphListBrand.Fab_Bluetooth ? GlyphListBrand.Fab_Adobe : GlyphListBrand.Fab_Bluetooth);

var oldValueLabel2 = FontGlyph.GetGlyph(Label2);
FontGlyph.SetGlyph(Label2, oldValueLabel2 == GlyphList.Far_Angry ? GlyphList.Far_Address_Book : GlyphList.Far_Angry);
FontGlyph.SetGlyph(Label2, oldValueLabel2 == GlyphListRegular.Far_Angry ? GlyphListRegular.Far_Address_Book : GlyphListRegular.Far_Angry);
}
}
}
}

0 comments on commit d2d6b6f

Please sign in to comment.