Skip to content

Commit

Permalink
ready to Aura.UI 0.1.3 prev 9 :D
Browse files Browse the repository at this point in the history
  • Loading branch information
PieroCastillo committed Dec 9, 2020
1 parent 7de2e46 commit c629c62
Show file tree
Hide file tree
Showing 24 changed files with 176 additions and 261 deletions.
29 changes: 1 addition & 28 deletions Aura.UI.sln
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UI.Tests.Mobile", "Tests\UI
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UI.Tests.Mobile.NetCore", "Tests\UI.Tests.Mobile.NetCore\UI.Tests.Mobile.NetCore.csproj", "{FDDAC139-62DD-49B4-88BC-4B714B10926E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aura.UI.Dragging", "src\Aura.UI.Dragging\Aura.UI.Dragging.csproj", "{7AC54D85-99E6-4A9B-A5B3-14D0A812805F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aura.UI.Lighting", "src\Aura.UI.Lighting\Aura.UI.Lighting.csproj", "{D9A38989-6708-49BB-8E78-16A14199EC59}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aura.UI.Dragging", "src\Aura.UI.Dragging\Aura.UI.Dragging.csproj", "{7AC54D85-99E6-4A9B-A5B3-14D0A812805F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -188,30 +186,6 @@ Global
{7AC54D85-99E6-4A9B-A5B3-14D0A812805F}.Release|x64.Build.0 = Release|Any CPU
{7AC54D85-99E6-4A9B-A5B3-14D0A812805F}.Release|x86.ActiveCfg = Release|Any CPU
{7AC54D85-99E6-4A9B-A5B3-14D0A812805F}.Release|x86.Build.0 = Release|Any CPU
{D9A38989-6708-49BB-8E78-16A14199EC59}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D9A38989-6708-49BB-8E78-16A14199EC59}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D9A38989-6708-49BB-8E78-16A14199EC59}.Debug|ARM.ActiveCfg = Debug|Any CPU
{D9A38989-6708-49BB-8E78-16A14199EC59}.Debug|ARM.Build.0 = Debug|Any CPU
{D9A38989-6708-49BB-8E78-16A14199EC59}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{D9A38989-6708-49BB-8E78-16A14199EC59}.Debug|iPhone.Build.0 = Debug|Any CPU
{D9A38989-6708-49BB-8E78-16A14199EC59}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{D9A38989-6708-49BB-8E78-16A14199EC59}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{D9A38989-6708-49BB-8E78-16A14199EC59}.Debug|x64.ActiveCfg = Debug|Any CPU
{D9A38989-6708-49BB-8E78-16A14199EC59}.Debug|x64.Build.0 = Debug|Any CPU
{D9A38989-6708-49BB-8E78-16A14199EC59}.Debug|x86.ActiveCfg = Debug|Any CPU
{D9A38989-6708-49BB-8E78-16A14199EC59}.Debug|x86.Build.0 = Debug|Any CPU
{D9A38989-6708-49BB-8E78-16A14199EC59}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D9A38989-6708-49BB-8E78-16A14199EC59}.Release|Any CPU.Build.0 = Release|Any CPU
{D9A38989-6708-49BB-8E78-16A14199EC59}.Release|ARM.ActiveCfg = Release|Any CPU
{D9A38989-6708-49BB-8E78-16A14199EC59}.Release|ARM.Build.0 = Release|Any CPU
{D9A38989-6708-49BB-8E78-16A14199EC59}.Release|iPhone.ActiveCfg = Release|Any CPU
{D9A38989-6708-49BB-8E78-16A14199EC59}.Release|iPhone.Build.0 = Release|Any CPU
{D9A38989-6708-49BB-8E78-16A14199EC59}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{D9A38989-6708-49BB-8E78-16A14199EC59}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{D9A38989-6708-49BB-8E78-16A14199EC59}.Release|x64.ActiveCfg = Release|Any CPU
{D9A38989-6708-49BB-8E78-16A14199EC59}.Release|x64.Build.0 = Release|Any CPU
{D9A38989-6708-49BB-8E78-16A14199EC59}.Release|x86.ActiveCfg = Release|Any CPU
{D9A38989-6708-49BB-8E78-16A14199EC59}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -223,7 +197,6 @@ Global
{1748D8FA-FB7F-4B4F-B1BA-049364CCEB33} = {42648CDA-16AC-4D09-8480-CA6600A1CF6D}
{FDDAC139-62DD-49B4-88BC-4B714B10926E} = {42648CDA-16AC-4D09-8480-CA6600A1CF6D}
{7AC54D85-99E6-4A9B-A5B3-14D0A812805F} = {E0772EFF-1A2A-466C-83C7-A81D93213336}
{D9A38989-6708-49BB-8E78-16A14199EC59} = {E0772EFF-1A2A-466C-83C7-A81D93213336}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {B04BDC4F-181C-461F-BB14-4E7516DB6B4A}
Expand Down
5 changes: 2 additions & 3 deletions Tests/UI.Tests/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -286,10 +286,9 @@
</TextBlock>
</Grid>
</NavigationViewItem>
<NavigationViewItem Header="LightBox" Title="2D Lighting System">
<l:LightSystemView></l:LightSystemView>
</NavigationViewItem>
</NavigationView>


