Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CurrentPageChanged event crashed the XF app #20

Open
dbeylkhanov opened this issue Dec 20, 2016 · 1 comment
Open

CurrentPageChanged event crashed the XF app #20

dbeylkhanov opened this issue Dec 20, 2016 · 1 comment

Comments

@dbeylkhanov
Copy link

dbeylkhanov commented Dec 20, 2016

Hi @corcav

I have Tabbed page in my XF app

And If I attach behavior to CurrentPageChanged event, then my app at starting is crashes

See image with error below:

image

this is my xaml of tabbed page:

<TabbedPage  xmlns="http://xamarin.com/schemas/2014/forms"
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
    xmlns:views="clr-namespace:merchandise_app.Views;assembly=merchandise_app"
    xmlns:mvvm="clr-namespace:Prism.Mvvm;assembly=Prism.Forms"
    xmlns:behaviors="clr-namespace:Corcav.Behaviors;assembly=Corcav.Behaviors"
    x:Class="merchandise_app.Views.MasterDetail">
  <behaviors:Interaction.Behaviors>
    <behaviors:BehaviorCollection>
      <behaviors:EventToCommand EventName="CurrentPageChanged"  Command="{Binding NavigateCommand}" CommandParameter="PageChanged" />
    </behaviors:BehaviorCollection>
  </behaviors:Interaction.Behaviors>
@Goncharuk-Nikita
Copy link

+1, it also crashed on CarouselPage:

<base:CarouselBasePage
x:Class="MDOSchedule.UI.Pages.AllJobs.CarouselAllJobsWeekPage"
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:b="clr-namespace:Corcav.Behaviors;assembly=Corcav.Behaviors"
xmlns:base="clr-namespace:MDOSchedule.UI.Pages.Base;assembly=MDOSchedule"
xmlns:templates="clr-namespace:MDOSchedule.UI.Templates;assembly=MDOSchedule"
xmlns:week="clr-namespace:MDOSchedule.UI.Views.Week;assembly=MDOSchedule"
x:Name="This"
Title="{Binding CurrentDate, StringFormat='{0:MMMM}'}"
ItemsSource="{Binding Weeks}">

<b:Interaction.Behaviors>
	<b:BehaviorCollection>
		<b:EventToCommand
			CommandName="CurrentPageChangedCommand"
			CommandNameContext="{b:RelativeContext This}"
			EventName="CurrentPageChanged" />
	</b:BehaviorCollection>
</b:Interaction.Behaviors>

</base:CarouselBasePage>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants