Merge pull request #28 from jamesmontemagno/master
Cleanup xaml page and added design time xaml
This commit is contained in:
commit
ac7662ef4d
|
@ -3,6 +3,7 @@
|
|||
|
||||
# Autosave files
|
||||
*~
|
||||
.vs/
|
||||
|
||||
# build
|
||||
[Oo]bj/
|
||||
|
|
|
@ -3,7 +3,11 @@
|
|||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="ButtonXaml.ButtonXamlPage">
|
||||
|
||||
<StackLayout Padding="20">
|
||||
<Label Text="Welcome to Xamarin.Forms!"/>
|
||||
<Label x:Name="LabelCount" Text="Click Count: 0"/>
|
||||
<Button Text="Tap for click count!"
|
||||
HeightRequest="30"
|
||||
Clicked="OnButtonClicked" />
|
||||
|
||||
</StackLayout>
|
||||
</ContentPage>
|
|
@ -15,9 +15,8 @@ namespace ButtonXaml
|
|||
public void OnButtonClicked(object sender, EventArgs args)
|
||||
{
|
||||
count++;
|
||||
LabelCount.Text = $"Click Count: {count}";
|
||||
|
||||
((Button)sender).Text =
|
||||
String.Format("{0} click{1}!", count, count == 1 ? "" : "s");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,6 +17,12 @@
|
|||
<EmbeddedResource Include="**/*.xaml" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Update="ButtonXamlPage.xaml">
|
||||
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
|
|
Loading…
Reference in New Issue