Skip to content

Commit

Permalink
Update sample
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmontemagno committed Jan 8, 2019
1 parent 4217e7d commit 53be736
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 99 deletions.
5 changes: 4 additions & 1 deletion Droid/RefreshSample.Droid.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@
<AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
<ConsolePause>false</ConsolePause>
<AndroidSupportedAbis>armeabi-v7a;x86</AndroidSupportedAbis>
<AotAssemblies>false</AotAssemblies>
<EnableLLVM>false</EnableLLVM>
<BundleAssemblies>false</BundleAssemblies>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
Expand Down Expand Up @@ -98,7 +101,7 @@
<Version>0.4.7</Version>
</PackageReference>
<PackageReference Include="Xamarin.Forms">
<Version>3.4.0.1008975</Version>
<Version>3.4.0.1009999</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
<Version>0.4.7</Version>
</PackageReference>
<PackageReference Include="Xamarin.Forms">
<Version>3.4.0.1008975</Version>
<Version>3.4.0.1009999</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard1.0</TargetFramework>
Expand All @@ -15,7 +15,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="3.4.0.1008975" />
<PackageReference Include="Xamarin.Forms" Version="3.4.0.1009999" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion PullToRefresh/PullToRefresh.iOS/PullToRefresh.iOS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms">
<Version>3.4.0.1008975</Version>
<Version>3.4.0.1009999</Version>
</PackageReference>
</ItemGroup>
</Project>
101 changes: 13 additions & 88 deletions RefreshSample/RefreshSample.csproj
Original file line number Diff line number Diff line change
@@ -1,95 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\Xamarin.Forms.3.4.0.1008975\build\Xamarin.Forms.props" Condition="Exists('..\packages\Xamarin.Forms.3.4.0.1008975\build\Xamarin.Forms.props')" />
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<ProjectGuid>{E8A3B142-4FDA-44D2-AC4C-2578150D4E27}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>RefreshSample</RootNamespace>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>RefreshSample</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkProfile>Profile78</TargetFrameworkProfile>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug</OutputPath>
<DefineConstants>DEBUG;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
<RootNamespace>RefreshSample</RootNamespace>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<AssemblyFileVersion>1.0.0.0</AssemblyFileVersion>
<Version>1.0.0.0</Version>
</PropertyGroup>

<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="App.cs" />
<Compile Include="ViewModels\TestViewModel.cs" />
<Compile Include="Views\DisposeCrashPage.cs" />
<Compile Include="Views\ListViewPage.cs" />
<Compile Include="Views\ScrollViewPageManual.cs" />
<Compile Include="Views\ScrollViewPage.cs" />
<Compile Include="Views\StackLayoutPage.cs" />
<Compile Include="Views\GridPage.cs" />
<Compile Include="Views\ScrollViewXamlPage.xaml.cs">
<DependentUpon>ScrollViewXamlPage.xaml</DependentUpon>
</Compile>
<Compile Include="Views\TabbedPage1.xaml.cs">
<DependentUpon>TabbedPage1.xaml</DependentUpon>
</Compile>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
<Import Project="..\packages\Xamarin.Forms.2.0.1.6505\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets" Condition="Exists('..\packages\Xamarin.Forms.2.0.1.6505\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets')" />
<ItemGroup>
<EmbeddedResource Include="Views\ScrollViewXamlPage.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
<LogicalName>ScrollViewXamlPage.xaml</LogicalName>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="Xamarin.Forms.Core, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Xamarin.Forms.3.4.0.1008975\lib\netstandard1.0\Xamarin.Forms.Core.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Forms.Platform, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Xamarin.Forms.3.4.0.1008975\lib\netstandard1.0\Xamarin.Forms.Platform.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Forms.Xaml, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Xamarin.Forms.3.4.0.1008975\lib\netstandard1.0\Xamarin.Forms.Xaml.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Views\TabbedPage1.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\PullToRefresh\PullToRefresh.Standard\PullToRefresh.Standard.csproj">
<Project>{10ab134c-d1b9-4589-8121-3ceb3d21d096}</Project>
<Name>PullToRefresh.Standard</Name>
</ProjectReference>
<PackageReference Include="Xamarin.Forms" Version="3.4.0.1009999" />
</ItemGroup>

<ItemGroup>
<None Include="packages.config" />
<ProjectReference Include="..\PullToRefresh\PullToRefresh.Standard\PullToRefresh.Standard.csproj" />
</ItemGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Xamarin.Forms.3.4.0.1008975\build\Xamarin.Forms.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Xamarin.Forms.3.4.0.1008975\build\Xamarin.Forms.props'))" />
<Error Condition="!Exists('..\packages\Xamarin.Forms.3.4.0.1008975\build\Xamarin.Forms.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Xamarin.Forms.3.4.0.1008975\build\Xamarin.Forms.targets'))" />
</Target>
<Import Project="..\packages\Xamarin.Forms.3.4.0.1008975\build\Xamarin.Forms.targets" Condition="Exists('..\packages\Xamarin.Forms.3.4.0.1008975\build\Xamarin.Forms.targets')" />
</Project>

</Project>
12 changes: 7 additions & 5 deletions RefreshSample/Views/ListViewPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ public ListViewPage(bool insideLayout)
//listView.SetBinding<TestViewModel>(ListView.IsRefreshingProperty, vm => vm.IsBusy, BindingMode.OneWay);
//listView.SetBinding<TestViewModel>(ListView.RefreshCommandProperty, vm => vm.RefreshCommand);

listView.SetBinding<TestViewModel> (ItemsView<Cell>.ItemsSourceProperty, vm => vm.Items);


listView.SetBinding(ItemsView<Cell>.ItemsSourceProperty, new Binding("Items"));

//ListView now has a built in pull to refresh!
//You most likely could disable the listview pull to refresh and re-enable this
Expand All @@ -54,7 +56,7 @@ public ListViewPage(bool insideLayout)
Text = "In a StackLayout",
FontSize = Device.GetNamedSize (NamedSize.Large, typeof(Label)),
BackgroundColor = Color.FromHex("#3498db"),
XAlign = TextAlignment.Center,
VerticalTextAlignment = TextAlignment.Center,
HorizontalOptions = LayoutOptions.FillAndExpand
},
listView
Expand All @@ -63,8 +65,8 @@ public ListViewPage(bool insideLayout)
RefreshColor = Color.FromHex("#3498db")
};

refreshView.SetBinding<TestViewModel> (PullToRefreshLayout.IsRefreshingProperty, vm => vm.IsBusy);
refreshView.SetBinding<TestViewModel>(PullToRefreshLayout.RefreshCommandProperty, vm => vm.RefreshCommand);
refreshView.SetBinding(PullToRefreshLayout.IsRefreshingProperty, new Binding("IsBusy"));
refreshView.SetBinding(PullToRefreshLayout.RefreshCommandProperty, new Binding("RefreshCommand"));


if (insideLayout)
Expand All @@ -80,7 +82,7 @@ public ListViewPage(bool insideLayout)
Text = "In a StackLayout",
FontSize = Device.GetNamedSize (NamedSize.Large, typeof(Label)),
BackgroundColor = Color.FromHex("#3498db"),
XAlign = TextAlignment.Center,
VerticalTextAlignment = TextAlignment.Center,
HorizontalOptions = LayoutOptions.FillAndExpand
},
refreshView
Expand Down
2 changes: 1 addition & 1 deletion iOS/RefreshSample.iOS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms">
<Version>3.4.0.1008975</Version>
<Version>3.4.0.1009999</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
Expand Down

0 comments on commit 53be736

Please sign in to comment.