Skip to content

Commit

Permalink
Merge branch 'FixMenuItem' of https://github.com/l1pton17/MaterialDes…
Browse files Browse the repository at this point in the history
…ignInXamlToolkit into l1pton17-FixMenuItem
  • Loading branch information
ButchersBoy committed Oct 11, 2015
2 parents 60f7156 + 092b93a commit aab34af
Show file tree
Hide file tree
Showing 3 changed files with 170 additions and 65 deletions.
8 changes: 4 additions & 4 deletions MainDemo.Wpf/MenusAndToolBars.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</MenuItem.Icon>
</MenuItem>
<MenuItem Header="Save As.." />
<MenuItem Header="Exit">
<MenuItem Header="Exit" InputGestureText="Ctrl+E">
<MenuItem.Icon>
<Viewbox Width="16" Height="16">
<Canvas Width="24" Height="24">
Expand All @@ -30,9 +30,9 @@
<Separator />
<MenuItem Header="Excellent" IsCheckable="True" IsChecked="True" />
<MenuItem Header="Rubbish" IsCheckable="True" />
<MenuItem Header="Dig Deeper">
<MenuItem Header="Enlightenment?" />
<MenuItem Header="Disappointment" />
<MenuItem Header="Dig Deeper" InputGestureText="Ctrl+D">
<MenuItem Header="Enlightenment?" IsCheckable="True" />
<MenuItem Header="Disappointment" IsCheckable="True" />
</MenuItem>
</MenuItem>
<MenuItem Header="_Edit">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@ namespace MaterialDesignThemes.Wpf.Converters
{
public class TextFieldHintVisibilityConverter : IValueConverter
{
public Visibility IsEmptyValue { get; set; } = Visibility.Visible;
public Visibility IsNotEmptyValue { get; set; } = Visibility.Hidden;

public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
return string.IsNullOrEmpty((value ?? "").ToString()) ? Visibility.Visible : Visibility.Hidden;
return string.IsNullOrEmpty((value ?? "").ToString()) ? IsEmptyValue : IsNotEmptyValue;
}

public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
Expand Down
Loading

0 comments on commit aab34af

Please sign in to comment.