fix: fix identation, fix error theme in demo.

This commit is contained in:
rabbitism 2023-07-27 00:30:32 +08:00
parent 17fa10333a
commit 1c98ce4682
2 changed files with 191 additions and 186 deletions

View File

@ -112,10 +112,18 @@
</MultiBinding> </MultiBinding>
</Image.Source> </Image.Source>
</Image> </Image>
<TextBox VerticalAlignment="Center" Text="{Binding Name}" /> <TextBox
VerticalAlignment="Center"
Classes="Small"
Text="{Binding Name}">
<TextBox.Styles>
<Style Selector="DataValidationErrors">
<Setter Property="Theme" Value="{DynamicResource TooltipDataValidationErrors}" />
</Style>
</TextBox.Styles>
</TextBox>
</StackPanel> </StackPanel>
</DataTemplate> </DataTemplate>
</TreeDataGrid.Resources> </TreeDataGrid.Resources>
<TreeDataGrid.Styles> <TreeDataGrid.Styles>
<Style Selector="TreeDataGrid TreeDataGridRow:nth-child(2n)"> <Style Selector="TreeDataGrid TreeDataGridRow:nth-child(2n)">

View File

@ -180,10 +180,7 @@ public class FileNodeViewModel: ObservableObject, IEditableObject
private bool _hasChildren = true; private bool _hasChildren = true;
private bool _isExpanded; private bool _isExpanded;
public FileNodeViewModel( public FileNodeViewModel( string path, bool isDirectory, bool isRoot = false)
string path,
bool isDirectory,
bool isRoot = false)
{ {
_path = path; _path = path;
_name = isRoot ? path : System.IO.Path.GetFileName(Path); _name = isRoot ? path : System.IO.Path.GetFileName(Path);