wsick / Fayde

Inspired by Silverlight; XAML engine using Javascript and rendering to the HTML5 Canvas.
MIT License
189 stars 27 forks source link

Console Error on EventBinding #216

Closed JigsSodvadiya closed 8 years ago

JigsSodvadiya commented 8 years ago

TabControl and ComboBox giving Console Error when I am using EventBinding with SelectionChange event.

BSick7 commented 8 years ago

Please provide the error message and context.

JigsSodvadiya commented 8 years ago

Thanks for Reply

Message = [EVENTBINDING]: Could not find command target for event 'SelectionChanged'.

XAML: <ComboBox ItemsSource="{Binding Path=StatesResult}" Width="200" Height="36" DisplayMemberPath="Description" SelectedValuePath="Description" SelectedItem="{Binding Path=SelectedState, Mode=TwoWay}" SelectionChanged ="{EventBinding cmbSelectedItem}" />

While I am going or coming Back from this Page than giving error over console.

BSick7 commented 8 years ago

cmbSelectedItem looks like the name of another xaml element. EventBinding expects a Command which can either be an ICommand or a function.

BSick7 commented 8 years ago

Take a look at the following 2 files to see usage.

https://github.com/wsick/Fayde/blob/master/testsite/Binding/eventbinding.fap https://github.com/wsick/Fayde/blob/master/testsite/Binding/TestViewModel.ts