修正Recipe Editor中无法加载左侧文件列表的功能。
This commit is contained in:
parent
16dd5b707b
commit
717d02ca45
|
@ -363,3 +363,4 @@ MigrationBackup/
|
|||
FodyWeavers.xsd
|
||||
/.svn
|
||||
FrameworkLocal/output/
|
||||
/.idea/.idea.Sic08/.idea
|
||||
|
|
|
@ -561,6 +561,66 @@
|
|||
</Trigger>
|
||||
</HierarchicalDataTemplate.Triggers>
|
||||
</HierarchicalDataTemplate>
|
||||
|
||||
<HierarchicalDataTemplate x:Key="FileTemplate" ItemsSource="{Binding Files}">
|
||||
<StackPanel Orientation="Horizontal" Tag="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=UserControl}, Path=DataContext}">
|
||||
<Path
|
||||
Width="13"
|
||||
Height="16"
|
||||
HorizontalAlignment="Left"
|
||||
Data="M0.5,5.125 L5.125,5.125 5.125,0.5 M5.1,0.5 L15.5,0.5 15.5,19.5 0.5,19.5 C0.5,14.7 0.5,10 0.5,5.1 2,3.6 3.6,2 5.1,0.5 z M8.1,8.5 L8.2,8.5 z M8.1,11.5 L8.2,11.5 z M8.1,14.5 L8.2,14.5 z"
|
||||
Fill="#FFF3F3F3"
|
||||
Stretch="Fill"
|
||||
Stroke="#FF454545" />
|
||||
<TextBlock
|
||||
Margin="5,0,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding Name}" />
|
||||
<StackPanel.ContextMenu>
|
||||
<ContextMenu DataContext="{Binding Path=PlacementTarget.Tag, RelativeSource={RelativeSource Self}}">
|
||||
<Label
|
||||
Margin="0"
|
||||
Content="{Binding CurrentFileNode.FullPath}"
|
||||
FontWeight="Black" />
|
||||
<Separator />
|
||||
<MenuItem
|
||||
Command="{Binding NewRecipeCommand}"
|
||||
Header="New Recipe"
|
||||
IsEnabled="{Binding IsPermission}" />
|
||||
<MenuItem
|
||||
Command="{Binding DeleteRecipeCommand}"
|
||||
Header="Delete Recipe"
|
||||
IsEnabled="{Binding IsPermission}" />
|
||||
<MenuItem
|
||||
Command="{Binding RenameRecipeCommand}"
|
||||
Header="Rename Recipe"
|
||||
IsEnabled="{Binding IsPermission}" />
|
||||
<MenuItem
|
||||
Command="{Binding SaveAsRecipeCommand}"
|
||||
Header="Save As Recipe"
|
||||
IsEnabled="{Binding IsPermission}" />
|
||||
<Separator />
|
||||
<MenuItem Command="{Binding NewFolderCommand}" Header="New Folder" />
|
||||
<MenuItem
|
||||
Command="{Binding DeleteFolderCommand}"
|
||||
Header="Delete Folder"
|
||||
IsEnabled="False" />
|
||||
<MenuItem
|
||||
Command="{Binding RenameFolderCommand}"
|
||||
Header="Rename Folder"
|
||||
IsEnabled="False" />
|
||||
</ContextMenu>
|
||||
</StackPanel.ContextMenu>
|
||||
</StackPanel>
|
||||
</HierarchicalDataTemplate>
|
||||
|
||||
<editors:FolderOrFileTemplateSelector
|
||||
x:Key="FolderFileTemplateSelector"
|
||||
FileTemplate="{StaticResource FileTemplate}"
|
||||
FolderTemplate="{StaticResource FolderTemplate}" />
|
||||
|
||||
|
||||
</UserControl.Resources>
|
||||
|
||||
<Grid>
|
||||
|
|
Loading…
Reference in New Issue