<Follower LayerControl="{Binding #nav}">
<Follower.CanvasLayer>
<Canvas Name="canv" Background="Transparent"
Expand Down
1 change: 0 additions & 1 deletion Tests/UI.Tests/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ public static AppBuilder BuildAvaloniaApp()
.UsePlatformDetect()
.UseManagedSystemDialogs()
.UseSkia()
.With<Win32PlatformOptions>(new Win32PlatformOptions() { UseWindowsUIComposition = true })
.LogToTrace();

}
Expand Down
3 changes: 1 addition & 2 deletions Tests/UI.Tests/UI.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<IsPackable>false</IsPackable>
<IsPackable>true</IsPackable>
<LangVersion>8</LangVersion>
<Nullable>enable</Nullable>
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
Expand Down Expand Up @@ -87,7 +87,6 @@
<PackageReference Include="Avalonia.Desktop" Version="0.10.0-preview6" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Aura.UI.Lighting\Aura.UI.Lighting.csproj" />
<ProjectReference Include="..\..\src\Aura.UI\Aura.UI.csproj" />
</ItemGroup>
</Project>
12 changes: 0 additions & 12 deletions Tests/UI.Tests/Views/LightSystemView.axaml

This file was deleted.

18 changes: 0 additions & 18 deletions Tests/UI.Tests/Views/LightSystemView.axaml.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" d:DesignHeight="50" d:DesignWidth="100"
mc:Ignorable="d"
x:Class="UI.Tests.Views.MusicView">
<UserControl.Styles>
<Style Selector="CardControl">
<Setter Property="MaterialIsVisible" Value="True"/>
<Setter Property="InternalPadding" Value="0"/>
<Setter Property="Width" Value="200"/>
<Setter Property="Height" Value="260"/>
Expand All @@ -15,7 +14,7 @@
<Setter Property="Height" Value="150"/>
</Style>
<Style Selector="CardControl > Border > ImageBrush">
<Setter Property="Stretch" Value="None"/>
<Setter Property="Stretch" Value="UniformToFill"/>
</Style>
</UserControl.Styles>
<Grid RowDefinitions="*,*,*,*,*">
Expand Down
41 changes: 41 additions & 0 deletions Tests/UI.Tests/Views/RibbonWindowTest.axaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<ContentWindow xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="550"
x:Class="UI.Tests.Views.RibbonWindowTest"
Title="Ribbon Test">
<Grid>
<Ribbon OpenPaneHeight="150" Header="TextEditor"
LeftContent="File" RightContent="Ask">
<RibbonItem Header="Menu">
<RibbonPanel>
<RibbonGroup Header="Start">

</RibbonGroup>
<RibbonSeparator/>
<RibbonGroup Header="Themes">

</RibbonGroup>
<RibbonSeparator/>
<RibbonGroup Header="Fonts">

</RibbonGroup>
</RibbonPanel>
</RibbonItem>
<RibbonItem Header="Insert">
<RibbonPanel>
<RibbonPanel>

</RibbonPanel>
</RibbonPanel>
</RibbonItem>
<RibbonItem Header="Layout">

</RibbonItem>
<RibbonItem Header="Tools">

</RibbonItem>
</Ribbon>
</Grid>
</ContentWindow>
23 changes: 23 additions & 0 deletions Tests/UI.Tests/Views/RibbonWindowTest.axaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using Aura.UI.Controls;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;

namespace UI.Tests.Views
{
public class RibbonWindowTest : ContentWindow
{
public RibbonWindowTest()
{
this.InitializeComponent();
#if DEBUG
this.AttachDevTools();
#endif
}

private void InitializeComponent()
{
AvaloniaXamlLoader.Load(this);
}
}
}
3 changes: 3 additions & 0 deletions src/Aura.UI.Dragging/Aura.UI.Dragging.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
<Authors>Piero Castillo</Authors>
<Description>Dragging library for Aura.UI</Description>
<RepositoryUrl>github.com/PieroCastillo/Aura.UI</RepositoryUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<AssemblyVersion>0.1.3.0</AssemblyVersion>
<FileVersion>0.1.3.0</FileVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
7 changes: 0 additions & 7 deletions src/Aura.UI.Dragging/DraggingOperations.cs

This file was deleted.

5 changes: 1 addition & 4 deletions src/Aura.UI/Controls/AuraTabItem/AuraTabItem.Dragging.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ internal void EnableDragDrop()
AddHandler(DragDrop.DropEvent, OnDrop);
}

static AuraTabItem()
{
RenderTransformProperty.OverrideDefaultValue<AuraTabItem>(new TranslateTransform(0,0));
}

