Skip to content
This repository was archived by the owner on Apr 9, 2025. It is now read-only.

Commit 2e98f22

Browse files
Merge pull request #34 from giard-alexandre/feat/styling
fix: nicer buttons
2 parents 515eb4a + bb71785 commit 2e98f22

2 files changed

Lines changed: 39 additions & 25 deletions

File tree

src/DynamicTreeDataGrid/Controls/ColumnListView.axaml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,20 @@
1717
<Setter Property="HorizontalContentAlignment" Value="Center" />
1818
</Style>
1919
</UniformGrid.Styles>
20-
<Button Click="ShowAllClicked">Show All</Button>
21-
<Button Click="HideAllClicked">Hide All</Button>
20+
<Button Click="ShowAllClicked">
21+
<StackPanel Orientation="Horizontal">
22+
<PathIcon
23+
Data="M480-320q75 0 127.5-52.5T660-500q0-75-52.5-127.5T480-680q-75 0-127.5 52.5T300-500q0 75 52.5 127.5T480-320Zm0-72q-45 0-76.5-31.5T372-500q0-45 31.5-76.5T480-608q45 0 76.5 31.5T588-500q0 45-31.5 76.5T480-392Zm0 192q-146 0-266-81.5T40-500q54-137 174-218.5T480-800q146 0 266 81.5T920-500q-54 137-174 218.5T480-200Zm0-300Zm0 220q113 0 207.5-59.5T832-500q-50-101-144.5-160.5T480-720q-113 0-207.5 59.5T128-500q50 101 144.5 160.5T480-280Z" />
24+
<TextBlock Text="Show All" Padding="10, 0"/>
25+
</StackPanel>
26+
</Button>
27+
<Button Click="HideAllClicked">
28+
<StackPanel Orientation="Horizontal">
29+
<PathIcon
30+
Data="m644-428-58-58q9-47-27-88t-93-32l-58-58q17-8 34.5-12t37.5-4q75 0 127.5 52.5T660-500q0 20-4 37.5T644-428Zm128 126-58-56q38-29 67.5-63.5T832-500q-50-101-143.5-160.5T480-720q-29 0-57 4t-55 12l-62-62q41-17 84-25.5t90-8.5q151 0 269 83.5T920-500q-23 59-60.5 109.5T772-302Zm20 246L624-222q-35 11-70.5 16.5T480-200q-151 0-269-83.5T40-500q21-53 53-98.5t73-81.5L56-792l56-56 736 736-56 56ZM222-624q-29 26-53 57t-41 67q50 101 143.5 160.5T480-280q20 0 39-2.5t39-5.5l-36-38q-11 3-21 4.5t-21 1.5q-75 0-127.5-52.5T300-500q0-11 1.5-21t4.5-21l-84-82Zm319 93Zm-151 75Z" />
31+
<TextBlock Text="Hide All" Padding="10, 0"/>
32+
</StackPanel>
33+
</Button>
2234
</UniformGrid>
2335
<ScrollViewer Name="MainContainer" HorizontalAlignment="Stretch">
2436
<!-- Background="Transparent" is required here in order for the DragDrop stuff to work properly. -->
@@ -36,4 +48,4 @@
3648
</ItemsRepeater>
3749
</ScrollViewer>
3850
</DockPanel>
39-
</UserControl>
51+
</UserControl>

src/DynamicTreeDataGrid/Themes/Generic.axaml

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -15,39 +15,41 @@
1515
<StackPanel.Styles>
1616
<Style Selector="Button">
1717
<Setter Property="Background" Value="Transparent" />
18-
<Setter Property="Height" Value="40" />
19-
<Setter Property="Width" Value="40" />
18+
<!-- <Setter Property="Height" Value="40" /> -->
19+
<!-- <Setter Property="Width" Value="40" /> -->
2020
<Setter Property="VerticalContentAlignment" Value="Center" />
2121
</Style>
2222
<Style Selector="Button:disabled /template/ ContentPresenter#PART_ContentPresenter">
2323
<Setter Property="Background" Value="Transparent" />
2424
<Setter Property="Opacity" Value="0.5" />
2525
</Style>
2626
</StackPanel.Styles>
27-
<Button Name="FilterClearButton"
28-
Command="{Binding $parent[TextBox].Paste}"
29-
IsEnabled="{Binding $parent[TextBox].CanPaste}">
30-
<PathIcon Width="14"
31-
Height="14"
32-
Data="m592-481-57-57 143-182H353l-80-80h487q25 0 36 22t-4 42L592-481ZM791-56 560-287v87q0 17-11.5 28.5T520-160h-80q-17 0-28.5-11.5T400-200v-247L56-791l56-57 736 736-57 56ZM535-538Z" />
33-
</Button>
27+
<!-- <Button Name="FilterClearButton" -->
28+
<!-- Command="{Binding $parent[TextBox].Paste}" -->
29+
<!-- IsEnabled="{Binding $parent[TextBox].CanPaste}"> -->
30+
<!-- <PathIcon Width="14" -->
31+
<!-- Height="14" -->
32+
<!-- Data="m592-481-57-57 143-182H353l-80-80h487q25 0 36 22t-4 42L592-481ZM791-56 560-287v87q0 17-11.5 28.5T520-160h-80q-17 0-28.5-11.5T400-200v-247L56-791l56-57 736 736-57 56ZM535-538Z" /> -->
33+
<!-- </Button> -->
3434
<Button Name="ColumnEditorButton"
35-
Command="{Binding $parent[dynamicTreeDataGrid:DynamicTreeDataGrid].ShowColumnEditor}">
36-
<PathIcon Width="14"
37-
Height="14"
38-
Data="M121-280v-400q0-33 23.5-56.5T201-760h559q33 0 56.5 23.5T840-680v400q0 33-23.5 56.5T760-200H201q-33 0-56.5-23.5T121-280Zm79 0h133v-400H200v400Zm213 0h133v-400H413v400Zm213 0h133v-400H626v400Z" />
35+
Command="{Binding $parent[dynamicTreeDataGrid:DynamicTreeDataGrid].ShowColumnEditor}" HorizontalAlignment="Stretch">
36+
<StackPanel Orientation="Horizontal">
37+
<PathIcon
38+
Data="M121-280v-400q0-33 23.5-56.5T201-760h559q33 0 56.5 23.5T840-680v400q0 33-23.5 56.5T760-200H201q-33 0-56.5-23.5T121-280Zm79 0h133v-400H200v400Zm213 0h133v-400H413v400Zm213 0h133v-400H626v400Z" />
39+
<TextBlock Text="Edit Columns" Padding="10, 0"/>
40+
</StackPanel>
3941
</Button>
4042
</StackPanel>
41-
<Border Padding="4, 20">
42-
<Border.ContextFlyout>
43-
<Flyout>
44-
<TextBlock>Hello world</TextBlock>
45-
</Flyout>
46-
</Border.ContextFlyout>
47-
<TextBlock>Inner context flyout</TextBlock>
48-
</Border>
43+
<!-- <Border Padding="4, 20"> -->
44+
<!-- <Border.ContextFlyout> -->
45+
<!-- <Flyout> -->
46+
<!-- <TextBlock>Hello world</TextBlock> -->
47+
<!-- </Flyout> -->
48+
<!-- </Border.ContextFlyout> -->
49+
<!-- <TextBlock>Inner context flyout</TextBlock> -->
50+
<!-- </Border> -->
4951
</StackPanel>
5052
</Flyout>
5153
</Setter>
5254
</Style>
53-
</Styles>
55+
</Styles>

0 commit comments

Comments
 (0)