diff --git a/BrightSharp.Ui.Tests/CustomWindow.xaml b/BrightSharp.Ui.Tests/CustomWindow.xaml index 9b690fe..ddfefec 100644 --- a/BrightSharp.Ui.Tests/CustomWindow.xaml +++ b/BrightSharp.Ui.Tests/CustomWindow.xaml @@ -6,6 +6,7 @@ xmlns:bs="http://schemas.brightsharp.com/developer" xmlns:local="clr-namespace:BrightSharp.Ui.Tests" mc:Ignorable="d" ResizeMode="CanResizeWithGrip" + WindowStyle="ToolWindow" Height="640" Width="1000" Style="{DynamicResource BrightSharpWindowStyle}"> diff --git a/BrightSharp/BrightSharp.csproj b/BrightSharp/BrightSharp.csproj index caac09e..fd09df4 100644 --- a/BrightSharp/BrightSharp.csproj +++ b/BrightSharp/BrightSharp.csproj @@ -55,6 +55,7 @@ + diff --git a/BrightSharp/Commands/AsyncCommand.cs b/BrightSharp/Commands/AsyncCommand.cs index bd166d5..400cab1 100644 --- a/BrightSharp/Commands/AsyncCommand.cs +++ b/BrightSharp/Commands/AsyncCommand.cs @@ -66,7 +66,7 @@ namespace BrightSharp.Commands } } - protected virtual void OnCanExecuteChanged() + public virtual void OnCanExecuteChanged() { CanExecuteChanged?.Invoke(this, new EventArgs()); } diff --git a/BrightSharp/Converters/InverseBooleanToVisibilityConverter.cs b/BrightSharp/Converters/InverseBooleanToVisibilityConverter.cs new file mode 100644 index 0000000..9f4bcfc --- /dev/null +++ b/BrightSharp/Converters/InverseBooleanToVisibilityConverter.cs @@ -0,0 +1,23 @@ +using System; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; + +namespace BrightSharp.Converters +{ + [Localizability(LocalizationCategory.NeverLocalize)] + public class InverseBooleanToVisibilityConverter : IValueConverter + { + private BooleanToVisibilityConverter _converter = new BooleanToVisibilityConverter(); + + public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { + var result = _converter.Convert(value, targetType, parameter, culture) as Visibility?; + return result == Visibility.Collapsed ? Visibility.Visible : Visibility.Collapsed; + } + + public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { + var result = _converter.ConvertBack(value, targetType, parameter, culture) as bool?; + return result == true ? false : true; + } + } +} diff --git a/BrightSharp/Generic.xaml b/BrightSharp/Generic.xaml index 8be01c2..f1dcfe3 100644 --- a/BrightSharp/Generic.xaml +++ b/BrightSharp/Generic.xaml @@ -4869,9 +4869,29 @@ - - - + + + + + + + @@ -4880,7 +4900,7 @@ - + @@ -5760,6 +5780,10 @@ + + + +