-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
95632c9
commit f02dbac
Showing
8 changed files
with
342 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<UserControl 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" | ||
xmlns:treeDataGridDemo="clr-namespace:TreeDataGridDemo" | ||
xmlns:models="clr-namespace:TreeDataGridDemo.Models" | ||
xmlns:viewModels="clr-namespace:TreeDataGridDemo.ViewModels" | ||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" | ||
x:DataType="viewModels:HistoryItemViewModelBase" | ||
x:CompileBindings="True" | ||
x:Class="TreeDataGridDemo.ActionsColumnView"> | ||
<UserControl.Resources> | ||
<StreamGeometry x:Key="rocket_regular">F1 M76.0296 38.7384C82.9974 31.7705 94.2945 31.7705 101.262 38.7384C108.23 45.7063 108.23 57.0035 101.262 63.9714C94.2945 70.9392 82.9974 70.9392 76.0296 63.9714C69.0617 57.0035 69.0617 45.7063 76.0296 38.7384ZM93.6921 46.3083C90.9052 43.5212 86.3867 43.5211 83.599 46.3083C80.812 49.0954 80.812 53.6143 83.599 56.4015C86.3867 59.1889 90.9052 59.1889 93.6921 56.4015C96.4798 53.6143 96.4798 49.0954 93.6921 46.3083ZM136.347 16.5523C134.429 10.3802 129.595 5.54822 123.422 3.63251L118.697 2.16608C101.614 -3.13548 83.0009 1.46373 70.3528 14.1112L63.2458 21.2188C53.4697 13.8774 39.5308 14.6542 30.6359 23.5492L21.768 32.4171C19.6775 34.5074 19.6775 37.8966 21.768 39.987L33.1227 51.3417L31.8394 52.625C26.9618 57.5024 26.9618 65.4109 31.8394 70.2883L35.3747 73.8233L25.4146 79.5043C23.9647 80.3308 22.9836 81.7867 22.7614 83.441C22.5392 85.0954 23.1014 86.7583 24.2815 87.9388L52.038 115.695C53.2173 116.874 54.8791 117.437 56.532 117.216C58.1857 116.995 59.6409 116.016 60.4695 114.568L66.1641 104.613L69.7126 108.161C74.59 113.039 82.4978 113.039 87.3752 108.161L88.637 106.9L99.982 118.245C102.072 120.334 105.462 120.334 107.552 118.245L116.42 109.376C125.311 100.485 126.091 86.5528 118.759 76.778L125.881 69.6553C138.533 57.0031 143.131 38.3805 137.82 21.2935L136.347 16.5523ZM120.249 13.8569C123.054 14.7277 125.252 16.9241 126.124 19.7295L127.597 24.4707C131.727 37.7606 128.152 52.2449 118.311 62.0858L79.8057 100.591C79.1084 101.288 77.9787 101.288 77.2821 100.591L39.4093 62.7181C38.7125 62.0216 38.7125 60.8918 39.4093 60.1952L77.923 21.6811C87.7599 11.8442 102.237 8.26705 115.523 12.3904L120.249 13.8569ZM111.05 84.4866C114.279 89.9514 113.547 97.1098 108.85 101.807L103.767 106.89L96.2072 99.3294L111.05 84.4866ZM38.2058 31.1191C42.9056 26.4193 50.0713 25.6884 55.5379 28.9264L40.6926 43.7718L33.1228 36.202L38.2058 31.1191ZM58.3184 96.7672L54.655 103.172L36.8111 85.3288L43.2228 81.6718L58.3184 96.7672ZM30.5861 116.984C32.6764 114.894 32.6764 111.504 30.5861 109.414C28.4956 107.324 25.1065 107.324 23.0161 109.414L5.35298 127.077C3.26263 129.168 3.26263 132.557 5.35298 134.647C7.4434 136.738 10.8325 136.738 12.9229 134.647L30.5861 116.984ZM16.7076 95.5361C18.798 97.6265 18.798 101.016 16.7076 103.106L9.13772 110.676C7.0473 112.766 3.65817 112.766 1.56782 110.676C-0.522605 108.585 -0.522605 105.196 1.56782 103.106L9.13772 95.5361C11.2281 93.4457 14.6172 93.4457 16.7076 95.5361ZM44.4497 130.877C46.5401 128.787 46.5401 125.398 44.4498 123.307C42.3595 121.217 38.9703 121.217 36.8799 123.307L29.3247 130.862C27.2342 132.952 27.2342 136.342 29.3246 138.432C31.4149 140.523 34.8041 140.523 36.8945 138.432L44.4497 130.877Z</StreamGeometry> | ||
<StreamGeometry x:Key="dismiss_light">M12 11.293l10.293-10.293.707.707-10.293 10.293 10.293 10.293-.707.707-10.293-10.293-10.293 10.293-.707-.707 10.293-10.293-10.293-10.293.707-.707 10.293 10.293z</StreamGeometry> | ||
<StreamGeometry x:Key="details_regular">M25,21.75 C25,23.5449254 23.5449254,25 21.75,25 L6.25,25 C4.45507456,25 3,23.5449254 3,21.75 L3,6.25 C3,4.45507456 4.45507456,3 6.25,3 L21.75,3 C23.5449254,3 25,4.45507456 25,6.25 L25,21.75 Z M23.5,21.75 L23.5,6.25 C23.5,5.28350169 22.7164983,4.5 21.75,4.5 L6.25,4.5 C5.28350169,4.5 4.5,5.28350169 4.5,6.25 L4.5,21.75 C4.5,22.7164983 5.28350169,23.5 6.25,23.5 L21.75,23.5 C22.7164983,23.5 23.5,22.7164983 23.5,21.75 Z M19.75,14 C19.75,14.3796958 19.4678461,14.693491 19.1017706,14.7431534 L19,14.75 L9,14.75 C8.58578644,14.75 8.25,14.4142136 8.25,14 C8.25,13.6203042 8.53215388,13.306509 8.89822944,13.2568466 L9,13.25 L19,13.25 C19.4142136,13.25 19.75,13.5857864 19.75,14 Z M19.75,19.25 C19.75,19.6296958 19.4678461,19.943491 19.1017706,19.9931534 L19,20 L9,20 C8.58578644,20 8.25,19.6642136 8.25,19.25 C8.25,18.8703042 8.53215388,18.556509 8.89822944,18.5068466 L9,18.5 L19,18.5 C19.4142136,18.5 19.75,18.8357864 19.75,19.25 Z M19.75,8.75 C19.75,9.12969577 19.4678461,9.44349096 19.1017706,9.49315338 L19,9.5 L9,9.5 C8.58578644,9.5 8.25,9.16421356 8.25,8.75 C8.25,8.37030423 8.53215388,8.05650904 8.89822944,8.00684662 L9,8 L19,8 C19.4142136,8 19.75,8.33578644 19.75,8.75 Z</StreamGeometry> | ||
</UserControl.Resources> | ||
<UserControl.Styles> | ||
<Style Selector="Border"> | ||
<Setter Property="Background" Value="Red" /> | ||
</Style> | ||
<Style Selector="Border.transparent"> | ||
<Setter Property="Background" Value="Transparent" /> | ||
</Style> | ||
</UserControl.Styles> | ||
<Border CornerRadius="30" HorizontalAlignment="Right" Margin="0 0 2 0"> | ||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Spacing="15" Margin="15 0"> | ||
|
||
<!-- SpeedUp --> | ||
<Button Classes="plain" ToolTip.Tip="Speed Up Transaction" | ||
IsVisible="{Binding IsButtonVisible}"> | ||
<PathIcon Data="{StaticResource rocket_regular}" Height="16" /> | ||
</Button> | ||
|
||
<!-- Cancel --> | ||
<Button Classes="plain" ToolTip.Tip="Cancel Transaction" | ||
IsVisible="False"> | ||
<PathIcon Data="{StaticResource dismiss_light}" Height="17" /> | ||
</Button> | ||
|
||
<!-- Details --> | ||
<Button Classes="plain" ToolTip.Tip="Show Details" | ||
Command="{Binding ToggleCommand}"> | ||
<PathIcon Data="{StaticResource details_regular}" Height="16" /> | ||
</Button> | ||
|
||
</StackPanel> | ||
</Border> | ||
</UserControl> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
using Avalonia; | ||
using Avalonia.Controls; | ||
using Avalonia.Markup.Xaml; | ||
|
||
namespace TreeDataGridDemo | ||
{ | ||
using System.Windows.Input; | ||
using ReactiveUI; | ||
|
||
public class ActionsColumnViewModel : ReactiveObject | ||
{ | ||
private bool _isButtonVisible; | ||
|
||
public ActionsColumnViewModel() | ||
{ | ||
ToggleCommand = ReactiveCommand.Create(() => | ||
{ | ||
IsButtonVisible = !IsButtonVisible; | ||
}); | ||
} | ||
|
||
public bool IsButtonVisible | ||
{ | ||
get => _isButtonVisible; | ||
set => this.RaiseAndSetIfChanged(ref _isButtonVisible, value); | ||
} | ||
|
||
public ICommand ToggleCommand { get; } | ||
} | ||
public partial class ActionsColumnView : UserControl | ||
{ | ||
public ActionsColumnView() | ||
{ | ||
InitializeComponent(); | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<UserControl 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="450" | ||
x:Class="TreeDataGridDemo.LabelsColumnView"> | ||
<TextBlock Text="Testing" /> | ||
</UserControl> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using Avalonia; | ||
using Avalonia.Controls; | ||
using Avalonia.Markup.Xaml; | ||
|
||
namespace TreeDataGridDemo | ||
{ | ||
public partial class LabelsColumnView : UserControl | ||
{ | ||
public LabelsColumnView() | ||
{ | ||
InitializeComponent(); | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.