2014-08-16 12:40:08 +00:00
|
|
|
<UserControl x:Class="RainmeterStudio.UI.Panels.ProjectPanel"
|
2014-07-27 13:21:06 +00:00
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
|
xmlns:ctrl="clr-namespace:RainmeterStudio.UI.Controller"
|
2014-07-28 17:18:18 +00:00
|
|
|
xmlns:ui="clr-namespace:RainmeterStudio.UI"
|
2014-07-27 13:21:06 +00:00
|
|
|
mc:Ignorable="d"
|
|
|
|
d:DesignHeight="300" d:DesignWidth="300">
|
|
|
|
<UserControl.Resources>
|
|
|
|
<ctrl:IconProviderConverter x:Key="IconConverter" />
|
|
|
|
</UserControl.Resources>
|
|
|
|
<Grid>
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
<RowDefinition />
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
|
|
<!-- Toolbar -->
|
|
|
|
<ToolBar Grid.Row="0" ToolBarTray.IsLocked="True">
|
|
|
|
<Button DataContext="{Binding SyncWithActiveViewCommand}"
|
|
|
|
Style="{StaticResource CommandButtonStyle}">
|
|
|
|
<Image Width="16" Height="16" Source="{Binding Icon}" />
|
|
|
|
</Button>
|
|
|
|
<Button DataContext="{Binding RefreshCommand}"
|
|
|
|
Style="{StaticResource CommandButtonStyle}">
|
|
|
|
<Image Width="16" Height="16" Source="{Binding Icon}" />
|
|
|
|
</Button>
|
|
|
|
<Button DataContext="{Binding CollapseAllCommand}"
|
|
|
|
Style="{StaticResource CommandAutoHideButtonStyle}">
|
|
|
|
<Image Width="16" Height="16" Source="{Binding Icon}" />
|
|
|
|
</Button>
|
|
|
|
<Button DataContext="{Binding ExpandAllCommand}"
|
|
|
|
Style="{StaticResource CommandAutoHideButtonStyle}">
|
|
|
|
<Image Width="16" Height="16" Source="{Binding Icon}" />
|
|
|
|
</Button>
|
|
|
|
<ToggleButton Name="toggleShowAllFiles"
|
|
|
|
DataContext="{Binding ShowAllFilesCommand}"
|
|
|
|
Style="{StaticResource CommandButtonStyle}">
|
|
|
|
<Image Width="16" Height="16" Source="{Binding Icon}" />
|
|
|
|
</ToggleButton>
|
|
|
|
</ToolBar>
|
|
|
|
|
|
|
|
<!-- Project item tree -->
|
|
|
|
<TreeView Grid.Row="2" Name="treeProjectItems">
|
2014-09-16 18:57:15 +00:00
|
|
|
|
2014-07-27 13:21:06 +00:00
|
|
|
<TreeView.ItemContainerStyle>
|
|
|
|
<Style TargetType="{x:Type TreeViewItem}">
|
2014-08-31 11:41:24 +00:00
|
|
|
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />
|
|
|
|
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
|
2014-07-28 17:18:18 +00:00
|
|
|
<EventSetter Event="Expanded" Handler="TreeViewItem_ExpandedOrCollapsed" />
|
|
|
|
<EventSetter Event="Collapsed" Handler="TreeViewItem_ExpandedOrCollapsed" />
|
2014-09-16 18:57:15 +00:00
|
|
|
<EventSetter Event="PreviewMouseRightButtonDown" Handler="TreeViewItem_PreviewMouseRightButtonDown" />
|
|
|
|
<EventSetter Event="PreviewMouseDoubleClick" Handler="TreeViewItem_PreviewMouseDoubleClick" />
|
2014-07-27 13:21:06 +00:00
|
|
|
</Style>
|
|
|
|
</TreeView.ItemContainerStyle>
|
|
|
|
<TreeView.ItemTemplate>
|
|
|
|
<HierarchicalDataTemplate ItemsSource="{Binding Children}">
|
|
|
|
<DockPanel LastChildFill="True">
|
2014-08-31 11:41:24 +00:00
|
|
|
<Image DockPanel.Dock="Left" Width="16" Height="16" Source="{Binding Reference, Converter={StaticResource IconConverter}}" />
|
|
|
|
<TextBlock Text="{Binding Name}" />
|
2014-07-27 13:21:06 +00:00
|
|
|
</DockPanel>
|
|
|
|
</HierarchicalDataTemplate>
|
|
|
|
</TreeView.ItemTemplate>
|
|
|
|
</TreeView>
|
|
|
|
</Grid>
|
|
|
|
</UserControl>
|