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

Null value in expression #17

Closed
CreateLab opened this issue Sep 9, 2019 · 2 comments
Closed

Null value in expression #17

CreateLab opened this issue Sep 9, 2019 · 2 comments
Labels

Comments

@CreateLab
Copy link

try to bind like in your sample

<ListBox x:Name="listBox" Grid.Row="3" Grid.Column="1" Items="{Binding Collection}"
                 SelectedItem="{Binding ShowObject}" >
            <i:Interaction.Behaviors>
                <ia:EventTriggerBehavior EventName="DoubleTapped" SourceObject="{Binding #listBox}">
                    <ia:InvokeCommandAction Command="{Binding EnterClickCommand}" />
                </ia:EventTriggerBehavior>
            </i:Interaction.Behaviors>
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                        <Image Source="{Binding Bitmap}" MaxHeight="25" MaxWidth="25" />
                        <TextBlock Text="{Binding Name}" />
                    </StackPanel>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>

but have an exception in debug output
[Binding] Error in binding to "Avalonia.Xaml.Interactions.Core.InvokeCommandAction"."Command": "Null value in expression ''." (Avalonia.Xaml.Interactions.Core.InvokeCommandAction #63183526)

use Avalonia 0.8.999
use behaviors 0.9.0

@wieslawsoltes
Copy link
Contributor

@CreateLab Where is the EnterClickCommand defined?

@CreateLab
Copy link
Author

CreateLab commented Sep 26, 2019

@wieslawsoltes open agein and if u can contact with me in gitter
in vm

 public ReactiveCommand<Unit,Unit> DownloadFileCommand { get; }
        public ReactiveCommand<Unit,Unit> EnterClickCommand { get; }
   EnterClickCommand = ReactiveCommand.Create(() => Console.Write("fsdfsd"));

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

No branches or pull requests

2 participants