<commit_before>namespace Gu.Wpf.Geometry
{
    using System;
    using System.Collections;
    using System.Windows;
    using System.Windows.Controls;
    using System.Windows.Controls.Primitives;
    using System.Windows.Input;
    using System.Windows.Media;
    using System.Windows.Threading;

    /// <summary>
    /// A decorator that adds zoom and pan.
    /// </summary>
    public class Zoombox : Decorator
    {
        /// <summary>Identifies the <see cref="WheelZoomFactor"/> dependency property.</summary>
        public static readonly DependencyProperty WheelZoomFactorProperty = DependencyProperty.Register(
            nameof(WheelZoomFactor),
            typeof(double),
            typeof(Zoombox),
            new PropertyMetadata(1.05));

        /// <summary>Identifies the <see cref="MinZoom"/> dependency property.</summary>
        public static readonly DependencyProperty MinZoomProperty = DependencyProperty.Register(
            nameof(MinZoom),
            typeof(double),
            typeof(Zoombox),
            new PropertyMetadata(double.NegativeInfinity));

        /// <summary>Identifies the <see cref="MaxZoom"/> dependency property.</summary>
        public static readonly DependencyProperty MaxZoomProperty = DependencyProperty.Register(
            nameof(MaxZoom),
            typeof(double),
            typeof(Zoombox),
            new PropertyMetadata(double.PositiveInfinity));

        /// <summary>Identifies the <see cref="ContentMatrix"/> dependency property.</summary>
        public static readonly DependencyProperty ContentMatrixProperty = DependencyProperty.Register(
            nameof(ContentMatrix),
            typeof(Matrix),
            typeof(Zoombox),
            new PropertyMetadata(
                default(Matrix),
                (d, e) => ((MatrixTransform)((Zoombox)d).InternalVisual.Transform).SetCurrentValue(MatrixTransform.MatrixProperty, (Matrix)e.NewValue)));
<commit_msg>InvalidateVisual on ContentMatrixProperty change (issue #74)<commit_after>namespace Gu.Wpf.Geometry
{
    using System;
    using System.Collections;
    using System.Windows;
    using System.Windows.Controls;
    using System.Windows.Controls.Primitives;
    using System.Windows.Input;
    using System.Windows.Media;
    using System.Windows.Threading;

    /// <summary>
    /// A decorator that adds zoom and pan.
    /// </summary>
    public class Zoombox : Decorator
    {
        /// <summary>Identifies the <see cref="WheelZoomFactor"/> dependency property.</summary>
        public static readonly DependencyProperty WheelZoomFactorProperty = DependencyProperty.Register(
            nameof(WheelZoomFactor),
            typeof(double),
            typeof(Zoombox),
            new PropertyMetadata(1.05));

        /// <summary>Identifies the <see cref="MinZoom"/> dependency property.</summary>
        public static readonly DependencyProperty MinZoomProperty = DependencyProperty.Register(
            nameof(MinZoom),
            typeof(double),
            typeof(Zoombox),
            new PropertyMetadata(double.NegativeInfinity));

        /// <summary>Identifies the <see cref="MaxZoom"/> dependency property.</summary>
        public static readonly DependencyProperty MaxZoomProperty = DependencyProperty.Register(
            nameof(MaxZoom),
            typeof(double),
            typeof(Zoombox),
            new PropertyMetadata(double.PositiveInfinity));

        /// <summary>Identifies the <see cref="ContentMatrix"/> dependency property.</summary>
        public static readonly DependencyProperty ContentMatrixProperty = DependencyProperty.Register(
            nameof(ContentMatrix),
            typeof(Matrix),
            typeof(Zoombox),
            new PropertyMetadata(
                default(Matrix),
                (d, e) =>
                {
                    var zb = (Zoombox)d;
                    ((MatrixTransform)zb.InternalVisual.Transform).SetCurrentValue(MatrixTransform.MatrixProperty, (Matrix)e.NewValue);
                    zb.InvalidateVisual();
                }));

{'fraction_non_alphanumeric': 0.09906817067189799, 'fraction_numerical': 0.00196174595389897, 'mean_word_length': 2.5285467128027683, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5907068', 'n_tokens_mistral': 991, 'n_tokens_neox': 948, 'n_words': 217}