protected override void OnPointerPressed(PointerPressedEventArgs e)
{
Expand Down Expand Up @@ -95,6 +91,7 @@ protected virtual void OnDrop(object sender, DragEventArgs e)
view.lastselectindex = view.SelectedIndex;
view.SelectedIndex = h;
view.SelectedItem = (view.Items as IList)[view.SelectedIndex];

} );
Debug.WriteLine("Drag completed");
Debug.WriteLine($"Selected Index: {this.GetParentTOfLogical<AuraTabView>().SelectedIndex}");
Expand Down
10 changes: 1 addition & 9 deletions src/Aura.UI/Controls/AuraTabItem/AuraTabItem.Properties.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,12 @@
using System.Collections.Generic;
using System.Text;
using Avalonia.Media;
using Avalonia.Controls;

namespace Aura.UI.Controls
{
public partial class AuraTabItem
{

public TranslateTransform DraggingTransform
{
get => GetValue(DraggingTransformProperty);
set => SetValue(DraggingTransformProperty, value);
}
public static readonly StyledProperty<TranslateTransform> DraggingTransformProperty =
AvaloniaProperty.Register<AuraTabItem, TranslateTransform>(nameof(DraggingTransform), new TranslateTransform(0,0));

/// <summary>
/// This property defines if the AuraTabItem can be closed
/// </summary>
Expand Down
28 changes: 17 additions & 11 deletions src/Aura.UI/Controls/AuraTabItem/AuraTabItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,16 @@ public partial class AuraTabItem : TabItem, ICustomCornerRadius
public AuraTabItem()
{
this.Closing += OnClosing;

EnableDragDrop();
//tab_parent = this.GetParentTOfLogical<AuraTabView>();
}

static AuraTabItem()
{
CanBeDraggedProperty.Changed.AddClassHandler<AuraTabItem>((x,e) => x.OnCanDraggablePropertyChanged(x,e));
}

/// <summary>
/// Close now the tab
/// </summary>
Expand All @@ -52,7 +57,17 @@ public void Close()
this.Close(null);
}


protected void OnCanDraggablePropertyChanged(object sender, AvaloniaPropertyChangedEventArgs e)
{
if (CanBeDragged == true)
{
PseudoClasses.Add(":lockdrag");
}
else if (CanBeDragged == false)
{
PseudoClasses.Remove(":lockdrag");
}
}
protected override void OnApplyTemplate(TemplateAppliedEventArgs e)
{
base.OnApplyTemplate(e);
Expand All @@ -66,20 +81,11 @@ protected override void OnApplyTemplate(TemplateAppliedEventArgs e)
{
CloseButton.IsVisible = false;
}
// set up tab dragging
/*thumb = this.GetControl<Thumb>(e, "PART_TabThumb");
this.PointerPressed += (s, e) =>
{
IsSelected = true;
};*/
}
private void CloseButton_Click(object sender, Avalonia.Interactivity.RoutedEventArgs e)
{
this.Close();
}



}
}

7 changes: 0 additions & 7 deletions src/Aura.UI/Controls/AuraTabView/AuraTabView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,6 @@ public partial class AuraTabView : TabViewBase, IHeadered, IFootered
#endregion
#region Methods


protected override void OnSelectionChanged(object sender,SelectionChangedEventArgs e)
{
e.Handled = true;
}


protected void AdderButtonClicked(object sender, RoutedEventArgs e)
{
var e_ = new RoutedEventArgs(ClickOnAddingButtonEvent);
Expand Down
24 changes: 1 addition & 23 deletions src/Aura.UI/Controls/CardCollection/CardControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

namespace Aura.UI.Controls
{
public class CardControl : HeaderedContentControl, IMaterial
public class CardControl : HeaderedContentControl
{
public object SecondaryHeader
{
Expand Down Expand Up @@ -60,28 +60,6 @@ public BoxShadows InternalBoxShadow
public static readonly StyledProperty<BoxShadows> InternalBoxShadowProperty =
AvaloniaProperty.Register<CardControl, BoxShadows>(nameof(InternalBoxShadow));

/// <summary>
/// Defines the Material for the AcrylicBorder in the Template
/// </summary>
public ExperimentalAcrylicMaterial Material
{
get { return GetValue(MaterialProperty); }
set { SetValue(MaterialProperty, value); }
}
public static readonly StyledProperty<ExperimentalAcrylicMaterial> MaterialProperty =
AvaloniaProperty.Register<CardControl, ExperimentalAcrylicMaterial>(nameof(Material));
/// <summary>
/// Defines if the Material can be visible
/// </summary>
public bool MaterialIsVisible
{
get { return GetValue(MaterialIsVisibleProperty); }
set { SetValue(MaterialIsVisibleProperty, value); }
}
public static readonly StyledProperty<bool> MaterialIsVisibleProperty =
AvaloniaProperty.Register<CardControl, bool>(nameof(MaterialIsVisible), true);


/// <summary>
/// Defines the Uniform CornerRadius
/// </summary>
Expand Down
Loading

0 comments on commit c629c62

Please sign in to comment.