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
|
# Autosave files
|
||||||
*~
|
*~
|
||||||
|
.vs/
|
||||||
|
|
||||||
# build
|
# build
|
||||||
[Oo]bj/
|
[Oo]bj/
|
||||||
|
|
|
@ -2,8 +2,12 @@
|
||||||
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
|
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
x:Class="ButtonXaml.ButtonXamlPage">
|
x:Class="ButtonXaml.ButtonXamlPage">
|
||||||
|
|
||||||
<Button Text="Tap for click count!"
|
<StackLayout Padding="20">
|
||||||
Clicked="OnButtonClicked" />
|
<Label Text="Welcome to Xamarin.Forms!"/>
|
||||||
|
<Label x:Name="LabelCount" Text="Click Count: 0"/>
|
||||||
</ContentPage>
|
<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)
|
public void OnButtonClicked(object sender, EventArgs args)
|
||||||
{
|
{
|
||||||
count++;
|
count++;
|
||||||
|
LabelCount.Text = $"Click Count: {count}";
|
||||||
((Button)sender).Text =
|
|
||||||
String.Format("{0} click{1}!", count, count == 1 ? "" : "s");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,12 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<EmbeddedResource Include="**/*.xaml" />
|
<EmbeddedResource Include="**/*.xaml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Update="ButtonXamlPage.xaml">
|
||||||
|
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
|
||||||
|
</EmbeddedResource>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
|
|
Loading…
Reference in New Issue