mirror of
https://gitcode.com/gh_mirrors/se/Semi.Avalonia
synced 2026-04-16 06:06:36 +08:00
Implement DataGrid V12 (#770)
* feat: bring datagrid demo back. * feat: add FunctionalColorGroupControl and ShadowGroupControl with data binding * Add 10 TFM Co-authored-by: Zhang Dian <54255897+zdpcdt@users.noreply.github.com> * feat: Use new property Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * fix: fix changelog. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * fix: fix sort member path. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * chore: remove useless property. --------- Co-authored-by: Zhang Dian <54255897+zdpcdt@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -16,9 +16,9 @@
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="TabItem">
|
||||
<TextBlock
|
||||
FontWeight="Bold"
|
||||
FontSize="12"
|
||||
Margin="4"
|
||||
FontSize="12"
|
||||
FontWeight="Bold"
|
||||
Text="{TemplateBinding Header}" />
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
@@ -37,48 +37,44 @@
|
||||
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||
<ToggleSwitch
|
||||
Name="ExpandButton"
|
||||
Theme="{DynamicResource IconBorderlessToggleSwitch}"
|
||||
Content="{StaticResource SemiIconSidebar}" />
|
||||
Content="{StaticResource SemiIconSidebar}"
|
||||
Theme="{DynamicResource IconBorderlessToggleSwitch}" />
|
||||
<SelectableTextBlock
|
||||
VerticalAlignment="Center"
|
||||
Classes="H6"
|
||||
Text="Semi Avalonia"
|
||||
Theme="{DynamicResource TitleSelectableTextBlock}" />
|
||||
<SelectableTextBlock
|
||||
VerticalAlignment="Center"
|
||||
Text="/" />
|
||||
<SelectableTextBlock VerticalAlignment="Center" Text="/" />
|
||||
<SelectableTextBlock
|
||||
VerticalAlignment="Center"
|
||||
Classes="Secondary"
|
||||
Text="{ReflectionBinding #tab.SelectedItem.Header}" />
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
||||
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
|
||||
<Button
|
||||
Theme="{DynamicResource IconBorderlessButton}"
|
||||
Command="{Binding OpenUrlCommand}"
|
||||
CommandParameter="{Binding DocumentationUrl}"
|
||||
Content="{StaticResource SemiIconGlobe}" />
|
||||
Content="{StaticResource SemiIconGlobe}"
|
||||
Theme="{DynamicResource IconBorderlessButton}" />
|
||||
|
||||
<Button
|
||||
Theme="{DynamicResource IconBorderlessButton}"
|
||||
Command="{Binding OpenUrlCommand}"
|
||||
CommandParameter="{Binding RepoUrl}"
|
||||
Content="{StaticResource SemiIconGithubLogo}" />
|
||||
Content="{StaticResource SemiIconGithubLogo}"
|
||||
Theme="{DynamicResource IconBorderlessButton}" />
|
||||
|
||||
<ToggleSwitch
|
||||
Theme="{DynamicResource IconBorderlessToggleSwitch}"
|
||||
Command="{Binding ToggleThemeCommand}"
|
||||
OffContent="{StaticResource SemiIconSun}"
|
||||
OnContent="{StaticResource SemiIconMoon}"
|
||||
OffContent="{StaticResource SemiIconSun}" />
|
||||
Theme="{DynamicResource IconBorderlessToggleSwitch}" />
|
||||
|
||||
<Button
|
||||
Theme="{DynamicResource IconBorderlessButton}"
|
||||
Content="{StaticResource SemiIconMenu}">
|
||||
<Button Content="{StaticResource SemiIconMenu}" Theme="{DynamicResource IconBorderlessButton}">
|
||||
<Button.Flyout>
|
||||
<MenuFlyout Placement="Bottom" ItemsSource="{Binding MenuItems}" />
|
||||
<MenuFlyout ItemsSource="{Binding MenuItems}" Placement="Bottom" />
|
||||
</Button.Flyout>
|
||||
<Button.Styles>
|
||||
<Style Selector="MenuItem" x:DataType="views:MenuItemViewModel">
|
||||
<Style x:DataType="views:MenuItemViewModel" Selector="MenuItem">
|
||||
<Setter Property="Header" Value="{Binding Header}" />
|
||||
<Setter Property="ItemsSource" Value="{Binding Items}" />
|
||||
<Setter Property="Command" Value="{Binding Command}" />
|
||||
@@ -94,8 +90,8 @@
|
||||
Grid.Row="1"
|
||||
Margin="8"
|
||||
Padding="20,0,0,0"
|
||||
TabStripPlacement="Left"
|
||||
Classes.Dismiss="{Binding #ExpandButton.IsChecked}"
|
||||
TabStripPlacement="Left"
|
||||
Theme="{DynamicResource ScrollLineTabControl}">
|
||||
<TabControl.Styles>
|
||||
<Style Selector=".Dismiss /template/ ScrollViewer#PART_ScrollViewer">
|
||||
@@ -113,36 +109,30 @@
|
||||
<TabItem Header="About Us">
|
||||
<pages:AboutUs />
|
||||
</TabItem>
|
||||
<TabItem
|
||||
Theme="{DynamicResource CategoryTabItem}"
|
||||
Header="Resource Browser" />
|
||||
<!-- <TabItem Header="Palette"> -->
|
||||
<!-- <pages:PaletteDemo /> -->
|
||||
<!-- </TabItem> -->
|
||||
<!-- <TabItem Header="HighContrastTheme"> -->
|
||||
<!-- <pages:HighContrastDemo /> -->
|
||||
<!-- </TabItem> -->
|
||||
<!-- <TabItem Header="Variables"> -->
|
||||
<!-- <pages:VariablesDemo /> -->
|
||||
<!-- </TabItem> -->
|
||||
<TabItem Header="Resource Browser" Theme="{DynamicResource CategoryTabItem}" />
|
||||
<TabItem Header="Palette">
|
||||
<pages:PaletteDemo />
|
||||
</TabItem>
|
||||
<TabItem Header="HighContrastTheme">
|
||||
<pages:HighContrastDemo />
|
||||
</TabItem>
|
||||
<TabItem Header="Variables">
|
||||
<pages:VariablesDemo />
|
||||
</TabItem>
|
||||
<TabItem Header="Icon">
|
||||
<pages:IconDemo />
|
||||
</TabItem>
|
||||
<TabItem
|
||||
Theme="{DynamicResource CategoryTabItem}"
|
||||
Header="Separate Pack" />
|
||||
<TabItem Header="Separate Pack" Theme="{DynamicResource CategoryTabItem}" />
|
||||
<TabItem Header="ColorPicker">
|
||||
<pages:ColorPickerDemo />
|
||||
</TabItem>
|
||||
<!-- <TabItem Header="DataGrid"> -->
|
||||
<!-- <pages:DataGridDemo /> -->
|
||||
<!-- </TabItem> -->
|
||||
<TabItem Header="DataGrid">
|
||||
<pages:DataGridDemo />
|
||||
</TabItem>
|
||||
<!-- <TabItem Header="TreeDataGrid"> -->
|
||||
<!-- <pages:TreeDataGridDemo /> -->
|
||||
<!-- </TabItem> -->
|
||||
<TabItem
|
||||
Theme="{DynamicResource CategoryTabItem}"
|
||||
Header="Basic" />
|
||||
<TabItem Header="Basic" Theme="{DynamicResource CategoryTabItem}" />
|
||||
<TabItem Header="TextBlock">
|
||||
<pages:TextBlockDemo />
|
||||
</TabItem>
|
||||
@@ -155,9 +145,7 @@
|
||||
<TabItem Header="PathIcon">
|
||||
<pages:PathIconDemo />
|
||||
</TabItem>
|
||||
<TabItem
|
||||
Theme="{DynamicResource CategoryTabItem}"
|
||||
Header="Button" />
|
||||
<TabItem Header="Button" Theme="{DynamicResource CategoryTabItem}" />
|
||||
<TabItem Header="Button">
|
||||
<pages:ButtonDemo />
|
||||
</TabItem>
|
||||
@@ -173,9 +161,7 @@
|
||||
<TabItem Header="ToggleSwitch">
|
||||
<pages:ToggleSwitchDemo />
|
||||
</TabItem>
|
||||
<TabItem
|
||||
Theme="{DynamicResource CategoryTabItem}"
|
||||
Header="Input" />
|
||||
<TabItem Header="Input" Theme="{DynamicResource CategoryTabItem}" />
|
||||
<TabItem Header="TextBox">
|
||||
<pages:TextBoxDemo />
|
||||
</TabItem>
|
||||
@@ -197,9 +183,7 @@
|
||||
<TabItem Header="ManagedFileChooser">
|
||||
<pages:ManagedFileChooserDemo />
|
||||
</TabItem>
|
||||
<TabItem
|
||||
Theme="{DynamicResource CategoryTabItem}"
|
||||
Header="Date/Time" />
|
||||
<TabItem Header="Date/Time" Theme="{DynamicResource CategoryTabItem}" />
|
||||
<TabItem Header="Calendar">
|
||||
<pages:CalendarDemo />
|
||||
</TabItem>
|
||||
@@ -212,9 +196,7 @@
|
||||
<TabItem Header="TimePicker">
|
||||
<pages:TimePickerDemo />
|
||||
</TabItem>
|
||||
<TabItem
|
||||
Theme="{DynamicResource CategoryTabItem}"
|
||||
Header="Navigation" />
|
||||
<TabItem Header="Navigation" Theme="{DynamicResource CategoryTabItem}" />
|
||||
<TabItem Header="ContentPage">
|
||||
<pages:ContentPageDemo />
|
||||
</TabItem>
|
||||
@@ -236,9 +218,7 @@
|
||||
<TabItem Header="TreeView">
|
||||
<pages:TreeViewDemo />
|
||||
</TabItem>
|
||||
<TabItem
|
||||
Theme="{DynamicResource CategoryTabItem}"
|
||||
Header="Show" />
|
||||
<TabItem Header="Show" Theme="{DynamicResource CategoryTabItem}" />
|
||||
<TabItem Header="Carousel">
|
||||
<pages:CarouselDemo />
|
||||
</TabItem>
|
||||
@@ -263,9 +243,7 @@
|
||||
<TabItem Header="ToolTip">
|
||||
<pages:ToolTipDemo />
|
||||
</TabItem>
|
||||
<TabItem
|
||||
Theme="{DynamicResource CategoryTabItem}"
|
||||
Header="Feedback" />
|
||||
<TabItem Header="Feedback" Theme="{DynamicResource CategoryTabItem}" />
|
||||
<TabItem Header="DataValidationErrors">
|
||||
<pages:DataValidationErrorsDemo />
|
||||
</TabItem>
|
||||
@@ -278,9 +256,7 @@
|
||||
<TabItem Header="RefreshContainer">
|
||||
<pages:RefreshContainerDemo />
|
||||
</TabItem>
|
||||
<TabItem
|
||||
Theme="{DynamicResource CategoryTabItem}"
|
||||
Header="Other" />
|
||||
<TabItem Header="Other" Theme="{DynamicResource CategoryTabItem}" />
|
||||
<TabItem Header="CommandBar">
|
||||
<pages:CommandBarDemo />
|
||||
</TabItem>
|
||||
|
||||
Reference in New Issue
Block a user