Browse Source
git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@4989 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61shortcuts
12 changed files with 473 additions and 149 deletions
@ -1,29 +1,52 @@
@@ -1,29 +1,52 @@
|
||||
<UserControl x:Class="ICSharpCode.StartPage.RecentProjectsControl" |
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
||||
xmlns:core="http://icsharpcode.net/sharpdevelop/core"> |
||||
<StackPanel Orientation="Vertical"> |
||||
<ListView Name="lastProjectsListView" SelectionMode="Single" MouseDoubleClick="lastProjectsDoubleClick" KeyDown="lastProjectsKeyDown"> |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<UserControl |
||||
x:Class="ICSharpCode.StartPage.RecentProjectsControl" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:core="http://icsharpcode.net/sharpdevelop/core"> |
||||
<StackPanel |
||||
Orientation="Vertical"> |
||||
<ListView |
||||
Name="lastProjectsListView" |
||||
SelectionMode="Single" |
||||
core:SortableGridViewColumn.SortMode="Automatic" |
||||
MouseDoubleClick="lastProjectsDoubleClick" |
||||
KeyDown="lastProjectsKeyDown"> |
||||
<ListView.Resources> |
||||
<DataTemplate x:Key="nameCellTemplate"> |
||||
<DataTemplate |
||||
x:Key="nameCellTemplate"> |
||||
<TextBlock> |
||||
<Hyperlink Tag="{Binding}" Click="listViewHyperlinkClick"> |
||||
<TextBlock Text="{Binding Path=Name}" /> |
||||
<Hyperlink |
||||
Tag="{Binding}" |
||||
Click="listViewHyperlinkClick"> |
||||
<TextBlock |
||||
Text="{Binding Path=Name}" /> |
||||
</Hyperlink> |
||||
</TextBlock> |
||||
</DataTemplate> |
||||
</ListView.Resources> |
||||
<ListView.View> |
||||
<GridView> |
||||
<GridViewColumn CellTemplate="{StaticResource nameCellTemplate}" Header="{core:Localize Global.Name}" /> |
||||
<GridViewColumn DisplayMemberBinding="{Binding Path=LastModification}" Header="{core:Localize StartPage.StartMenu.ModifiedTable}" /> |
||||
<GridViewColumn DisplayMemberBinding="{Binding Path=Path}" Header="{core:Localize StartPage.StartMenu.LocationTable}" /> |
||||
<core:SortableGridViewColumn |
||||
SortBy="Name" |
||||
CellTemplate="{StaticResource nameCellTemplate}" |
||||
Header="{core:Localize Global.Name}" /> |
||||
<core:SortableGridViewColumn |
||||
DisplayMemberBinding="{Binding Path=LastModification}" |
||||
Header="{core:Localize StartPage.StartMenu.ModifiedTable}" /> |
||||
<core:SortableGridViewColumn |
||||
DisplayMemberBinding="{Binding Path=Path}" |
||||
Header="{core:Localize StartPage.StartMenu.LocationTable}" /> |
||||
</GridView> |
||||
</ListView.View> |
||||
</ListView> |
||||
<StackPanel Orientation="Horizontal" Margin="0,20,0,0"> |
||||
<Button Content="{core:Localize StartPage.StartMenu.OpenCombineButton}" Click="openSolutionClick" /> |
||||
<Button Content="{core:Localize StartPage.StartMenu.NewCombineButton}" Click="newSolutionClick" Margin="8,0,0,0" /> |
||||
<StackPanel |
||||
Orientation="Horizontal" |
||||
Margin="0,20,0,0"> |
||||
<Button |
||||
Content="{core:Localize StartPage.StartMenu.OpenCombineButton}" |
||||
Click="openSolutionClick" /> |
||||
<Button |
||||
Content="{core:Localize StartPage.StartMenu.NewCombineButton}" |
||||
Click="newSolutionClick" |
||||
Margin="8,0,0,0" /> |
||||
</StackPanel> |
||||
</StackPanel> |
||||
</UserControl> |
||||
@ -1,113 +1,119 @@
@@ -1,113 +1,119 @@
|
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<UserControl |
||||
x:ClassModifier="internal" |
||||
x:Class="ICSharpCode.SharpDevelop.Project.Converter.UpgradeView" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> |
||||
<Grid> |
||||
<Grid.RowDefinitions> |
||||
<RowDefinition |
||||
Height="Auto" /> |
||||
<RowDefinition |
||||
Height="*" /> |
||||
<RowDefinition |
||||
Height="Auto" /> |
||||
<RowDefinition |
||||
Height="Auto" /> |
||||
</Grid.RowDefinitions> |
||||
<TextBlock |
||||
Grid.Column="0" |
||||
Grid.Row="0" |
||||
Margin="8,8,8,4"> |
||||
This solution was created using a previous version of SharpDevelop. |
||||
You might want to upgrade it so that you can use new language or framework features. |
||||
</TextBlock> |
||||
<ListView |
||||
x:Name="listView" |
||||
Grid.Column="0" |
||||
Grid.Row="1" |
||||
Margin="8,4,8,4" |
||||
SelectionMode="Multiple" |
||||
SelectionChanged="ListView_SelectionChanged"> |
||||
<ListView.View> |
||||
<GridView> |
||||
<GridViewColumn |
||||
Header="Project"> |
||||
<GridViewColumn.CellTemplate> |
||||
<DataTemplate> |
||||
<CheckBox |
||||
Content="{Binding Name}" |
||||
IsChecked="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListViewItem}}, Path=IsSelected}" /> |
||||
</DataTemplate> |
||||
</GridViewColumn.CellTemplate> |
||||
</GridViewColumn> |
||||
<GridViewColumn |
||||
DisplayMemberBinding="{Binding CompilerVersionName}" |
||||
Header="Compiler Version" /> |
||||
<GridViewColumn |
||||
DisplayMemberBinding="{Binding TargetFrameworkName}" |
||||
Header="Target Framework" /> |
||||
</GridView> |
||||
</ListView.View> |
||||
</ListView> |
||||
<CheckBox |
||||
Content="Select _all" |
||||
Grid.Row="2" |
||||
Name="selectAllCheckBox" |
||||
Checked="SelectAllCheckBox_Checked" |
||||
Unchecked="SelectAllCheckBox_Unchecked" |
||||
HorizontalAlignment="Left" |
||||
Margin="10,0,0,0" /> |
||||
<GroupBox |
||||
Grid.Column="0" |
||||
Grid.Row="3" |
||||
HorizontalAlignment="Stretch" |
||||
VerticalAlignment="Stretch" |
||||
Margin="8,0,8,8" |
||||
Header="Change version of selected projects"> |
||||
<Grid |
||||
Margin="4"> |
||||
<Grid.RowDefinitions> |
||||
<RowDefinition |
||||
Height="Auto" /> |
||||
<RowDefinition |
||||
Height="Auto" /> |
||||
<RowDefinition |
||||
Height="Auto" /> |
||||
</Grid.RowDefinitions> |
||||
<Grid.ColumnDefinitions> |
||||
<ColumnDefinition |
||||
Width="Auto" /> |
||||
<ColumnDefinition |
||||
Width="120" /> |
||||
</Grid.ColumnDefinitions> |
||||
<Label |
||||
Content="Convert selected _projects to:" |
||||
Grid.Column="0" |
||||
Grid.Row="0" |
||||
Target="{Binding ElementName=newVersionComboBox}" /> |
||||
<ComboBox |
||||
Name="newVersionComboBox" |
||||
Grid.Column="1" |
||||
Grid.Row="0" |
||||
Height="22" /> |
||||
<Label |
||||
Content="Change _target framework:" |
||||
Grid.Column="0" |
||||
Grid.Row="1" |
||||
Target="{Binding ElementName=newFrameworkComboBox}" /> |
||||
<ComboBox |
||||
Name="newFrameworkComboBox" |
||||
Grid.Column="1" |
||||
Grid.Row="1" |
||||
Height="22" /> |
||||
<Button |
||||
Name="convertButton" |
||||
Width="90" |
||||
Height="22" |
||||
Content="_Convert" |
||||
Grid.Column="0" |
||||
Grid.ColumnSpan="2" |
||||
Grid.Row="2" /> |
||||
</Grid> |
||||
</GroupBox> |
||||
</Grid> |
||||
x:ClassModifier="internal" |
||||
x:Class="ICSharpCode.SharpDevelop.Project.Converter.UpgradeView" |
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
||||
xmlns:core="http://icsharpcode.net/sharpdevelop/core"> |
||||
<Grid> |
||||
<Grid.RowDefinitions> |
||||
<RowDefinition |
||||
Height="Auto" /> |
||||
<RowDefinition |
||||
Height="*" /> |
||||
<RowDefinition |
||||
Height="Auto" /> |
||||
<RowDefinition |
||||
Height="Auto" /> |
||||
</Grid.RowDefinitions> |
||||
<TextBlock |
||||
Grid.Column="0" |
||||
Grid.Row="0" |
||||
TextWrapping="WrapWithOverflow" |
||||
Margin="8,8,8,4"> |
||||
This solution was created using a previous version of SharpDevelop. |
||||
You might want to upgrade it so that you can use new language or framework features. |
||||
</TextBlock> |
||||
<ListView |
||||
x:Name="listView" |
||||
core:SortableGridViewColumn.SortMode="Automatic" |
||||
Grid.Column="0" |
||||
Grid.Row="1" |
||||
Margin="8,4,8,4" |
||||
SelectionMode="Multiple" |
||||
SelectionChanged="ListView_SelectionChanged"> |
||||
<ListView.View> |
||||
<GridView> |
||||
<core:SortableGridViewColumn |
||||
SortBy="Name" |
||||
Header="Project"> |
||||
<GridViewColumn.CellTemplate> |
||||
<DataTemplate> |
||||
<CheckBox |
||||
Content="{Binding Name}" |
||||
IsChecked="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListViewItem}}, Path=IsSelected}" /> |
||||
</DataTemplate> |
||||
</GridViewColumn.CellTemplate> |
||||
</core:SortableGridViewColumn> |
||||
<core:SortableGridViewColumn |
||||
DisplayMemberBinding="{Binding CompilerVersionName}" |
||||
Header="Compiler Version" /> |
||||
<core:SortableGridViewColumn |
||||
DisplayMemberBinding="{Binding TargetFrameworkName}" |
||||
Header="Target Framework" /> |
||||
</GridView> |
||||
</ListView.View> |
||||
</ListView> |
||||
<CheckBox |
||||
Content="Select _all" |
||||
Grid.Row="2" |
||||
Name="selectAllCheckBox" |
||||
Checked="SelectAllCheckBox_Checked" |
||||
Unchecked="SelectAllCheckBox_Unchecked" |
||||
HorizontalAlignment="Left" |
||||
Margin="10,0,0,0" /> |
||||
<GroupBox |
||||
Grid.Column="0" |
||||
Grid.Row="3" |
||||
HorizontalAlignment="Stretch" |
||||
VerticalAlignment="Stretch" |
||||
Margin="8,0,8,8" |
||||
Header="Change version of selected projects"> |
||||
<Grid |
||||
Margin="4"> |
||||
<Grid.RowDefinitions> |
||||
<RowDefinition |
||||
Height="Auto" /> |
||||
<RowDefinition |
||||
Height="Auto" /> |
||||
<RowDefinition |
||||
Height="Auto" /> |
||||
</Grid.RowDefinitions> |
||||
<Grid.ColumnDefinitions> |
||||
<ColumnDefinition |
||||
Width="Auto" /> |
||||
<ColumnDefinition |
||||
Width="120" /> |
||||
</Grid.ColumnDefinitions> |
||||
<Label |
||||
Content="Convert selected _projects to:" |
||||
Grid.Column="0" |
||||
Grid.Row="0" |
||||
Target="{Binding ElementName=newVersionComboBox}" /> |
||||
<ComboBox |
||||
Name="newVersionComboBox" |
||||
Grid.Column="1" |
||||
Grid.Row="0" |
||||
Height="22" /> |
||||
<Label |
||||
Content="Change _target framework:" |
||||
Grid.Column="0" |
||||
Grid.Row="1" |
||||
Target="{Binding ElementName=newFrameworkComboBox}" /> |
||||
<ComboBox |
||||
Name="newFrameworkComboBox" |
||||
Grid.Column="1" |
||||
Grid.Row="1" |
||||
Height="22" /> |
||||
<Button |
||||
Name="convertButton" |
||||
Width="90" |
||||
Height="22" |
||||
Content="_Convert" |
||||
Grid.Column="0" |
||||
Grid.ColumnSpan="2" |
||||
Grid.Row="2" /> |
||||
</Grid> |
||||
</GroupBox> |
||||
</Grid> |
||||
</UserControl> |
||||
@ -0,0 +1,65 @@
@@ -0,0 +1,65 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <license see="prj:///doc/license.txt"/>
|
||||
// <owner name="Daniel Grunwald"/>
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
|
||||
using System; |
||||
using System.Windows; |
||||
using System.Windows.Markup; |
||||
|
||||
namespace ICSharpCode.Core.Presentation |
||||
{ |
||||
/// <summary>
|
||||
/// ExtensionMethods that help with WPF.
|
||||
/// </summary>
|
||||
public static class ExtensionMethods |
||||
{ |
||||
/// <summary>
|
||||
/// Sets the value of a dependency property on <paramref name="targetObject"/> using a markup extension.
|
||||
/// </summary>
|
||||
/// <remarks>This method does not support markup extensions like x:Static that depend on
|
||||
/// having a XAML file as context.</remarks>
|
||||
public static void SetValueToExtension(this DependencyObject targetObject, DependencyProperty property, MarkupExtension markupExtension) |
||||
{ |
||||
if (targetObject == null) |
||||
throw new ArgumentNullException("targetObject"); |
||||
if (property == null) |
||||
throw new ArgumentNullException("property"); |
||||
if (markupExtension == null) |
||||
throw new ArgumentNullException("markupExtension"); |
||||
|
||||
var serviceProvider = new SetValueToExtensionServiceProvider(targetObject, property); |
||||
targetObject.SetValue(property, markupExtension.ProvideValue(serviceProvider)); |
||||
} |
||||
|
||||
sealed class SetValueToExtensionServiceProvider : IServiceProvider, IProvideValueTarget |
||||
{ |
||||
readonly DependencyObject targetObject; |
||||
readonly DependencyProperty targetProperty; |
||||
|
||||
public SetValueToExtensionServiceProvider(DependencyObject targetObject, DependencyProperty property) |
||||
{ |
||||
this.targetObject = targetObject; |
||||
this.targetProperty = property; |
||||
} |
||||
|
||||
public object GetService(Type serviceType) |
||||
{ |
||||
if (serviceType == typeof(IProvideValueTarget)) |
||||
return this; |
||||
else |
||||
return null; |
||||
} |
||||
|
||||
public object TargetObject { |
||||
get { return targetObject; } |
||||
} |
||||
|
||||
public object TargetProperty { |
||||
get { return targetProperty; } |
||||
} |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,212 @@
@@ -0,0 +1,212 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <license see="prj:///doc/license.txt"/>
|
||||
// <owner name="Daniel Grunwald"/>
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
|
||||
using System; |
||||
using System.ComponentModel; |
||||
using System.Windows; |
||||
using System.Windows.Controls; |
||||
using System.Windows.Data; |
||||
|
||||
namespace ICSharpCode.Core.Presentation |
||||
{ |
||||
/// <summary>
|
||||
/// Allows to automatically sort a grid view.
|
||||
/// </summary>
|
||||
public class SortableGridViewColumn : GridViewColumn |
||||
{ |
||||
static readonly ComponentResourceKey headerTemplateKey = new ComponentResourceKey(typeof(SortableGridViewColumn), "ColumnHeaderTemplate"); |
||||
|
||||
public SortableGridViewColumn() |
||||
{ |
||||
this.SetValueToExtension(HeaderTemplateProperty, new DynamicResourceExtension(headerTemplateKey)); |
||||
} |
||||
|
||||
string sortBy; |
||||
|
||||
public string SortBy { |
||||
get { return sortBy; } |
||||
set { |
||||
if (sortBy != value) { |
||||
sortBy = value; |
||||
OnPropertyChanged(new System.ComponentModel.PropertyChangedEventArgs("SortBy")); |
||||
} |
||||
} |
||||
} |
||||
|
||||
#region SortDirection property
|
||||
public static readonly DependencyProperty SortDirectionProperty = |
||||
DependencyProperty.RegisterAttached("SortDirection", typeof(ColumnSortDirection), typeof(SortableGridViewColumn), |
||||
new FrameworkPropertyMetadata(ColumnSortDirection.None, OnSortDirectionChanged)); |
||||
|
||||
public ColumnSortDirection SortDirection { |
||||
get { return (ColumnSortDirection)GetValue(SortDirectionProperty); } |
||||
set { SetValue(SortDirectionProperty, value); } |
||||
} |
||||
|
||||
public static ColumnSortDirection GetSortDirection(ListView listView) |
||||
{ |
||||
return (ColumnSortDirection)listView.GetValue(SortDirectionProperty); |
||||
} |
||||
|
||||
public static void SetSortDirection(ListView listView, ColumnSortDirection value) |
||||
{ |
||||
listView.SetValue(SortDirectionProperty, value); |
||||
} |
||||
|
||||
static void OnSortDirectionChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args) |
||||
{ |
||||
ListView grid = sender as ListView; |
||||
if (grid != null) { |
||||
SortableGridViewColumn col = GetCurrentSortColumn(grid); |
||||
if (col != null) |
||||
col.SortDirection = (ColumnSortDirection)args.NewValue; |
||||
Sort(grid); |
||||
} |
||||
} |
||||
#endregion
|
||||
|
||||
#region CurrentSortColumn property
|
||||
public static readonly DependencyProperty CurrentSortColumnProperty = |
||||
DependencyProperty.RegisterAttached("CurrentSortColumn", typeof(SortableGridViewColumn), typeof(SortableGridViewColumn), |
||||
new FrameworkPropertyMetadata(OnCurrentSortColumnChanged)); |
||||
|
||||
public static SortableGridViewColumn GetCurrentSortColumn(ListView listView) |
||||
{ |
||||
return (SortableGridViewColumn)listView.GetValue(CurrentSortColumnProperty); |
||||
} |
||||
|
||||
public static void SetCurrentSortColumn(ListView listView, SortableGridViewColumn value) |
||||
{ |
||||
listView.SetValue(CurrentSortColumnProperty, value); |
||||
} |
||||
|
||||
static void OnCurrentSortColumnChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args) |
||||
{ |
||||
ListView grid = sender as ListView; |
||||
if (grid != null) { |
||||
SortableGridViewColumn oldColumn = (SortableGridViewColumn)args.OldValue; |
||||
if (oldColumn != null) |
||||
oldColumn.SortDirection = ColumnSortDirection.None; |
||||
SortableGridViewColumn newColumn = (SortableGridViewColumn)args.NewValue; |
||||
if (newColumn != null) { |
||||
newColumn.SortDirection = GetSortDirection(grid); |
||||
} |
||||
Sort(grid); |
||||
} |
||||
} |
||||
#endregion
|
||||
|
||||
#region SortMode property
|
||||
public static readonly DependencyProperty SortModeProperty = |
||||
DependencyProperty.RegisterAttached("SortMode", typeof(ListViewSortMode), typeof(SortableGridViewColumn), |
||||
new FrameworkPropertyMetadata(ListViewSortMode.None, OnSortModeChanged)); |
||||
|
||||
public static ListViewSortMode GetSortMode(ListView listView) |
||||
{ |
||||
return (ListViewSortMode)listView.GetValue(SortModeProperty); |
||||
} |
||||
|
||||
public static void SetSortMode(ListView listView, ListViewSortMode value) |
||||
{ |
||||
listView.SetValue(SortModeProperty, value); |
||||
} |
||||
|
||||
static void OnSortModeChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args) |
||||
{ |
||||
ListView grid = sender as ListView; |
||||
if (grid != null) { |
||||
if ((ListViewSortMode)args.NewValue != ListViewSortMode.None) |
||||
grid.AddHandler(GridViewColumnHeader.ClickEvent, new RoutedEventHandler(GridViewColumnHeaderClickHandler)); |
||||
else |
||||
grid.RemoveHandler(GridViewColumnHeader.ClickEvent, new RoutedEventHandler(GridViewColumnHeaderClickHandler)); |
||||
} |
||||
} |
||||
|
||||
static void GridViewColumnHeaderClickHandler(object sender, RoutedEventArgs e) |
||||
{ |
||||
ListView grid = sender as ListView; |
||||
GridViewColumnHeader headerClicked = e.OriginalSource as GridViewColumnHeader; |
||||
if (grid != null && headerClicked != null && headerClicked.Role != GridViewColumnHeaderRole.Padding) { |
||||
if (headerClicked.Column == GetCurrentSortColumn(grid)) { |
||||
if (GetSortDirection(grid) == ColumnSortDirection.Ascending) |
||||
SetSortDirection(grid, ColumnSortDirection.Descending); |
||||
else |
||||
SetSortDirection(grid, ColumnSortDirection.Ascending); |
||||
} else { |
||||
SetSortDirection(grid, ColumnSortDirection.Ascending); |
||||
SetCurrentSortColumn(grid, headerClicked.Column as SortableGridViewColumn); |
||||
} |
||||
} |
||||
} |
||||
#endregion
|
||||
|
||||
static void Sort(ListView grid) |
||||
{ |
||||
ColumnSortDirection currentDirection = GetSortDirection(grid); |
||||
SortableGridViewColumn column = GetCurrentSortColumn(grid); |
||||
if (column != null && GetSortMode(grid) == ListViewSortMode.Automatic && currentDirection != ColumnSortDirection.None) { |
||||
ICollectionView dataView = CollectionViewSource.GetDefaultView(grid.ItemsSource); |
||||
|
||||
string sortBy = column.SortBy; |
||||
if (sortBy == null) { |
||||
Binding binding = column.DisplayMemberBinding as Binding; |
||||
if (binding != null && binding.Path != null) { |
||||
sortBy = binding.Path.Path; |
||||
} |
||||
} |
||||
|
||||
dataView.SortDescriptions.Clear(); |
||||
if (sortBy != null) { |
||||
ListSortDirection direction; |
||||
if (currentDirection == ColumnSortDirection.Descending) |
||||
direction = ListSortDirection.Descending; |
||||
else |
||||
direction = ListSortDirection.Ascending; |
||||
dataView.SortDescriptions.Add(new SortDescription(sortBy, direction)); |
||||
} |
||||
dataView.Refresh(); |
||||
} |
||||
} |
||||
} |
||||
|
||||
public enum ColumnSortDirection |
||||
{ |
||||
None, |
||||
Ascending, |
||||
Descending |
||||
} |
||||
|
||||
public enum ListViewSortMode |
||||
{ |
||||
/// <summary>
|
||||
/// Disable automatic sorting when sortable columns are clicked.
|
||||
/// </summary>
|
||||
None, |
||||
/// <summary>
|
||||
/// Fully automatic sorting.
|
||||
/// </summary>
|
||||
Automatic, |
||||
/// <summary>
|
||||
/// Automatically update SortDirection and CurrentSortColumn properties,
|
||||
/// but do not actually sort the data.
|
||||
/// </summary>
|
||||
HalfAutomatic |
||||
} |
||||
|
||||
sealed class ColumnSortDirectionToVisibilityConverter : IValueConverter |
||||
{ |
||||
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) |
||||
{ |
||||
return Equals(value, parameter) ? Visibility.Visible : Visibility.Collapsed; |
||||
} |
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) |
||||
{ |
||||
throw new NotSupportedException(); |
||||
} |
||||
} |
||||
} |
||||
Loading…
Reference in new issue