Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'next' into RecoverSelectionAfterRewrite
# Conflicts: # Rubberduck.Resources/RubberduckUI.resx
- Loading branch information
Showing
40 changed files
with
1,049 additions
and
382 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...e/AutoComplete/Service/SelfClosingPair.cs → ...plete/SelfClosingPairs/SelfClosingPair.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using System.Windows; | ||
using System.Windows.Controls; | ||
using System.Windows.Interactivity; | ||
using GongSolutions.Wpf.DragDrop.Utilities; | ||
|
||
namespace Rubberduck.UI.Controls | ||
{ | ||
public class GroupItemExpandedBehavior : Behavior<DataGrid> | ||
{ | ||
public object ExpandedState | ||
{ | ||
get => GetValue(ExpandedStateProperty); | ||
set => SetValue(ExpandedStateProperty, value); | ||
} | ||
|
||
public static readonly DependencyProperty ExpandedStateProperty = | ||
DependencyProperty.Register("ExpandedState", typeof(object), typeof(GroupItemExpandedBehavior), new UIPropertyMetadata(null, OnExpandedStateChanged)); | ||
|
||
private static void OnExpandedStateChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e) | ||
{ | ||
if (!(sender is GroupItemExpandedBehavior data) || | ||
!(data.AssociatedObject is DataGrid grid) || | ||
!grid.IsGrouping || | ||
!(e.NewValue is bool)) | ||
{ | ||
return; | ||
} | ||
|
||
foreach (var expander in grid.GetVisualDescendents<Expander>()) | ||
{ | ||
expander.IsExpanded = (bool)e.NewValue; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
Rubberduck.Core/UI/Inspections/InspectionFilterToBooleanConverter.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using System; | ||
using System.Globalization; | ||
using System.Windows.Data; | ||
|
||
namespace Rubberduck.UI.Inspections | ||
{ | ||
internal class InspectionFilterToBooleanConverter : IValueConverter | ||
{ | ||
private InspectionResultsFilter _state; | ||
|
||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) | ||
{ | ||
if (!(parameter is InspectionResultsFilter flag) || | ||
!(value is InspectionResultsFilter bound)) | ||
{ | ||
return _state; | ||
} | ||
|
||
_state = bound; | ||
return _state.HasFlag(flag); | ||
} | ||
|
||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) | ||
{ | ||
if (!(parameter is InspectionResultsFilter flag) || | ||
!(value is bool isSet)) | ||
{ | ||
return _state; | ||
} | ||
|
||
_state ^= flag; | ||
return _state; | ||
} | ||
} | ||
} |
Oops, something went wrong.