Sfoglia il codice sorgente

Fixed corners of Lookup grid

Kenric Nugteren 1 mese fa
parent
commit
e74a6f5fb8

+ 35 - 32
InABox.Avalonia/Components/AvaloniaDataGrid/AvaloniaDataGrid.axaml

@@ -26,38 +26,41 @@
 							  Text="{Binding $parent[components:AvaloniaDataGrid].SearchText}"
 							  Background="Transparent"
 							  Margin="0,0,0,5"/>
-		<DataGrid Name="Grid" Grid.Row="1" Grid.ColumnSpan="2"
-				  ItemsSource="{Binding $parent[components:AvaloniaDataGrid].ItemsSource}"
-				  RowBackground="White"
-				  Foreground="Black"
-				  AutoGenerateColumns="False"
-				  SelectionMode="{Binding $parent[components:AvaloniaDataGrid].SelectionMode}"
-				  Tapped="DataGrid_Tapped"
-				  SelectionChanged="DataGrid_SelectionChanged"
-				  RowHeight="{Binding $parent[components:AvaloniaDataGrid].RowHeight}"
-				  GridLinesVisibility="Vertical"
-				  FontSize="{StaticResource PrsFontSizeSmall}"
-				  CornerRadius="{StaticResource PrsCornerRadius}"
-				  BorderThickness="{StaticResource PrsBorderThickness}"
-				  BorderBrush="{StaticResource PrsTileBorder}">
-			<DataGrid.Styles>
-				<Style Selector="DataGridRow:nth-child(even)">
-					<Setter Property="Background" Value="WhiteSmoke"/>
-				</Style>
-				<Style Selector="DataGridColumnHeader:nth-child(1)">
-					<Setter Property="CornerRadius" Value="4,0,0,0"/>
-				</Style>
-				<Style Selector="DataGridColumnHeader:nth-last-child(1)">
-					<Setter Property="CornerRadius" Value="0,4,0,0"/>
-				</Style>
-				<Style Selector="DataGridColumnHeader">
-					<Setter Property="FontSize" Value="{StaticResource PrsFontSizeExtraSmall}"/>
-				</Style>
-				<Style Selector="DataGridCell">
-					<Setter Property="FontSize" Value="{StaticResource PrsFontSizeExtraSmall}"/>
-				</Style>
-			</DataGrid.Styles>
-		</DataGrid>
+		<Border Grid.Row="1" Grid.ColumnSpan="2"
+				CornerRadius="{StaticResource PrsCornerRadius}"
+				BorderThickness="{StaticResource PrsBorderThickness}"
+				BorderBrush="{StaticResource PrsTileBorder}"
+				ClipToBounds="True">
+			<DataGrid Name="Grid" Grid.Row="1" Grid.ColumnSpan="2"
+					  ItemsSource="{Binding $parent[components:AvaloniaDataGrid].ItemsSource}"
+					  RowBackground="White"
+					  Foreground="Black"
+					  AutoGenerateColumns="False"
+					  SelectionMode="{Binding $parent[components:AvaloniaDataGrid].SelectionMode}"
+					  Tapped="DataGrid_Tapped"
+					  SelectionChanged="DataGrid_SelectionChanged"
+					  RowHeight="{Binding $parent[components:AvaloniaDataGrid].RowHeight}"
+					  GridLinesVisibility="Vertical"
+					  FontSize="{StaticResource PrsFontSizeSmall}"
+					  CornerRadius="{StaticResource PrsCornerRadius}"
+					  >
+				<DataGrid.Styles>
+					<Style Selector="DataGridRow:nth-child(even)">
+						<Setter Property="Background" Value="WhiteSmoke"/>
+					</Style>
+					<Style Selector="DataGridColumnHeader">
+						<Setter Property="FontSize" Value="{StaticResource PrsFontSizeExtraSmall}"/>
+					</Style>
+					<Style Selector="DataGridCell">
+						<Setter Property="FontSize" Value="{StaticResource PrsFontSizeExtraSmall}"/>
+					</Style>
+
+					<Style Selector="DataGrid /template/ Border#DataGridBorder">
+						<Setter Property="ClipToBounds" Value="True"/>
+					</Style>
+				</DataGrid.Styles>
+			</DataGrid>
+		</Border>
 		
         <Border Name="_recordCountBox" Classes="Standard"
 				Grid.Row="2"

+ 4 - 0
InABox.Avalonia/InABox.Avalonia.csproj

@@ -12,6 +12,7 @@
 
     <ItemGroup>
       <None Remove="Images\cross.svg" />
+      <None Remove="Images\refresh.svg" />
       <None Remove="Images\search.svg" />
       <None Remove="Images\tick.svg" />
     </ItemGroup>
@@ -50,6 +51,9 @@
       <AvaloniaResource Include="Images\cross.svg">
         <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       </AvaloniaResource>
+      <AvaloniaResource Include="Images\refresh.svg">
+        <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+      </AvaloniaResource>
       <AvaloniaResource Include="Images\search.svg">
         <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       </AvaloniaResource>