Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
28 additions
and
1 deletion.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
src/ProjectDependencyBrowser/Converters/ShowProjectNameConverter.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using System; | ||
using System.Globalization; | ||
using System.Windows; | ||
using System.Windows.Data; | ||
|
||
namespace ProjectDependencyBrowser.Converters | ||
{ | ||
public class ShowProjectNameConverter : IValueConverter | ||
{ | ||
/// <summary>Converts a value. </summary> | ||
/// <returns>A converted value. If the method returns null, the valid null value is used. </returns> | ||
/// <param name="value">The value produced by the binding source.</param><param name="targetType">The type of the binding target property.</param><param name="parameter">The converter parameter to use.</param><param name="culture">The culture to use in the converter.</param> | ||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) | ||
{ | ||
return string.IsNullOrEmpty((value as MyToolkit.Build.VsProject)?.NuGetPackageId) ? Visibility.Visible : Visibility.Collapsed; | ||
} | ||
|
||
/// <summary>Converts a value. </summary> | ||
/// <returns>A converted value. If the method returns null, the valid null value is used. </returns> | ||
/// <param name="value">The value that is produced by the binding target.</param><param name="targetType">The type to convert to.</param><param name="parameter">The converter parameter to use.</param><param name="culture">The culture to use in the converter.</param> | ||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters