Никита
6 years ago
11 changed files with 87 additions and 70 deletions
@ -0,0 +1,16 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace eCompanies |
|||
{ |
|||
public enum DataGridRowStatus |
|||
{ |
|||
DEFAULT, |
|||
NEW, |
|||
UPDATED, |
|||
REMOVED |
|||
} |
|||
} |
@ -0,0 +1,28 @@ |
|||
using System; |
|||
using System.Globalization; |
|||
using System.Windows; |
|||
using System.Windows.Data; |
|||
|
|||
namespace eCompanies |
|||
{ |
|||
[ValueConversion(typeof(DataGridRowStatus), typeof(Visibility))] |
|||
public class HiddenConverter : IValueConverter |
|||
{ |
|||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) |
|||
{ |
|||
if ((DataGridRowStatus)value == DataGridRowStatus.REMOVED) |
|||
{ |
|||
return Visibility.Collapsed; |
|||
} |
|||
else |
|||
{ |
|||
return Visibility.Visible; |
|||
} |
|||
} |
|||
|
|||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) |
|||
{ |
|||
throw new NotImplementedException(); |
|||
} |
|||
} |
|||
} |
Loading…
Reference in new issue