First pass at some styling
This commit is contained in:
3
Aurora/Design/Components/Library/Library.css
Normal file
3
Aurora/Design/Components/Library/Library.css
Normal file
@ -0,0 +1,3 @@
|
||||
#LibraryDataGrid {
|
||||
background-color: black
|
||||
}
|
@ -3,10 +3,10 @@
|
||||
xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:dg="clr-namespace:Xamarin.Forms.DataGrid;assembly=Xamarin.Forms.DataGrid"
|
||||
x:Class="Aurora.Design.Components.Queue.Queue">
|
||||
x:Class="Aurora.Design.Components.Library.Library">
|
||||
<ContentView.Content>
|
||||
<dg:DataGrid
|
||||
x:Name="QueueDataGrid"
|
||||
x:Name="LibraryDataGrid"
|
||||
SelectionEnabled="True"
|
||||
RowHeight="25"
|
||||
HeaderHeight="40"
|
@ -5,14 +5,14 @@ using Xamarin.Forms;
|
||||
using Xamarin.Forms.DataGrid;
|
||||
using Aurora.Models.Media;
|
||||
|
||||
namespace Aurora.Design.Components.Queue
|
||||
namespace Aurora.Design.Components.Library
|
||||
{
|
||||
public partial class Queue : ContentView
|
||||
public partial class Library : ContentView
|
||||
{
|
||||
public Queue()
|
||||
public Library()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.QueueDataGrid.ItemSelected += (sender, e) =>
|
||||
this.LibraryDataGrid.ItemSelected += (sender, e) =>
|
||||
{
|
||||
this.SelectedItem = e.SelectedItem;
|
||||
};
|
||||
@ -28,7 +28,7 @@ namespace Aurora.Design.Components.Queue
|
||||
public static readonly BindableProperty ItemsSourceProperty =
|
||||
BindableProperty.Create(propertyName: "ItemsSource",
|
||||
returnType: typeof(IEnumerable<object>),
|
||||
declaringType: typeof(Queue),
|
||||
declaringType: typeof(Library),
|
||||
defaultBindingMode: BindingMode.Default,
|
||||
propertyChanged: OnItemsSourceChanged);
|
||||
|
||||
@ -56,9 +56,10 @@ namespace Aurora.Design.Components.Queue
|
||||
/// <param name="newValue"></param>
|
||||
private static void OnItemsSourceChanged(BindableObject bindable, object oldValue, object newValue)
|
||||
{
|
||||
Queue control = bindable as Queue;
|
||||
var queueDataGrid = control.FindByName("QueueDataGrid") as DataGrid;
|
||||
queueDataGrid.ItemsSource = newValue as IEnumerable<object>;
|
||||
Library control = bindable as Library;
|
||||
|
||||
var libraryDataGrid = control.LibraryDataGrid;
|
||||
libraryDataGrid.ItemsSource = newValue as IEnumerable<object>;
|
||||
}
|
||||
|
||||
#endregion ItemsSource Property
|
||||
@ -72,7 +73,7 @@ namespace Aurora.Design.Components.Queue
|
||||
public static readonly BindableProperty SelectedItemProperty =
|
||||
BindableProperty.Create(propertyName: "SelectedItem",
|
||||
returnType: typeof(object),
|
||||
declaringType: typeof(Queue),
|
||||
declaringType: typeof(Library),
|
||||
defaultBindingMode: BindingMode.TwoWay);
|
||||
|
||||
/// <summary>
|
||||
@ -101,7 +102,7 @@ namespace Aurora.Design.Components.Queue
|
||||
public static readonly BindableProperty ItemDoubleClickedProperty =
|
||||
BindableProperty.Create(propertyName: "ItemDoubleClicked",
|
||||
returnType: typeof(Command),
|
||||
declaringType: typeof(Queue),
|
||||
declaringType: typeof(Library),
|
||||
propertyChanged: OnDoubleClickPropertyChanged);
|
||||
|
||||
/// <summary>
|
||||
@ -128,8 +129,8 @@ namespace Aurora.Design.Components.Queue
|
||||
/// <param name="oldValue"></param>
|
||||
private static void OnDoubleClickPropertyChanged(BindableObject bindable, object newValue, object oldValue)
|
||||
{
|
||||
Queue control = bindable as Queue;
|
||||
var queueDataGrid = control.QueueDataGrid;
|
||||
Library control = bindable as Library;
|
||||
var queueDataGrid = control.LibraryDataGrid;
|
||||
if (queueDataGrid.GestureRecognizers.Count > 0)
|
||||
{
|
||||
var gestureRecognizer = queueDataGrid.GestureRecognizers.First();
|
@ -4,21 +4,29 @@
|
||||
|
||||
ListView {
|
||||
background-color: #232323;
|
||||
margin-left: 20;
|
||||
margin-top: 20;
|
||||
margin-left: 15;
|
||||
margin-top: 40;
|
||||
}
|
||||
|
||||
#GroupTemplate Label {
|
||||
color: white;
|
||||
font-size: 14;
|
||||
font-family: Courier New, Courier, monospace;
|
||||
font-weight: 100;
|
||||
margin-top: 500;
|
||||
#GroupTemplate {
|
||||
align-items: end;
|
||||
}
|
||||
|
||||
#ItemTemplate label {
|
||||
color: white;
|
||||
font-size: 18;
|
||||
#GroupCell Label {
|
||||
color: lightgray;
|
||||
background-color: #232323;
|
||||
font-size: 12;
|
||||
font-family: Courier New, Courier, monospace;
|
||||
font-weight: 400;
|
||||
font-style: italic;
|
||||
padding-top: 18;
|
||||
}
|
||||
|
||||
#ItemCell label {
|
||||
color: white;
|
||||
background-color: #232323;
|
||||
font-size: 15;
|
||||
font-family: Courier New, Courier, monospace;
|
||||
font-style: normal;
|
||||
text-align: left;
|
||||
padding-top: 12;
|
||||
}
|
||||
|
@ -14,18 +14,20 @@
|
||||
SeparatorVisibility="None"
|
||||
HasUnevenRows="true"
|
||||
IsGroupingEnabled="true"
|
||||
RowHeight="35"
|
||||
CachingStrategy="RecycleElement">
|
||||
<ListView.GroupHeaderTemplate>
|
||||
<DataTemplate>
|
||||
<ViewCell x:Name="GroupTemplate">
|
||||
<ViewCell x:Name="GroupCell">
|
||||
<Label
|
||||
VerticalTextAlignment="Center"
|
||||
Text="{Binding GroupHeading}"/>
|
||||
</ViewCell>
|
||||
</DataTemplate>
|
||||
</ListView.GroupHeaderTemplate>
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<ViewCell x:Name="ItemTemplate">
|
||||
<ViewCell x:Name="ItemCell">
|
||||
<Label
|
||||
Text="{Binding Title}"/>
|
||||
</ViewCell>
|
||||
|
@ -11,10 +11,13 @@ namespace Aurora.Design.Components.NavigationMenu
|
||||
{
|
||||
InitializeComponent();
|
||||
ListView = MenuItemsListView;
|
||||
|
||||
}
|
||||
|
||||
|
||||
public ListView ListView;
|
||||
|
||||
|
||||
public static readonly BindableProperty ItemsProperty =
|
||||
BindableProperty.Create(propertyName: nameof(Items),
|
||||
returnType: typeof(ObservableCollection<NavigationItem>),
|
||||
|
Reference in New Issue
Block a user