diff --git a/BeWo/BeWo.csproj b/BeWo/BeWo.csproj index 0312d6f50..2200593ce 100644 --- a/BeWo/BeWo.csproj +++ b/BeWo/BeWo.csproj @@ -634,6 +634,7 @@ + @@ -665,6 +666,7 @@ SchulbegleitenderDienstEmployeeView.xaml + VertretenderKlientSearchView.xaml diff --git a/BeWo/Converter/StringLengthVisibilityMultiConverter.cs b/BeWo/Converter/StringLengthVisibilityMultiConverter.cs new file mode 100644 index 000000000..e39e0dfd2 --- /dev/null +++ b/BeWo/Converter/StringLengthVisibilityMultiConverter.cs @@ -0,0 +1,23 @@ +using System; +using System.Globalization; +using System.Linq; +using System.Windows; +using System.Windows.Data; + +namespace BeWo.Converter +{ + public class StringLengthVisibilityMultiConverter : IMultiValueConverter + { + public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) + { + if(values == null || values.Length < 2 || values.Any(a => string.IsNullOrWhiteSpace(a?.ToString()))) + { + return Visibility.Collapsed; + } + + return Visibility.Visible; + } + + public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) => throw new NotImplementedException(); + } +} diff --git a/BeWo/SchulbegleitenderDienst/KrankheitsZeitraumView.xaml b/BeWo/SchulbegleitenderDienst/KrankheitsZeitraumView.xaml index ff5d3e938..90d8c6a01 100644 --- a/BeWo/SchulbegleitenderDienst/KrankheitsZeitraumView.xaml +++ b/BeWo/SchulbegleitenderDienst/KrankheitsZeitraumView.xaml @@ -2,10 +2,9 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors" - Background="Transparent" Height="130" Width="350" WindowStartupLocation="CenterScreen" WindowStyle="None"> - - - + Background="Transparent" WindowStartupLocation="CenterScreen" WindowStyle="None" SizeToContent="WidthAndHeight" AllowsTransparency="True"> + + @@ -19,18 +18,16 @@ - - -