Skip to content

Commit

Permalink
xamarin forms xaml navigation animated
Browse files Browse the repository at this point in the history
  • Loading branch information
bares43 committed Feb 8, 2019
1 parent 388d709 commit 4caf26b
Show file tree
Hide file tree
Showing 10 changed files with 2,229 additions and 178 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="3.3.0.967583" />
<PackageReference Include="Xamarin.Forms" Version="3.5.0.129452" />
<PackageReference Include="Xamarin.Android.Support.Design" Version="27.0.2.1" />
<PackageReference Include="Xamarin.Android.Support.v7.AppCompat" Version="27.0.2.1" />
<PackageReference Include="Xamarin.Android.Support.v4" Version="27.0.2.1" />
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
</Page>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="3.3.0.967583" />
<PackageReference Include="Xamarin.Forms" Version="3.5.0.129452" />
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="6.1.7" />
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
<Reference Include="Xamarin.iOS" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="3.3.0.967583" />
<PackageReference Include="Xamarin.Forms" Version="3.5.0.129452" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="3.3.0.967583" />
<PackageReference Include="Xamarin.Forms" Version="3.5.0.129452" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<Button Text="ViewB" Command="{Binding NavigateCommand}" CommandParameter="MyTabbedPage?selectedTab=ViewB" />
<Button Text="ViewC" Command="{Binding NavigateCommand}" CommandParameter="MyTabbedPage?selectedTab=ViewC" />
<Button Text="XamlNav" Command="{nav:NavigateTo 'MyNavigationPage/ViewA'}" />
<Button Text="XamlNav wihout animation" Command="{nav:NavigateTo 'MyNavigationPage/ViewA', Animated=False}" />
</StackLayout>
</ContentPage>
</MasterDetailPage.Master>
Expand Down
2 changes: 1 addition & 1 deletion Sandbox/Xamarin/HelloWorld/ModuleA/ModuleA.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="3.3.0.967583" />
<PackageReference Include="Xamarin.Forms" Version="3.5.0.129452" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ protected override async Task HandleNavigation(INavigationParameters parameters,
{
var result = GoBackType == GoBackType.ToRoot ?
await navigationService.GoBackToRootAsync(parameters) :
await navigationService.GoBackAsync(parameters);
await navigationService.GoBackAsync(parameters, animated: Animated);

if (result.Exception != null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class NavigateToExtension : NavigationExtensionBase

protected override async Task HandleNavigation(INavigationParameters parameters, INavigationService navigationService)
{
var result = await navigationService.NavigateAsync(Name, parameters);
var result = await navigationService.NavigateAsync(Name, parameters, animated: Animated);
if(result.Exception != null)
{
Log(result.Exception);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ protected internal get
set => _sourcePage = value;
}

public bool Animated { get; set; } = true;

public bool CanExecute(object parameter) => !IsNavigating;

public event EventHandler CanExecuteChanged;
Expand Down

0 comments on commit 4caf26b

Please sign in to comment.