diff --git a/Control/UserControls/PannelCard/RightCardControl.xaml b/Control/UserControls/PannelCard/RightCardControl.xaml index 724e696..52914d9 100644 --- a/Control/UserControls/PannelCard/RightCardControl.xaml +++ b/Control/UserControls/PannelCard/RightCardControl.xaml @@ -111,6 +111,7 @@ + @@ -148,6 +149,7 @@ + @@ -247,12 +249,16 @@ MouseLeftButtonDown="Icon_MouseLeftButtonDown" MouseLeftButtonUp="Icon_MouseLeftButtonUp" > + + diff --git a/Control/UserControls/PannelCard/RightCardControl.xaml.cs b/Control/UserControls/PannelCard/RightCardControl.xaml.cs index 9aa39e2..df8b88a 100644 --- a/Control/UserControls/PannelCard/RightCardControl.xaml.cs +++ b/Control/UserControls/PannelCard/RightCardControl.xaml.cs @@ -353,7 +353,7 @@ namespace GeekDesk.Control.UserControls.PannelCard DependencyObject dos = sp.Parent; - Image img = sp.Children[0] as Image; + Image img = sp.Children[1] as Image; double afterHeight = img.Height; double afterWidth = img.Width; @@ -683,6 +683,14 @@ namespace GeekDesk.Control.UserControls.PannelCard MyPoptip.VerticalOffset = 30; } - + /// + /// 控制图标标题显示及隐藏 + /// + /// + /// + private void ShowTitle_Click(object sender, RoutedEventArgs e) + { + appData.AppConfig.ShowIconTitle = !appData.AppConfig.ShowIconTitle; + } } } diff --git a/Converts/Boolean2VisibilityConverter.cs b/Converts/Boolean2VisibilityConverter.cs new file mode 100644 index 0000000..d7dc537 --- /dev/null +++ b/Converts/Boolean2VisibilityConverter.cs @@ -0,0 +1,39 @@ +using System; +using System.Globalization; +using System.Windows; +using System.Windows.Data; + +namespace GeekDesk.Converts +{ + internal class Boolean2VisibilityConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + bool param = false; + if (value != null) + { + param = (bool)value; + } + if (param) + { + return Visibility.Visible; + } else + { + return (Visibility)parameter; + } + + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + if ((bool)value) + { + return Visibility.Visible; + } + else + { + return Visibility.Hidden; + } + } + } +}