Effect sample Entry italic placeholder

This commit is contained in:
Depechie 2017-07-31 23:08:26 +02:00
Родитель 1bfbf38c2f
Коммит 427bb90f1d
5 изменённых файлов: 61 добавлений и 0 удалений

Просмотреть файл

@ -50,6 +50,9 @@
<Compile Include="Views\EffectsEntryDisableAutoCorrectPage.xaml.cs">
<DependentUpon>EffectsEntryDisableAutoCorrectPage.xaml</DependentUpon>
</Compile>
<Compile Include="Views\EffectsEntryItalicPlaceholderPage.xaml.cs">
<DependentUpon>EffectsEntryItalicPlaceholderPage.xaml</DependentUpon>
</Compile>
<Compile Include="Views\EffectsEntryPage.xaml.cs">
<DependentUpon>EffectsEntryPage.xaml</DependentUpon>
</Compile>
@ -152,6 +155,12 @@
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Views\EffectsEntryItalicPlaceholderPage.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
<Import Project="..\..\packages\Xamarin.Forms.2.3.4.247\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets" Condition="Exists('..\..\packages\Xamarin.Forms.2.3.4.247\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">

Просмотреть файл

@ -0,0 +1,23 @@
<?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="FormsCommunityToolkit.Samples.Views.EffectsEntryItalicPlaceholderPage"
xmlns:effects="clr-namespace:FormsCommunityToolkit.Effects;assembly=FormsCommunityToolkit.Effects"
Title="Italic placeholder entry">
<Grid Margin="10,20,10,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Label Text="Adds an italic placeholder to an Entry"
Grid.Row="0" />
<Entry Placeholder="start typing..." VerticalOptions="Start"
Margin="0,10,0,10"
Grid.Row="1">
<Entry.Effects>
<effects:EntryItalicPlaceholder />
</Entry.Effects>
</Entry>
</Grid>
</ContentPage>

Просмотреть файл

@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace FormsCommunityToolkit.Samples.Views
{
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class EffectsEntryItalicPlaceholderPage : ContentPage
{
public EffectsEntryItalicPlaceholderPage ()
{
InitializeComponent ();
}
}
}

Просмотреть файл

@ -8,6 +8,7 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Button Text="Capitalize keyboard effect"
@ -19,5 +20,8 @@
<Button Text="Disable auto correct effect"
Clicked="OnDisableAutoCorrectButtonClicked"
Grid.Row="2" />
<Button Text="Italic placeholder effect"
Clicked="OnItalicPlaceholderButtonClicked"
Grid.Row="3" />
</Grid>
</ContentPage>

Просмотреть файл

@ -24,5 +24,10 @@ namespace FormsCommunityToolkit.Samples.Views
{
await Navigation.PushAsync(new EffectsEntryDisableAutoCorrectPage());
}
private async void OnItalicPlaceholderButtonClicked(object sender, System.EventArgs e)
{
await Navigation.PushAsync(new EffectsEntryItalicPlaceholderPage());
}
}
}