From e3eedc5ffac4ff69225d77f5027e6f694e87f9da Mon Sep 17 00:00:00 2001 From: Brandon Watson Date: Sat, 3 Apr 2021 16:38:44 -0400 Subject: [PATCH] Updating xamarin and ripping out datagrid --- .../Aurora.gtk/Aurora.gtk.csproj | 41 +- .../Aurora.gtk/gtk-gui/gui.stetic | 1 + .../Aurora.gtk/packages.config | 9 +- .../Aurora.test/Aurora.test.csproj | 56 +- aurora-sharp-desktop/Aurora/Aurora.csproj | 7 +- .../Components/DataGrid/ColumnCollection.cs | 8 - .../Design/Components/DataGrid/DataGrid.xaml | 95 --- .../Components/DataGrid/DataGrid.xaml.cs | 756 ------------------ .../Components/DataGrid/DataGridColumn.cs | 135 ---- .../DataGrid/DataGridRowTemplateSelector.cs | 30 - .../Components/DataGrid/DataGridViewCell.cs | 163 ---- .../Components/DataGrid/IColorProvider.cs | 8 - .../Components/DataGrid/PaletteCollection.cs | 17 - .../Design/Components/DataGrid/SortData.cs | 51 -- .../DataGrid/SortDataTypeConverter.cs | 24 - .../Components/DataGrid/SortingOrder.cs | 9 - .../Design/Components/DataGrid/down.png | Bin 7104 -> 0 bytes .../Aurora/Design/Components/DataGrid/up.png | Bin 7104 -> 0 bytes .../Design/Components/Library/Library.xaml | 2 +- 19 files changed, 28 insertions(+), 1384 deletions(-) delete mode 100644 aurora-sharp-desktop/Aurora/Design/Components/DataGrid/ColumnCollection.cs delete mode 100644 aurora-sharp-desktop/Aurora/Design/Components/DataGrid/DataGrid.xaml delete mode 100644 aurora-sharp-desktop/Aurora/Design/Components/DataGrid/DataGrid.xaml.cs delete mode 100644 aurora-sharp-desktop/Aurora/Design/Components/DataGrid/DataGridColumn.cs delete mode 100644 aurora-sharp-desktop/Aurora/Design/Components/DataGrid/DataGridRowTemplateSelector.cs delete mode 100644 aurora-sharp-desktop/Aurora/Design/Components/DataGrid/DataGridViewCell.cs delete mode 100644 aurora-sharp-desktop/Aurora/Design/Components/DataGrid/IColorProvider.cs delete mode 100644 aurora-sharp-desktop/Aurora/Design/Components/DataGrid/PaletteCollection.cs delete mode 100644 aurora-sharp-desktop/Aurora/Design/Components/DataGrid/SortData.cs delete mode 100644 aurora-sharp-desktop/Aurora/Design/Components/DataGrid/SortDataTypeConverter.cs delete mode 100644 aurora-sharp-desktop/Aurora/Design/Components/DataGrid/SortingOrder.cs delete mode 100644 aurora-sharp-desktop/Aurora/Design/Components/DataGrid/down.png delete mode 100644 aurora-sharp-desktop/Aurora/Design/Components/DataGrid/up.png diff --git a/aurora-sharp-desktop/Aurora.gtk/Aurora.gtk.csproj b/aurora-sharp-desktop/Aurora.gtk/Aurora.gtk.csproj index d80583a..a25420a 100644 --- a/aurora-sharp-desktop/Aurora.gtk/Aurora.gtk.csproj +++ b/aurora-sharp-desktop/Aurora.gtk/Aurora.gtk.csproj @@ -1,6 +1,6 @@ - + Debug @@ -28,42 +28,24 @@ - - False - - - False - - - False - - - False - - - False - - - False - - ..\packages\Xamarin.Forms.4.3.0.991211\lib\netstandard2.0\Xamarin.Forms.Core.dll + ..\packages\Xamarin.Forms.5.0.0.2012\lib\netstandard2.0\Xamarin.Forms.Core.dll - ..\packages\Xamarin.Forms.4.3.0.991211\lib\netstandard2.0\Xamarin.Forms.Platform.dll + ..\packages\Xamarin.Forms.5.0.0.2012\lib\netstandard2.0\Xamarin.Forms.Platform.dll - ..\packages\Xamarin.Forms.4.3.0.991211\lib\netstandard2.0\Xamarin.Forms.Xaml.dll + ..\packages\Xamarin.Forms.5.0.0.2012\lib\netstandard2.0\Xamarin.Forms.Xaml.dll ..\packages\OpenTK.3.1.0\lib\net20\OpenTK.dll - ..\packages\Xamarin.Forms.Platform.GTK.4.3.0.991211\lib\net45\webkit-sharp.dll + ..\packages\Xamarin.Forms.Platform.GTK.5.0.0.2012\lib\net45\webkit-sharp.dll - ..\packages\Xamarin.Forms.Platform.GTK.4.3.0.991211\lib\net45\Xamarin.Forms.Platform.GTK.dll + ..\packages\Xamarin.Forms.Platform.GTK.5.0.0.2012\lib\net45\Xamarin.Forms.Platform.GTK.dll ..\packages\System.Reflection.4.3.0\lib\net462\System.Reflection.dll @@ -168,6 +150,15 @@ ..\packages\Autofac.5.0.0\lib\net461\Autofac.dll + + + + + + + + ..\packages\Xamarin.Forms.DataGrid.4.8.0\lib\netstandard2.0\Xamarin.Forms.DataGrid.dll + @@ -545,5 +536,5 @@ - + \ No newline at end of file diff --git a/aurora-sharp-desktop/Aurora.gtk/gtk-gui/gui.stetic b/aurora-sharp-desktop/Aurora.gtk/gtk-gui/gui.stetic index 0d4f676..6b77eb7 100644 --- a/aurora-sharp-desktop/Aurora.gtk/gtk-gui/gui.stetic +++ b/aurora-sharp-desktop/Aurora.gtk/gtk-gui/gui.stetic @@ -2,6 +2,7 @@ .. + 2.12 diff --git a/aurora-sharp-desktop/Aurora.gtk/packages.config b/aurora-sharp-desktop/Aurora.gtk/packages.config index 45a8c07..1bce156 100644 --- a/aurora-sharp-desktop/Aurora.gtk/packages.config +++ b/aurora-sharp-desktop/Aurora.gtk/packages.config @@ -8,7 +8,7 @@ - + @@ -25,7 +25,7 @@ - + @@ -34,6 +34,7 @@ - - + + + \ No newline at end of file diff --git a/aurora-sharp-desktop/Aurora.test/Aurora.test.csproj b/aurora-sharp-desktop/Aurora.test/Aurora.test.csproj index 6c6b85c..7d9a160 100644 --- a/aurora-sharp-desktop/Aurora.test/Aurora.test.csproj +++ b/aurora-sharp-desktop/Aurora.test/Aurora.test.csproj @@ -1,6 +1,6 @@ - netcoreapp3.0 + netcoreapp3.1 false @@ -23,9 +23,6 @@ - - PreserveNewest - PreserveNewest @@ -56,62 +53,11 @@ PreserveNewest - - PreserveNewest - PreserveNewest PreserveNewest - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - \ No newline at end of file diff --git a/aurora-sharp-desktop/Aurora/Aurora.csproj b/aurora-sharp-desktop/Aurora/Aurora.csproj index 1e65791..b047fa9 100644 --- a/aurora-sharp-desktop/Aurora/Aurora.csproj +++ b/aurora-sharp-desktop/Aurora/Aurora.csproj @@ -5,11 +5,12 @@ pdbonly + true - - + + @@ -24,6 +25,7 @@ + @@ -43,7 +45,6 @@ - diff --git a/aurora-sharp-desktop/Aurora/Design/Components/DataGrid/ColumnCollection.cs b/aurora-sharp-desktop/Aurora/Design/Components/DataGrid/ColumnCollection.cs deleted file mode 100644 index 1906bcb..0000000 --- a/aurora-sharp-desktop/Aurora/Design/Components/DataGrid/ColumnCollection.cs +++ /dev/null @@ -1,8 +0,0 @@ -using System.Collections.Generic; - -namespace Aurora.Design.Components.DataGrid -{ - public sealed class ColumnCollection : List - { - } -} diff --git a/aurora-sharp-desktop/Aurora/Design/Components/DataGrid/DataGrid.xaml b/aurora-sharp-desktop/Aurora/Design/Components/DataGrid/DataGrid.xaml deleted file mode 100644 index d6ae78c..0000000 --- a/aurora-sharp-desktop/Aurora/Design/Components/DataGrid/DataGrid.xaml +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/aurora-sharp-desktop/Aurora/Design/Components/DataGrid/DataGrid.xaml.cs b/aurora-sharp-desktop/Aurora/Design/Components/DataGrid/DataGrid.xaml.cs deleted file mode 100644 index fe7e878..0000000 --- a/aurora-sharp-desktop/Aurora/Design/Components/DataGrid/DataGrid.xaml.cs +++ /dev/null @@ -1,756 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.Specialized; -using System.Collections.ObjectModel; -using System.Linq; -using System.Reflection; -using System.Windows.Input; -using Xamarin.Forms; -using Aurora.Utils; - -namespace Aurora.Design.Components.DataGrid -{ - public partial class DataGrid : Grid - { - #region Private Fields - private ObservableCollection _internalItems; - - private Dictionary _sortingOrders; - - #endregion Fields - - #region Constructor - - public DataGrid() : this(ListViewCachingStrategy.RetainElement) - { - } - - public DataGrid(ListViewCachingStrategy cachingStrategy) - { - InitializeComponent(); - BackgroundColor = Color.Transparent; - - _sortingOrders = new Dictionary(); - - DataList.ItemTemplate = new DataGridRowTemplateSelector(); - - DataList.ItemSelected += (s, e) => - { - if (SelectionEnabled) - { - SelectedItem = DataList.SelectedItem; - } - else - { - DataList.SelectedItem = null; - } - - ItemSelected?.Invoke(this, e); - }; - - DataList.Refreshing += (s, e) => - { - Refreshing?.Invoke(this, e); - }; - - DataList.SetBinding(ListView.RowHeightProperty, new Binding("RowHeight", source: this)); - } - #endregion Constructor - - #region Public Fields - public event EventHandler Refreshing; - public event EventHandler ItemSelected; - - #endregion Public Fields - - #region Bindable properties - public static readonly BindableProperty ActiveRowColorProperty = - BindableProperty.Create( - nameof(ActiveRowColor), - typeof(Color), - typeof(DataGrid), - Color.FromRgb(128, 144, 160), - coerceValue: (bindable, value) => - { - if (!(bindable as DataGrid).SelectionEnabled) - throw new InvalidOperationException("Datagrid must be SelectionEnabled=true to set ActiveRowColor"); - return value; - }); - - public static readonly BindableProperty HeaderBackgroundProperty = - BindableProperty.Create( - nameof(HeaderBackground), - typeof(Color), - typeof(DataGrid), - Color.White, - propertyChanged: (bindable, oldValue, newValue) => - { - var self = bindable as DataGrid; - if (self._headerView != null && !self.HeaderBordersVisible) - self._headerView.BackgroundColor = (Color)newValue; - }); - - public static readonly BindableProperty BorderColorProperty = - BindableProperty.Create( - nameof(BorderColor), - typeof(Color), - typeof(DataGrid), - Color.Black, - propertyChanged: (bindable, oldValue, newValue) => - { - var self = bindable as DataGrid; - if (self.HeaderBordersVisible) - self._headerView.BackgroundColor = (Color)newValue; - - if (self.Columns != null && self.ItemsSource != null) - self.Reload(); - }); - - public static readonly BindableProperty RowsBackgroundColorPaletteProperty = - BindableProperty.Create(nameof(RowsBackgroundColorPalette), - typeof(IColorProvider), - typeof(DataGrid), - new PaletteCollection { default(Color) }, - propertyChanged: (bindable, oldValue, newValue) => - { - var self = bindable as DataGrid; - if (self.Columns != null && self.ItemsSource != null) - self.Reload(); - }); - - public static readonly BindableProperty RowsTextColorPaletteProperty = - BindableProperty.Create( - nameof(RowsTextColorPalette), - typeof(IColorProvider), - typeof(DataGrid), - new PaletteCollection { Color.Black }, - propertyChanged: (bindable, oldValue, newValue) => - { - var self = bindable as DataGrid; - if (self.Columns != null && self.ItemsSource != null) - self.Reload(); - }); - - public static readonly BindableProperty ColumnsProperty = - BindableProperty.Create( - nameof(Columns), - typeof(ColumnCollection), - typeof(DataGrid), - propertyChanged: (bindable, oldValue, newValue) => - { - (bindable as DataGrid).InitHeaderView(); - }, - defaultValueCreator: bindable => { return new ColumnCollection(); } - ); - - public static BindableProperty ItemsSourceProperty = - BindableProperty.Create( - propertyName: nameof(ItemsSource), - returnType: typeof(IEnumerable), - declaringType: typeof(DataGrid), - defaultBindingMode: BindingMode.TwoWay, - propertyChanged: (bindable, oldValue, newValue) => - { - DataGrid self = bindable as DataGrid; - //ObservableCollection Tracking - if (oldValue != null && oldValue is INotifyCollectionChanged) - { - (oldValue as INotifyCollectionChanged).CollectionChanged -= self.HandleItemsSourceCollectionChanged; - } - - if (newValue != null && newValue is INotifyCollectionChanged) - { - (newValue as INotifyCollectionChanged).CollectionChanged += self.HandleItemsSourceCollectionChanged; - - self.InternalItems = new ObservableCollection(((IEnumerable)newValue)); - //Assign listview item source - self.DataList.ItemsSource = self.InternalItems; - self.DataList.SetBinding(ListView.ItemsSourceProperty, new Binding("ItemsSource", source: self)); - } - - if (self.SelectedItem != null && !self.InternalItems.Contains(self.SelectedItem)) - { - self.SelectedItem = null; - } - - if (self.NoDataView != null) - { - if (self.ItemsSource == null || self.InternalItems.Count() == 0) - { - self._noDataView.IsVisible = true; - } - - else if (self._noDataView.IsVisible) - { - self._noDataView.IsVisible = false; - } - } - }); - private void HandleItemsSourceCollectionChanged(object sender, NotifyCollectionChangedEventArgs e) - { - - if (e.NewItems != null) - { - foreach (object item in e.NewItems) - { - InternalItems.Add(item); - } - } - - if (e.OldItems != null) - { - foreach (object item in e.OldItems) - { - InternalItems.Remove(item); - } - } - if (SelectedItem != null && !InternalItems.Contains(SelectedItem)) - { - SelectedItem = null; - } - } - - public static readonly BindableProperty RowHeightProperty = - BindableProperty.Create(nameof(RowHeight), typeof(int), typeof(DataGrid), 40, - propertyChanged: (bindable, oldValue, newValue) => - { - var self = bindable as DataGrid; - self.DataList.RowHeight = (int)newValue; - }); - - - public static readonly BindableProperty HeaderHeightProperty = - BindableProperty.Create(nameof(HeaderHeight), typeof(int), typeof(DataGrid), 40, - propertyChanged: (bindable, oldValue, newValue) => - { - var self = bindable as DataGrid; - self._headerView.HeightRequest = (int)newValue; - }); - - public static readonly BindableProperty IsSortableProperty = - BindableProperty.Create(nameof(IsSortable), typeof(bool), typeof(DataGrid), true); - - public static readonly BindableProperty FontSizeProperty = - BindableProperty.Create(nameof(FontSize), typeof(double), typeof(DataGrid), 13.0); - - public static readonly BindableProperty FontFamilyProperty = - BindableProperty.Create( - nameof(FontFamily), - typeof(string), - typeof(DataGrid), - Font.Default.FontFamily); - - public static readonly BindableProperty SelectedItemProperty = - BindableProperty.Create( - nameof(SelectedItem), - typeof(object), - typeof(DataGrid), - null, - BindingMode.TwoWay, - coerceValue: (bindable, value) => - { - var self = bindable as DataGrid; - if (!self.SelectionEnabled && value != null) - { - throw new InvalidOperationException("Datagrid must be SelectionEnabled=true to set SelectedItem"); - } - if (self.InternalItems != null && self.InternalItems.Contains(value)) - { - return value; - } - else - { - return null; - } - }, - propertyChanged: (bindable, oldValue, newValue) => - { - var self = bindable as DataGrid; - if (self.DataList.SelectedItem != newValue) - { - self.DataList.SelectedItem = newValue; - } - } - ); - - public static readonly BindableProperty SelectionEnabledProperty = - BindableProperty.Create(nameof(SelectionEnabled), typeof(bool), typeof(DataGrid), true, - propertyChanged: (bindable, oldValue, newValue) => - { - var self = bindable as DataGrid; - if (!self.SelectionEnabled && self.SelectedItem != null) - { - self.SelectedItem = null; - } - }); - - public static readonly BindableProperty PullToRefreshCommandProperty = - BindableProperty.Create(nameof(PullToRefreshCommand), typeof(ICommand), typeof(DataGrid), null, - propertyChanged: (bindable, oldValue, newValue) => - { - var self = bindable as DataGrid; - if (newValue == null) - { - self.DataList.IsPullToRefreshEnabled = false; - self.DataList.RefreshCommand = null; - } - else - { - self.DataList.IsPullToRefreshEnabled = true; - self.DataList.RefreshCommand = newValue as ICommand; - } - }); - - public static readonly BindableProperty IsRefreshingProperty = - BindableProperty.Create( - nameof(IsRefreshing), - typeof(bool), - typeof(DataGrid), - false, - BindingMode.TwoWay, - propertyChanged: (bindable, oldValue, newValue) => - { - (bindable as DataGrid).DataList.IsRefreshing = (bool)newValue; - }); - - public static readonly BindableProperty BorderThicknessProperty = - BindableProperty.Create( - nameof(BorderThickness), - typeof(Thickness), - typeof(DataGrid), - new Thickness(1), - propertyChanged: (bindable, oldValue, newValue) => - { - (bindable as DataGrid)._headerView.ColumnSpacing = ((Thickness)newValue).HorizontalThickness / 2; - (bindable as DataGrid)._headerView.Padding = ((Thickness)newValue).HorizontalThickness / 2; - }); - - public static readonly BindableProperty HeaderBordersVisibleProperty = - BindableProperty.Create( - nameof(HeaderBordersVisible), - typeof(bool), - typeof(DataGrid), - true, - propertyChanged: (bindable, oldValue, newValue) => (bindable as DataGrid)._headerView.BackgroundColor = (bool)newValue ? (bindable as DataGrid).BorderColor : (bindable as DataGrid).HeaderBackground); - - public static readonly BindableProperty SortedColumnIndexProperty = - BindableProperty.Create( - nameof(SortedColumnIndex), - typeof(SortData), - typeof(DataGrid), - null, - BindingMode.TwoWay, - validateValue: (bindable, v) => - { - var self = bindable as DataGrid; - var sData = (SortData)v; - - return - sData == null || //setted to null - self.Columns == null || // Columns binded but not setted - self.Columns.Count == 0 || //columns not setted yet - (sData.Index < self.Columns.Count && self.Columns.ElementAt(sData.Index).SortingEnabled); - }, - propertyChanged: (bindable, oldValue, newValue) => - { - var self = bindable as DataGrid; - if (oldValue != newValue) - self.SortItems((SortData)newValue); - }); - - - public static readonly BindableProperty HeaderLabelStyleProperty = - BindableProperty.Create(nameof(HeaderLabelStyle), typeof(Style), typeof(DataGrid)); - - public static readonly BindableProperty AscendingIconProperty = - BindableProperty.Create( - nameof(AscendingIcon), - typeof(ImageSource), - typeof(DataGrid), - ImageSource.FromResource("Xamarin.Forms.DataGrid.up.png", - typeof(DataGrid).GetTypeInfo().Assembly)); - - public static readonly BindableProperty DescendingIconProperty = - BindableProperty.Create( - nameof(DescendingIcon), - typeof(ImageSource), - typeof(DataGrid), - ImageSource.FromResource("Xamarin.Forms.DataGrid.down.png", - typeof(DataGrid).GetTypeInfo().Assembly)); - - public static readonly BindableProperty DescendingIconStyleProperty = - BindableProperty.Create(nameof(DescendingIconStyle), typeof(Style), typeof(DataGrid), null, - - propertyChanged: (bindable, oldValue, newValue) => - { - var self = bindable as DataGrid; - var style = (newValue as Style).Setters.FirstOrDefault(x => x.Property == Image.SourceProperty); - if (style != null) - { - if (style.Value is string vs) - self.DescendingIcon = ImageSource.FromFile(vs); - else - self.DescendingIcon = (ImageSource)style.Value; - } - }); - - public static readonly BindableProperty AscendingIconStyleProperty = - BindableProperty.Create(nameof(AscendingIconStyle), typeof(Style), typeof(DataGrid), null, - coerceValue: (bindable, v) => - { - var self = bindable as DataGrid; - - return v; - }, - - propertyChanged: (bindable, oldValue, newValue) => - { - var self = bindable as DataGrid; - if ((newValue as Style).Setters.Any(x => x.Property == Image.SourceProperty)) - { - var style = (newValue as Style).Setters.FirstOrDefault(x => x.Property == Image.SourceProperty); - if (style != null) - { - if (style.Value is string vs) - self.AscendingIcon = ImageSource.FromFile(vs); - else - self.AscendingIcon = (ImageSource)style.Value; - } - } - }); - - public static readonly BindableProperty NoDataViewProperty = - BindableProperty.Create(nameof(NoDataView), typeof(View), typeof(DataGrid), - propertyChanged: (bindable, oldValue, newValue) => - { - if (oldValue != newValue) - (bindable as DataGrid)._noDataView.Content = newValue as View; - }); - #endregion - - #region Properties - public Color ActiveRowColor - { - get { return (Color)GetValue(ActiveRowColorProperty); } - set { SetValue(ActiveRowColorProperty, value); } - } - - public Color HeaderBackground - { - get { return (Color)GetValue(HeaderBackgroundProperty); } - set { SetValue(HeaderBackgroundProperty, value); } - } - - [Obsolete("Please use HeaderLabelStyle", true)] - public Color HeaderTextColor - { - get; set; - } - - public Color BorderColor - { - get { return (Color)GetValue(BorderColorProperty); } - set { SetValue(BorderColorProperty, value); } - } - - public IColorProvider RowsBackgroundColorPalette - { - get { return (IColorProvider)GetValue(RowsBackgroundColorPaletteProperty); } - set { SetValue(RowsBackgroundColorPaletteProperty, value); } - } - - public IColorProvider RowsTextColorPalette - { - get { return (IColorProvider)GetValue(RowsTextColorPaletteProperty); } - set { SetValue(RowsTextColorPaletteProperty, value); } - } - - public IEnumerable ItemsSource - { - get { return (IEnumerable)GetValue(ItemsSourceProperty); } - set { SetValue(ItemsSourceProperty, value); } - } - - internal ObservableCollection InternalItems - { - get { return _internalItems; } - set - { - if (value != _internalItems) - { - _internalItems = value; - if (IsSortable && SortedColumnIndex != null) - { - SortItems(SortedColumnIndex); - } - } - DataList.ItemsSource = _internalItems; - } - } - - public ColumnCollection Columns - { - get { return (ColumnCollection)GetValue(ColumnsProperty); } - set { SetValue(ColumnsProperty, value); } - } - - public double FontSize - { - get { return (double)GetValue(FontSizeProperty); } - set { SetValue(FontSizeProperty, value); } - } - - [Obsolete("Please use HeaderLabelStyle", true)] - public double HeaderFontSize - { - get; set; - } - - public string FontFamily - { - get { return (string)GetValue(FontFamilyProperty); } - set { SetValue(FontFamilyProperty, value); } - } - - public int RowHeight - { - get { return (int)GetValue(RowHeightProperty); } - set { SetValue(RowHeightProperty, value); } - } - - public int HeaderHeight - { - get { return (int)GetValue(HeaderHeightProperty); } - set { SetValue(HeaderHeightProperty, value); } - } - - public bool IsSortable - { - get { return (bool)GetValue(IsSortableProperty); } - set { SetValue(IsSortableProperty, value); } - } - - public bool SelectionEnabled - { - get { return (bool)GetValue(SelectionEnabledProperty); } - set { SetValue(SelectionEnabledProperty, value); } - } - - public object SelectedItem - { - get { return GetValue(SelectedItemProperty); } - set { SetValue(SelectedItemProperty, value); } - } - - public ICommand PullToRefreshCommand - { - get { return (ICommand)GetValue(PullToRefreshCommandProperty); } - set { SetValue(PullToRefreshCommandProperty, value); } - } - - public bool IsRefreshing - { - get { return (bool)GetValue(IsRefreshingProperty); } - set { SetValue(IsRefreshingProperty, value); } - } - - public Thickness BorderThickness - { - get { return (Thickness)GetValue(BorderThicknessProperty); } - set { SetValue(BorderThicknessProperty, value); } - } - - public bool HeaderBordersVisible - { - get { return (bool)GetValue(HeaderBordersVisibleProperty); } - set { SetValue(HeaderBordersVisibleProperty, value); } - } - - public SortData SortedColumnIndex - { - get { return (SortData)GetValue(SortedColumnIndexProperty); } - set { SetValue(SortedColumnIndexProperty, value); } - } - - public Style HeaderLabelStyle - { - get { return (Style)GetValue(HeaderLabelStyleProperty); } - set { SetValue(HeaderLabelStyleProperty, value); } - } - - public ImageSource AscendingIcon - { - get { return (ImageSource)GetValue(AscendingIconProperty); } - set { SetValue(AscendingIconProperty, value); } - } - - public ImageSource DescendingIcon - { - get { return (ImageSource)GetValue(DescendingIconProperty); } - set { SetValue(DescendingIconProperty, value); } - } - - public Style AscendingIconStyle - { - get { return (Style)GetValue(AscendingIconStyleProperty); } - set { SetValue(AscendingIconStyleProperty, value); } - } - - public Style DescendingIconStyle - { - get { return (Style)GetValue(DescendingIconStyleProperty); } - set { SetValue(DescendingIconStyleProperty, value); } - } - - public View NoDataView - { - get { return (View)GetValue(NoDataViewProperty); } - set { SetValue(NoDataViewProperty, value); } - } - #endregion - - #region UI Methods - protected override void OnParentSet() - { - base.OnParentSet(); - InitHeaderView(); - } - - protected override void OnBindingContextChanged() - { - base.OnBindingContextChanged(); - SetColumnsBindingContext(); - } - - #endregion - - #region Private Methods - - private void Reload() - { - InternalItems = new ObservableCollection(_internalItems); - } - private void SortItems(SortData sData) - { - if (InternalItems == null || sData.Index >= Columns.Count || !Columns[sData.Index].SortingEnabled) - return; - - var items = InternalItems; - var column = Columns[sData.Index]; - SortingOrder order = sData.Order; - - if (!IsSortable) - throw new InvalidOperationException("This DataGrid is not sortable"); - else if (column.PropertyName == null) - throw new InvalidOperationException("Please set the PropertyName property of Column"); - - //Sort - // if (order == SortingOrder.Descendant) - // items = items.OrderByDescending(x => ReflectionUtils.GetValueByPath(x, column.PropertyName)).ToList(); - // else - // items = items.OrderBy(x => ReflectionUtils.GetValueByPath(x, column.PropertyName)).ToList(); - - column.SortingIcon.Style = (order == SortingOrder.Descendant) ? - AscendingIconStyle ?? (Style)_headerView.Resources["DescendingIconStyle"] : - DescendingIconStyle ?? (Style)_headerView.Resources["AscendingIconStyle"]; - - //Support DescendingIcon property (if setted) - if (!column.SortingIcon.Style.Setters.Any(x => x.Property == Image.SourceProperty)) - { - if (order == SortingOrder.Descendant && DescendingIconProperty.DefaultValue != DescendingIcon) - column.SortingIcon.Source = DescendingIcon; - if (order == SortingOrder.Ascendant && AscendingIconProperty.DefaultValue != AscendingIcon) - column.SortingIcon.Source = AscendingIcon; - } - - for (int i = 0; i < Columns.Count; i++) - { - if (i != sData.Index) - { - if (Columns[i].SortingIcon.Style != null) - Columns[i].SortingIcon.Style = null; - if (Columns[i].SortingIcon.Source != null) - Columns[i].SortingIcon.Source = null; - _sortingOrders[i] = SortingOrder.None; - } - } - - _internalItems = items; - - _sortingOrders[sData.Index] = order; - SortedColumnIndex = sData; - } - - private View GetHeaderViewForColumn(DataGridColumn column) - { - column.HeaderLabel.Style = column.HeaderLabelStyle ?? this.HeaderLabelStyle ?? (Style)_headerView.Resources["HeaderDefaultStyle"]; - - Grid grid = new Grid - { - ColumnSpacing = 0, - }; - - grid.ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(1, GridUnitType.Star) }); - grid.ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(1, GridUnitType.Auto) }); - - if (IsSortable) - { - column.SortingIcon.Style = (Style)_headerView.Resources["ImageStyleBase"]; - - grid.Children.Add(column.SortingIcon); - Grid.SetColumn(column.SortingIcon, 1); - - TapGestureRecognizer tgr = new TapGestureRecognizer(); - tgr.Tapped += (s, e) => - { - int index = Columns.IndexOf(column); - SortingOrder order = _sortingOrders[index] == SortingOrder.Ascendant ? SortingOrder.Descendant : SortingOrder.Ascendant; - - if (Columns.ElementAt(index).SortingEnabled) - SortedColumnIndex = new SortData(index, order); - }; - grid.GestureRecognizers.Add(tgr); - } - - grid.Children.Add(column.HeaderLabel); - - return grid; - } - - private void InitHeaderView() - { - SetColumnsBindingContext(); - _headerView.Children.Clear(); - _headerView.ColumnDefinitions.Clear(); - _sortingOrders.Clear(); - - _headerView.Padding = new Thickness(BorderThickness.Left, BorderThickness.Top, BorderThickness.Right, 0); - _headerView.ColumnSpacing = BorderThickness.HorizontalThickness / 2; - - if (Columns != null) - { - foreach (var col in Columns) - { - _headerView.ColumnDefinitions.Add(new ColumnDefinition { Width = col.Width }); - - var cell = GetHeaderViewForColumn(col); - - _headerView.Children.Add(cell); - Grid.SetColumn(cell, Columns.IndexOf(col)); - - _sortingOrders.Add(Columns.IndexOf(col), SortingOrder.None); - } - } - } - - private void SetColumnsBindingContext() - { - if (Columns != null) - foreach (var c in Columns) - c.BindingContext = BindingContext; - } - - #endregion Private Methods - } -} diff --git a/aurora-sharp-desktop/Aurora/Design/Components/DataGrid/DataGridColumn.cs b/aurora-sharp-desktop/Aurora/Design/Components/DataGrid/DataGridColumn.cs deleted file mode 100644 index 59d2ab5..0000000 --- a/aurora-sharp-desktop/Aurora/Design/Components/DataGrid/DataGridColumn.cs +++ /dev/null @@ -1,135 +0,0 @@ -using System; -using Xamarin.Forms; - -namespace Aurora.Design.Components.DataGrid -{ - public class DataGridColumn : BindableObject, IDefinition - { - #region bindable properties - public static readonly BindableProperty WidthProperty = - BindableProperty.Create(nameof(Width), typeof(GridLength), typeof(DataGridColumn), new GridLength(1, GridUnitType.Star), - propertyChanged: (bindable, oldValue, newValue) => - { - if (oldValue != newValue) - { - (bindable as DataGridColumn).OnSizeChanged(); - }; - }); - - public static readonly BindableProperty TitleProperty = - BindableProperty.Create(nameof(Title), typeof(string), typeof(DataGridColumn), string.Empty, - propertyChanged: (b, o, n) => (b as DataGridColumn).HeaderLabel.Text = (string)n); - - public static readonly BindableProperty FormattedTitleProperty = - BindableProperty.Create(nameof(FormattedTitle), typeof(FormattedString), typeof(DataGridColumn), - propertyChanged: (b, o, n) => (b as DataGridColumn).HeaderLabel.FormattedText = (FormattedString)n); - - public static readonly BindableProperty PropertyNameProperty = - BindableProperty.Create(nameof(PropertyName), typeof(string), typeof(DataGridColumn), null); - - public static readonly BindableProperty StringFormatProperty = - BindableProperty.Create(nameof(StringFormat), typeof(string), typeof(DataGridColumn), null); - - public static readonly BindableProperty CellTemplateProperty = - BindableProperty.Create(nameof(CellTemplate), typeof(DataTemplate), typeof(DataGridColumn), null); - - public static readonly BindableProperty HorizontalContentAlignmentProperty = - BindableProperty.Create(nameof(HorizontalContentAlignment), typeof(LayoutOptions), typeof(DataGridColumn), LayoutOptions.Center); - - public static readonly BindableProperty VerticalContentAlignmentProperty = - BindableProperty.Create(nameof(VerticalContentAlignment), typeof(LayoutOptions), typeof(DataGridColumn), LayoutOptions.Center); - - public static readonly BindableProperty SortingEnabledProperty = - BindableProperty.Create(nameof(SortingEnabled), typeof(bool), typeof(DataGridColumn), true); - - public static readonly BindableProperty HeaderLabelStyleProperty = - BindableProperty.Create(nameof(HeaderLabelStyle), typeof(Style), typeof(DataGridColumn), - propertyChanged: (b, o, n) => - { - if ((b as DataGridColumn).HeaderLabel != null && (o != n)) - (b as DataGridColumn).HeaderLabel.Style = n as Style; - }); - - #endregion - - #region properties - - public GridLength Width - { - get { return (GridLength)GetValue(WidthProperty); } - set { SetValue(WidthProperty, value); } - } - - public string Title - { - get { return (string)GetValue(TitleProperty); } - set { SetValue(TitleProperty, value); } - } - - public FormattedString FormattedTitle - { - get { return (string)GetValue(FormattedTitleProperty); } - set { SetValue(FormattedTitleProperty, value); } - } - public string PropertyName - { - get { return (string)GetValue(PropertyNameProperty); } - set { SetValue(PropertyNameProperty, value); } - } - - public string StringFormat - { - get { return (string)GetValue(StringFormatProperty); } - set { SetValue(StringFormatProperty, value); } - } - - public DataTemplate CellTemplate - { - get { return (DataTemplate)GetValue(CellTemplateProperty); } - set { SetValue(CellTemplateProperty, value); } - } - - internal Image SortingIcon { get; set; } - internal Label HeaderLabel { get; set; } - - public LayoutOptions HorizontalContentAlignment - { - get { return (LayoutOptions)GetValue(HorizontalContentAlignmentProperty); } - set { SetValue(HorizontalContentAlignmentProperty, value); } - } - - public LayoutOptions VerticalContentAlignment - { - get { return (LayoutOptions)GetValue(VerticalContentAlignmentProperty); } - set { SetValue(VerticalContentAlignmentProperty, value); } - } - - public bool SortingEnabled - { - get { return (bool)GetValue(SortingEnabledProperty); } - set { SetValue(SortingEnabledProperty, value); } - } - - public Style HeaderLabelStyle - { - get { return (Style)GetValue(HeaderLabelStyleProperty); } - set { SetValue(HeaderLabelStyleProperty, value); } - } - - #endregion - - public event EventHandler SizeChanged; - - public DataGridColumn() - { - HeaderLabel = new Label(); - SortingIcon = new Image(); - } - - void OnSizeChanged() - { - SizeChanged?.Invoke(this, EventArgs.Empty); - } - } - -} diff --git a/aurora-sharp-desktop/Aurora/Design/Components/DataGrid/DataGridRowTemplateSelector.cs b/aurora-sharp-desktop/Aurora/Design/Components/DataGrid/DataGridRowTemplateSelector.cs deleted file mode 100644 index b27648b..0000000 --- a/aurora-sharp-desktop/Aurora/Design/Components/DataGrid/DataGridRowTemplateSelector.cs +++ /dev/null @@ -1,30 +0,0 @@ -using Xamarin.Forms; -namespace Aurora.Design.Components.DataGrid -{ - internal class DataGridRowTemplateSelector : DataTemplateSelector - { - private static DataTemplate _dataGridRowTemplate; - - public DataGridRowTemplateSelector() - { - _dataGridRowTemplate = new DataTemplate(typeof(DataGridViewCell)); - } - - protected override DataTemplate OnSelectTemplate(object item, BindableObject container) - { - ListView listView = container as ListView; - DataGrid dataGrid = listView.Parent as DataGrid; - var items = dataGrid.InternalItems; - - _dataGridRowTemplate.SetValue(DataGridViewCell.DataGridProperty, dataGrid); - _dataGridRowTemplate.SetValue(DataGridViewCell.RowContextProperty, item); - - if (items != null) - { - _dataGridRowTemplate.SetValue(DataGridViewCell.IndexProperty, items.IndexOf(item)); - } - - return _dataGridRowTemplate; - } - } -} diff --git a/aurora-sharp-desktop/Aurora/Design/Components/DataGrid/DataGridViewCell.cs b/aurora-sharp-desktop/Aurora/Design/Components/DataGrid/DataGridViewCell.cs deleted file mode 100644 index 7ba1c1f..0000000 --- a/aurora-sharp-desktop/Aurora/Design/Components/DataGrid/DataGridViewCell.cs +++ /dev/null @@ -1,163 +0,0 @@ -using Xamarin.Forms; -namespace Aurora.Design.Components.DataGrid -{ - internal sealed class DataGridViewCell : ViewCell - { - #region Fields - Grid _mainLayout; - Color _bgColor; - Color _textColor; - bool _hasSelected; - #endregion - - #region properties - public DataGrid DataGrid - { - get { return (DataGrid)GetValue(DataGridProperty); } - set { SetValue(DataGridProperty, value); } - } - - public int Index - { - get { return (int)GetValue(IndexProperty); } - set { SetValue(IndexProperty, value); } - } - - public object RowContext - { - get { return GetValue(RowContextProperty); } - set { SetValue(RowContextProperty, value); } - } - #endregion - - #region Bindable Properties - public static readonly BindableProperty DataGridProperty = - BindableProperty.Create( - nameof(DataGrid), - typeof(DataGrid), - typeof(DataGridViewCell), - null, - propertyChanged: (b, o, n) => (b as DataGridViewCell).CreateView()); - - public static readonly BindableProperty IndexProperty = - BindableProperty.Create( - nameof(Index), - typeof(int), - typeof(DataGridViewCell), - 0, - propertyChanged: (b, o, n) => (b as DataGridViewCell).UpdateBackgroundColor()); - - public static readonly BindableProperty RowContextProperty = - BindableProperty.Create( - nameof(RowContext), - typeof(object), - typeof(DataGridViewCell), - propertyChanged: (b, o, n) => (b as DataGridViewCell).UpdateBackgroundColor()); - #endregion - - #region Methods - private void CreateView() - { - UpdateBackgroundColor(); - - _mainLayout = new Grid() - { - BackgroundColor = DataGrid.BorderColor, - RowSpacing = 0, - ColumnSpacing = DataGrid.BorderThickness.HorizontalThickness / 2, - Padding = new Thickness(DataGrid.BorderThickness.HorizontalThickness / 2, - DataGrid.BorderThickness.VerticalThickness / 2), - }; - - foreach (var col in DataGrid.Columns) - { - _mainLayout.ColumnDefinitions.Add(new ColumnDefinition() { Width = col.Width }); - View cell; - - if (col.CellTemplate != null) - { - cell = new ContentView() { Content = col.CellTemplate.CreateContent() as View }; - if (col.PropertyName != null) - { - cell.SetBinding(BindingContextProperty, - new Binding(col.PropertyName, source: RowContext)); - } - } - else - { - var text = new Label - { - TextColor = _textColor, - HorizontalOptions = col.HorizontalContentAlignment, - VerticalOptions = col.VerticalContentAlignment, - LineBreakMode = LineBreakMode.WordWrap, - }; - text.SetBinding(Label.TextProperty, new Binding(col.PropertyName, BindingMode.Default, stringFormat: col.StringFormat)); - text.SetBinding(Label.FontSizeProperty, new Binding(DataGrid.FontSizeProperty.PropertyName, BindingMode.Default, source: DataGrid)); - text.SetBinding(Label.FontFamilyProperty, new Binding(DataGrid.FontFamilyProperty.PropertyName, BindingMode.Default, source: DataGrid)); - - cell = new ContentView - { - Padding = 0, - BackgroundColor = _bgColor, - Content = text, - }; - } - - _mainLayout.Children.Add(cell); - Grid.SetColumn(cell, DataGrid.Columns.IndexOf(col)); - } - - View = _mainLayout; - } - - private void UpdateBackgroundColor() - { - _hasSelected = DataGrid.SelectedItem == RowContext; - int actualIndex = DataGrid?.InternalItems?.IndexOf(BindingContext) ?? -1; - if (actualIndex > -1) - { - _bgColor = (DataGrid.SelectionEnabled && DataGrid.SelectedItem != null && DataGrid.SelectedItem == RowContext) ? - DataGrid.ActiveRowColor : DataGrid.RowsBackgroundColorPalette.GetColor(Index, BindingContext); - _textColor = DataGrid.RowsTextColorPalette.GetColor(actualIndex, BindingContext); - - ChangeColor(_bgColor); - } - } - - private void ChangeColor(Color color) - { - foreach (var v in _mainLayout.Children) - { - v.BackgroundColor = color; - var contentView = v as ContentView; - if (contentView?.Content is Label) - ((Label)contentView.Content).TextColor = _textColor; - } - } - - protected override void OnBindingContextChanged() - { - base.OnBindingContextChanged(); - UpdateBackgroundColor(); - } - - protected override void OnParentSet() - { - base.OnParentSet(); - if (Parent != null) - DataGrid.ItemSelected += DataGrid_ItemSelected; - else - DataGrid.ItemSelected -= DataGrid_ItemSelected; - } - - private void DataGrid_ItemSelected(object sender, SelectedItemChangedEventArgs e) - { - if (DataGrid.SelectionEnabled && (e.SelectedItem == RowContext || _hasSelected)) - { - UpdateBackgroundColor(); - } - } - #endregion - } -} diff --git a/aurora-sharp-desktop/Aurora/Design/Components/DataGrid/IColorProvider.cs b/aurora-sharp-desktop/Aurora/Design/Components/DataGrid/IColorProvider.cs deleted file mode 100644 index 3cc9825..0000000 --- a/aurora-sharp-desktop/Aurora/Design/Components/DataGrid/IColorProvider.cs +++ /dev/null @@ -1,8 +0,0 @@ -using Xamarin.Forms; -namespace Aurora.Design.Components.DataGrid -{ - public interface IColorProvider - { - Color GetColor(int rowIndex, object item); - } -} diff --git a/aurora-sharp-desktop/Aurora/Design/Components/DataGrid/PaletteCollection.cs b/aurora-sharp-desktop/Aurora/Design/Components/DataGrid/PaletteCollection.cs deleted file mode 100644 index 770c8d9..0000000 --- a/aurora-sharp-desktop/Aurora/Design/Components/DataGrid/PaletteCollection.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using Xamarin.Forms; - -namespace Aurora.Design.Components.DataGrid -{ - public sealed class PaletteCollection : List, IColorProvider - { - public Color GetColor(int rowIndex, object item) - { - if (Count > 0) - return this.ElementAt(rowIndex % Count); - else - return default(Color); - } - } -} diff --git a/aurora-sharp-desktop/Aurora/Design/Components/DataGrid/SortData.cs b/aurora-sharp-desktop/Aurora/Design/Components/DataGrid/SortData.cs deleted file mode 100644 index 1552d09..0000000 --- a/aurora-sharp-desktop/Aurora/Design/Components/DataGrid/SortData.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System; -using Xamarin.Forms; - -namespace Aurora.Design.Components.DataGrid -{ - - [TypeConverter(typeof(SortDataTypeConverter))] - public class SortData - { - - #region ctor - public SortData() - { - } - - public SortData(int index, SortingOrder order) - { - Index = index; - Order = order; - } - - #endregion - - #region Properties - public SortingOrder Order { get; set; } - - public int Index { get; set; } - #endregion - - public static implicit operator SortData(int index) - { - return new SortData - { - Index = Math.Abs(index), - Order = index < 0 ? SortingOrder.Descendant : SortingOrder.Ascendant - }; - } - - public override bool Equals(object obj) - { - if (obj is SortData) - { - SortData other = obj as SortData; - return other.Index == Index && other.Order == Order; - } - else - return false; - } - - } -} diff --git a/aurora-sharp-desktop/Aurora/Design/Components/DataGrid/SortDataTypeConverter.cs b/aurora-sharp-desktop/Aurora/Design/Components/DataGrid/SortDataTypeConverter.cs deleted file mode 100644 index baf0d0d..0000000 --- a/aurora-sharp-desktop/Aurora/Design/Components/DataGrid/SortDataTypeConverter.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using Xamarin.Forms; - -namespace Aurora.Design.Components.DataGrid -{ - public class SortDataTypeConverter : TypeConverter - { - - public override bool CanConvertFrom(Type sourceType) - { - return base.CanConvertFrom(sourceType); - } - - public override object ConvertFromInvariantString(string value) - { - int index = 0; - - if (int.TryParse(value, out index)) - return (SortData)index; - else - return null; - } - } -} diff --git a/aurora-sharp-desktop/Aurora/Design/Components/DataGrid/SortingOrder.cs b/aurora-sharp-desktop/Aurora/Design/Components/DataGrid/SortingOrder.cs deleted file mode 100644 index 78c9520..0000000 --- a/aurora-sharp-desktop/Aurora/Design/Components/DataGrid/SortingOrder.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace Aurora.Design.Components.DataGrid -{ - public enum SortingOrder - { - None = 0, - Ascendant = 1, - Descendant = 2, - } -} diff --git a/aurora-sharp-desktop/Aurora/Design/Components/DataGrid/down.png b/aurora-sharp-desktop/Aurora/Design/Components/DataGrid/down.png deleted file mode 100644 index 3a359e82cce9634fc8738fadbf6269fe780ba10b..0000000000000000000000000000000000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