microsoft / XamlBehaviorsWpf

Home for WPF XAML Behaviors on GitHub.
MIT License
839 stars 138 forks source link

Any issues using V 1.1.39 for .Net 7 with WPF treeview #139

Closed bob53050 closed 9 months ago

bob53050 commented 1 year ago

I have been working through an example that found on stack overflow with a WPF treeview and attempting to attach to a RelayCommand using MicrosoftCommunityToolkit.mvvm and .Net 7 but I can't seem to consistently get the command to fire.

<i:Interaction.Triggers> <i:EventTrigger EventName="SelectedItemChanged"> <i:InvokeCommandAction Command="{Binding TreeViewDirectoryItemCommand}" CommandParameter=" {Binding ElementName=DirectoryTree ,Path=SelectedItem}"/> </i:EventTrigger> </i:Interaction.Triggers>

in C#

[RelayCommand] void TreeViewDirectoryItem(object parameter) { string bob = "ok"; string name = parameter.GetType().Name; }

Any thoughts would be appreciated,

Bob

brianlagunas commented 9 months ago

There are no known issues. Since no reproduction app was provided, this issue is being closed.