Releases: microsoft/XamlBehaviorsWpf
Behaviors 1.1.135
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
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
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
What's Changed
- Upgrade to .NET 4.6.2 by @brianlagunas in #118
- Fixed #107 by @brianlagunas in #119
- Fixed KeyTrigger modifier keys by @brianlagunas in #121
- Upgrade Behaviors to .NET 6.0 by @brianlagunas in #122
- Adding tests to GitHub Action by @brianlagunas in #125
- Removed use of MSBuild.Sdk.Extras by @brianlagunas in #127
- Updated EventTriggerTests by @mgoertz-msft in #129
- Make TriggerCollection constructor public by @mgoertz-msft in #130
- Updated DesignTools project's output path by @brianlagunas in #131
- Added DesignTools.dll to net462 TFM by @brianlagunas in #133
- House Keeping by @brianlagunas in #134
- Adding Microsoft SECURITY.MD by @microsoft-github-policy-service in #135
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
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
What's Changed
- Package includes correctly Authenticode signed assemblies.
Full Changelog: v1.1.31...v1.1.37
Behaviors 1.1.31
What's Changed
- Updates the Microsoft.VisualStudio.DesignTools.* versions by @pedrolamas in #75
- Add target framework for .Net Core 3.1 by @punker76 in #79
- Add .Net 5.0 target by @punker76 in #81
New Contributors
- @pedrolamas made their first contribution in #75
- @punker76 made their first contribution in #79
Full Changelog: v1.1.19...v1.1.31
Behaviors 1.1.19
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
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
Initial release of the WPF Behaviors