-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProjectItem.xaml
More file actions
64 lines (61 loc) · 4.13 KB
/
Copy pathProjectItem.xaml
File metadata and controls
64 lines (61 loc) · 4.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<UserControl x:Class="Pin.ProjectItem"
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:local="clr-namespace:Pin"
xmlns:ColorPicker="clr-namespace:Pin.ColorPicker"
mc:Ignorable="d"
d:DesignHeight="100" d:DesignWidth="400">
<UserControl.Resources>
<ControlTemplate x:Key="Template_Explorer_Open" TargetType="Button">
<Border CornerRadius="3" Background="DarkGray" Height="15" Width="15">
<ContentPresenter Content="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,0,0,0" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
</Trigger>
<Trigger Property="IsPressed" Value="True">
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</UserControl.Resources>
<Border VerticalAlignment="Center" Padding="5,5">
<Border.ContextMenu>
<ContextMenu x:Name="UI_ContextMenu" Opened="UI_ContextMenu_Opened" Closed="UI_ContextMenu_Closed" MouseEnter="UI_ContextMenu_MouseEnter" MouseLeave="UI_ContextMenu_MouseLeave">
<MenuItem x:Name="UI_MenuItem_OpenWithExplorer" Header="Open with Explorer" Click="UI_OpenWithExplorer_Click"/>
<MenuItem x:Name="UI_MenuItem_Edit" Header="Edit" Click="UI_MenuItem_Edit_Click"/>
<MenuItem x:Name="UI_MenuItem_Delete" Header="Delete" Click="UI_MenuItem_Delete_Click"/>
</ContextMenu>
</Border.ContextMenu>
<Grid>
<Grid x:Name="UI_Grid_View" Visibility="Visible">
<Button x:Name="UI_Btn_ProjectColor" Template="{StaticResource StyledButton}" Background="{Binding FillColor,UpdateSourceTrigger=PropertyChanged}" Margin="5,0,5,0" Width="10" Height="10" HorizontalAlignment="Left"/>
<TextBlock VerticalAlignment="Center" Margin="20,0,0,0" Text="{Binding ProjectName,FallbackValue=ProjectName}"/>
<Button Template="{StaticResource Template_Explorer_Open}" VerticalAlignment="Center" x:Name="UI_Btn_OpenExplorer" Click="UI_OpenWithExplorer_Click" Margin="0,0,5,0" Padding="0" HorizontalAlignment="Right">
<Border Margin="2">
<Image Source="/images/Folder.png"/>
</Border>
</Button>
</Grid>
<Grid x:Name="UI_Grid_Edit" Width="275" Visibility="Hidden">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="30"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="45"/>
<ColumnDefinition Width="45"/>
</Grid.ColumnDefinitions>
<ColorPicker:ColorSelectionBox x:Name="UI_ColorSelectionBox" FillColor="{Binding FillColor,UpdateSourceTrigger=PropertyChanged}" Margin="0,0,0,0" Width="10" Height="10" Grid.RowSpan="2"/>
<TextBox x:Name="UI_TextBox_ProjectName" Grid.Row="0" Grid.ColumnSpan="2" Grid.Column="1" Text="{Binding ProjectName}"/>
<TextBox x:Name="UI_TextBox_Path" Grid.Row="1" Grid.Column="1" Text="{Binding ProjectPath}"/>
<Button x:Name="UI_Btn_Cancel" Grid.Column="3" Grid.Row="0" Template="{StaticResource SaveBtn}" Click="UI_Btn_Cancel_Click">Cancel</Button>
<Button x:Name="UI_Btn_Browse" Grid.Column="2" Grid.Row="1" Template="{StaticResource SaveBtn}" Click="UI_Btn_Browse_Click">Browse</Button>
<Button x:Name="UI_Btn_Save" Grid.Column="3" Grid.Row="1" Template="{StaticResource SaveBtn}" Click="UI_Btn_Save_Click">Save</Button>
</Grid>
</Grid>
</Border>
</UserControl>