Skip to content

Commit

Permalink
Remove yet another copy of the BoolToVisibilityConverter
Browse files Browse the repository at this point in the history
  • Loading branch information
tom-englert committed Aug 19, 2024
1 parent 00ff9c8 commit b6ad02d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 50 deletions.
44 changes: 0 additions & 44 deletions ILSpy/Controls/BoolToVisibilityConverter.cs

This file was deleted.

8 changes: 3 additions & 5 deletions ILSpy/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,13 @@
TextOptions.TextFormattingMode="Display"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" d:DesignHeight="500" d:DesignWidth="500"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"
xmlns:styles="urn:TomsToolbox.Wpf.Styles"
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
xmlns:themes="clr-namespace:ICSharpCode.ILSpy.Themes"
xmlns:toms="urn:TomsToolbox"
xmlns:viewModels="clr-namespace:ICSharpCode.ILSpy.ViewModels"
d:DataContext="{d:DesignInstance local:MainWindowViewModel}"
>
<Window.Resources>
<controls:BoolToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
<docking:ActiveTabPageConverter x:Key="ActiveTabPageConverter"/>

<tv:SharpTreeView x:Key="AssemblyTreeView"
Expand Down Expand Up @@ -223,7 +221,7 @@
ItemsSource="{x:Static local:Languages.AllLanguages}" ToolTip="{x:Static properties:Resources.SelectLanguageDropdownTooltip}"
SelectedItem="{Binding Workspace.ActiveTabPage.FilterSettings.Language}"/>
<ComboBox Name="languageVersionComboBox" DisplayMemberPath="DisplayName" Width="120" MaxDropDownHeight="Auto" ToolTip="{x:Static properties:Resources.SelectVersionDropdownTooltip}"
Visibility="{Binding SelectedItem.HasLanguageVersions, ElementName=languageComboBox, Converter={StaticResource BooleanToVisibilityConverter}}"
Visibility="{Binding SelectedItem.HasLanguageVersions, ElementName=languageComboBox, Converter={toms:BooleanToVisibilityConverter}}"
IsEnabled="{Binding Workspace.ActiveTabPage.SupportsLanguageSwitching}"
ItemsSource="{Binding SelectedItem.LanguageVersions, ElementName=languageComboBox, UpdateSourceTrigger=PropertyChanged}"
SelectedItem="{Binding Workspace.ActiveTabPage.FilterSettings.LanguageVersion, UpdateSourceTrigger=PropertyChanged}"/>
Expand Down Expand Up @@ -271,7 +269,7 @@
<docking:PaneStyleSelector.ToolPaneStyle>
<Style TargetType="{x:Type avalondock:LayoutAnchorableItem}">
<Setter Property="Title" Value="{Binding Model.Title}"/>
<Setter Property="Visibility" Value="{Binding Model.IsVisible, Mode=TwoWay, Converter={StaticResource BooleanToVisibilityConverter}, ConverterParameter={x:Static Visibility.Hidden}}"/>
<Setter Property="Visibility" Value="{Binding Model.IsVisible, Mode=TwoWay, Converter={toms:BooleanToVisibilityConverter VisibilityWhenBooleanIsFalse=Hidden}}"/>
<Setter Property="ContentId" Value="{Binding Model.ContentId}"/>
<Setter Property="IsSelected" Value="{Binding Model.IsSelected, Mode=TwoWay}"/>
<Setter Property="IsActive" Value="{Binding Model.IsActive, Mode=TwoWay}"/>
Expand All @@ -284,7 +282,7 @@
<docking:PaneStyleSelector.TabPageStyle>
<Style TargetType="{x:Type avalondock:LayoutItem}">
<Setter Property="Title" Value="{Binding Model.Title}"/>
<Setter Property="Visibility" Value="{Binding Model.IsVisible, Mode=TwoWay, Converter={StaticResource BooleanToVisibilityConverter}, ConverterParameter={x:Static Visibility.Hidden}}"/>
<Setter Property="Visibility" Value="{Binding Model.IsVisible, Mode=TwoWay, Converter={toms:BooleanToVisibilityConverter VisibilityWhenBooleanIsFalse=Hidden}}"/>
<Setter Property="ContentId" Value="{Binding Model.ContentId}"/>
<Setter Property="IsSelected" Value="{Binding Model.IsSelected, Mode=TwoWay}"/>
<Setter Property="IsActive" Value="{Binding Model.IsActive, Mode=TwoWay}"/>
Expand Down
1 change: 0 additions & 1 deletion ILSpy/Views/DebugSteps.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
using ICSharpCode.Decompiler.IL;
using ICSharpCode.Decompiler.IL.Transforms;
using ICSharpCode.ILSpy.Docking;
using ICSharpCode.ILSpy.Options;
using ICSharpCode.ILSpy.ViewModels;

namespace ICSharpCode.ILSpy
Expand Down

0 comments on commit b6ad02d

Please sign in to comment.