Skip to content

Releases: microsoft/XamlBehaviorsWpf

Behaviors 1.1.135

09 Sep 18:30
1a72a76
Compare
Choose a tag to compare

What's Changed

This release fixes an issue with Keytriggers not firing when the ALT modifier is used:

  • Fixed KeyTrigger where the Alt key was being seen as Key.System by @brianlagunas in #176

Full Changelog: v1.1.122...v1.1.135

Behaviors 1.1.122

03 Jun 21:19
Compare
Choose a tag to compare

What's Changed

This release fixes an issue in the XAMLBehaviorsSample.InvokeCommandControl Binding:

  • Updating the command parameter binding for the ColorCommand property so null isn't being passed as the parameter value by @smeddows in #145

Full Changelog: v1.1.77...v1.1.122

Behaviors 1.1.77

28 Oct 03:09
b66c1ee
Compare
Choose a tag to compare

What's Changed

This release avoids a reference to Microsoft.Xaml.Behaviors.DesignTools getting added in legacy-style .NET Framework projects:

  • Remove Microsoft.Xaml.Behaviors.DesignTools in install.ps1 by @mgoertz-msft in #143

Full Changelog: v1.1.75...v1.1.77

Behaviors 1.1.75

26 Oct 17:57
d950cf1
Compare
Choose a tag to compare

What's Changed

New Contributors

  • @mgoertz-msft made their first contribution in #129
  • @microsoft-github-policy-service made their first contribution in #135

Full Changelog: v1.1.39...v1.1.75

Behaviors 1.1.39

10 Jun 15:07
6c12334
Compare
Choose a tag to compare

What's Changed

  • Updated symbols to be non-portable pdbs to enable symbol resolution with symchk.

Full Changelog: v1.1.37...v1.1.39

Behaviors 1.1.37

10 Jun 15:06
Compare
Choose a tag to compare

What's Changed

  • Package includes correctly Authenticode signed assemblies.

Full Changelog: v1.1.31...v1.1.37

Behaviors 1.1.31

10 Jun 15:03
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.1.19...v1.1.31

Behaviors 1.1.19

16 Jan 01:37
b88a49d
Compare
Choose a tag to compare

Change Log

  • #11 DataTrigger - Evaluate the binding's initial value like WPF

Additional Info

  • .Design assemblies are de-referenced during NuGet package installation.
  • This release aligns with the 1.1.19 NuGet release

Behaviors 1.1.3

28 Oct 16:05
f1aa06d
Compare
Choose a tag to compare

Change Log

  • #8: LaunchUriOrFileAction fails in .NET Core 3
  • #12: InvokeCommandAction - add additional properties for more MVVM scenarios
  • #13: .NET Core 3 Support
  • #29: Suggest to change XmlnsPrefix casing to lowercase. (Change XamlPrefix to "b")

Additional Info

InvokeCommandAction - add additional properties for more MVVM scenarios

Properties Added:

  • EventArgsConverter: Instance of IValueConverter that converts the EventArgs into a more MVVM friendly value
  • EventArgsConverterParameter: the parameter that will be sent as the parameter argument to IValueConverter.Convert method
  • EventArgsParameterPath: parameter path to extract a property from the EventArgs that will be passed to ICommand
  • PassEventArgsToCommand: forces the EventArgs to be passed to the ICommand if the other properties are null

EventArgsConverter

Using the EventArgsConverter to retrieve the ItemTappedEventArgs.Item property.

public class ItemTappedEventArgsConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            var itemTappedEventArgs = value as ItemTappedEventArgs;
            if (itemTappedEventArgs == null)
            {
                throw new ArgumentException("Expected value to be of type ItemTappedEventArgs", nameof(value));
            }
            return itemTappedEventArgs.Item;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }

In XAML, add a reference to the converter and the converter resource need to be defined

<b:InvokeCommandAction Command="{Binding ItemTappedCommand}"
                        EventArgsConverter="{StaticResource itemTappedEventArgsConverter}" />

EventArgsParameterPath

Sample EventArgs

public class ItemTappedEventArgs : EventArgs
{
    public object Item { get; }
    public object Group { get; }
}

Setting EventArgsParameterPath to Item will extract the property value and pass it to the ICommand

<b:InvokeCommandAction Command="{Binding ItemTappedCommand}"
                                         EventArgsParameterPath="Item" />

Nested properties are also supported:

<b:InvokeCommandAction Command="{Binding ItemTappedCommand}"
                                         EventArgsParameterPath="Item.SubItem.SubProperty" />

Behaviors 1.0.1

11 Dec 20:19
50e85b3
Compare
Choose a tag to compare

Initial release of the WPF Behaviors