forked from unoplatform/uno
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Update TreeView to winui3/release/1.4.2
- Loading branch information
1 parent
69abdbf
commit f668510
Showing
35 changed files
with
3,999 additions
and
4,042 deletions.
There are no files selected for viewing
81 changes: 29 additions & 52 deletions
81
src/Uno.UI.FluentTheme.v2/Resources/Version2/PriorityDefault/TreeView.xaml
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 |
---|---|---|
@@ -1,56 +1,33 @@ | ||
<!-- Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License. See LICENSE in the project root for license information. --> | ||
<ResourceDictionary | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:local="using:Microsoft.UI.Xaml.Controls"> | ||
|
||
<!--not used, leave here for backword compatability--> | ||
<!-- MUX Reference TreeView.xaml, commit tag winui3/release/1.4.2 --> | ||
<ResourceDictionary xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:controls="using:Microsoft.UI.Xaml.Controls" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"> | ||
<DataTemplate x:Key="TreeViewItemDataTemplate"> | ||
<Grid Height="44" > | ||
<TextBlock | ||
Text="{Binding Content}" | ||
HorizontalAlignment="Left" | ||
VerticalAlignment="Center" | ||
Style="{ThemeResource BodyTextBlockStyle}"/> | ||
</Grid> | ||
<Grid Height="44"> | ||
<TextBlock Text="{Binding Content}" HorizontalAlignment="Left" VerticalAlignment="Center" Style="{ThemeResource BodyTextBlockStyle}" /> | ||
</Grid> | ||
</DataTemplate> | ||
|
||
<Style TargetType="local:TreeView" BasedOn="{StaticResource DefaultTreeViewStyle}" /> | ||
|
||
<Style x:Key="DefaultTreeViewStyle" TargetType="local:TreeView"> | ||
<Setter Property="IsTabStop" Value="False" /> | ||
<Setter Property="CanDragItems" Value="True"/> | ||
<Setter Property="CanReorderItems" Value="True"/> | ||
<Setter Property="AllowDrop" Value="True"/> | ||
<Setter Property="ItemContainerTransitions"> | ||
<Setter.Value> | ||
<TransitionCollection> | ||
<ContentThemeTransition /> | ||
<ReorderThemeTransition /> | ||
<EntranceThemeTransition IsStaggeringEnabled="False" /> | ||
</TransitionCollection> | ||
</Setter.Value> | ||
</Setter> | ||
<Setter Property="Template"> | ||
<Setter.Value> | ||
<ControlTemplate TargetType="local:TreeView"> | ||
<local:TreeViewList | ||
x:Name="ListControl" | ||
Background="{TemplateBinding Background}" | ||
ItemTemplate="{TemplateBinding ItemTemplate}" | ||
ItemTemplateSelector="{TemplateBinding ItemTemplateSelector}" | ||
ItemContainerStyle="{TemplateBinding ItemContainerStyle}" | ||
ItemContainerStyleSelector="{TemplateBinding ItemContainerStyleSelector}" | ||
ItemContainerTransitions="{TemplateBinding ItemContainerTransitions}" | ||
CanDragItems="{TemplateBinding CanDragItems}" | ||
AllowDrop="{TemplateBinding AllowDrop}" | ||
CanReorderItems="{TemplateBinding CanReorderItems}"> | ||
</local:TreeViewList> | ||
</ControlTemplate> | ||
</Setter.Value> | ||
</Setter> | ||
<Style TargetType="controls:TreeView" BasedOn="{StaticResource DefaultTreeViewStyle}" /> | ||
<Style x:Key="DefaultTreeViewStyle" TargetType="controls:TreeView"> | ||
<Setter Property="IsTabStop" Value="False" /> | ||
<Setter Property="CanDragItems" Value="True" /> | ||
<Setter Property="CanReorderItems" Value="True" /> | ||
<Setter Property="AllowDrop" Value="True" /> | ||
<Setter Property="ItemContainerTransitions"> | ||
<Setter.Value> | ||
<TransitionCollection> | ||
<ContentThemeTransition /> | ||
<ReorderThemeTransition /> | ||
<EntranceThemeTransition IsStaggeringEnabled="False" /> | ||
</TransitionCollection> | ||
</Setter.Value> | ||
</Setter> | ||
<Setter Property="Template"> | ||
<Setter.Value> | ||
<ControlTemplate TargetType="controls:TreeView"> | ||
<controls:TreeViewList x:Name="ListControl" Background="{TemplateBinding Background}" ItemTemplate="{TemplateBinding ItemTemplate}" ItemTemplateSelector="{TemplateBinding ItemTemplateSelector}" ItemContainerStyle="{TemplateBinding ItemContainerStyle}" ItemContainerStyleSelector="{TemplateBinding ItemContainerStyleSelector}" ItemContainerTransitions="{TemplateBinding ItemContainerTransitions}" CanDragItems="{TemplateBinding CanDragItems}" AllowDrop="{TemplateBinding AllowDrop}" CanReorderItems="{TemplateBinding CanReorderItems}" /> | ||
</ControlTemplate> | ||
</Setter.Value> | ||
</Setter> | ||
</Style> | ||
|
||
<Style TargetType="local:TreeViewItem" BasedOn="{StaticResource MUX_TreeViewItemStyle}"/> | ||
|
||
</ResourceDictionary> | ||
<Style TargetType="controls:TreeViewItem" BasedOn="{StaticResource MUX_TreeViewItemStyle}" /> | ||
</ResourceDictionary> |
Oops, something went wrong.