-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAddAssetDialog.xaml
More file actions
103 lines (93 loc) · 5.59 KB
/
Copy pathAddAssetDialog.xaml
File metadata and controls
103 lines (93 loc) · 5.59 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<platformUi:DialogWindow x:Class="CodingWithCalvin.VsixManifestDesigner.Dialogs.AddAssetDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:platformUi="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Shell.15.0"
xmlns:vs="clr-namespace:Microsoft.VisualStudio.Shell;assembly=Microsoft.VisualStudio.Shell.15.0"
mc:Ignorable="d"
Title="Add Asset"
Width="500" Height="350"
WindowStartupLocation="CenterOwner"
ResizeMode="NoResize"
ShowInTaskbar="False"
HasMaximizeButton="False"
HasMinimizeButton="False"
Background="{DynamicResource {x:Static vs:VsBrushes.ToolWindowBackgroundKey}}">
<platformUi:DialogWindow.Resources>
<Style TargetType="Label">
<Setter Property="Foreground" Value="{DynamicResource {x:Static vs:VsBrushes.ToolWindowTextKey}}" />
</Style>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="{DynamicResource {x:Static vs:VsBrushes.ToolWindowTextKey}}" />
</Style>
</platformUi:DialogWindow.Resources>
<Grid Margin="15">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<!-- Type -->
<Label Grid.Row="0" Grid.Column="0" Content="Type:" VerticalAlignment="Center" />
<ComboBox Grid.Row="0" Grid.Column="1" x:Name="TypeComboBox" Margin="0,0,0,10"
SelectionChanged="TypeComboBox_SelectionChanged" />
<!-- Source -->
<Label Grid.Row="1" Grid.Column="0" Content="Source:" VerticalAlignment="Center" />
<ComboBox Grid.Row="1" Grid.Column="1" x:Name="SourceComboBox" Margin="0,0,0,10"
SelectionChanged="SourceComboBox_SelectionChanged">
<ComboBoxItem Content="This Project" Tag="CurrentProject" />
<ComboBoxItem Content="Project in Solution" Tag="Project" />
<ComboBoxItem Content="File on Disk" Tag="File" />
</ComboBox>
<!-- Project (shown when Source is Project) -->
<Label Grid.Row="2" Grid.Column="0" x:Name="ProjectLabel" Content="Project:" VerticalAlignment="Center" />
<Grid Grid.Row="2" Grid.Column="1" x:Name="ProjectGrid" Margin="0,0,0,10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBox Grid.Column="0" x:Name="ProjectTextBox" IsReadOnly="True" />
<Button Grid.Column="1" Content="..." Width="30" Margin="5,0,0,0" Click="BrowseProject_Click" />
</Grid>
<!-- Path (shown when Source is File) -->
<Label Grid.Row="3" Grid.Column="0" x:Name="PathLabel" Content="Path:" VerticalAlignment="Center" Visibility="Collapsed" />
<Grid Grid.Row="3" Grid.Column="1" x:Name="PathGrid" Margin="0,0,0,10" Visibility="Collapsed">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBox Grid.Column="0" x:Name="PathTextBox" />
<Button Grid.Column="1" Content="..." Width="30" Margin="5,0,0,0" Click="BrowsePath_Click" />
</Grid>
<!-- VSIX Sub Path -->
<Label Grid.Row="4" Grid.Column="0" Content="VSIX SubPath:" VerticalAlignment="Center" />
<TextBox Grid.Row="4" Grid.Column="1" x:Name="VsixSubPathTextBox" Margin="0,0,0,10" />
<!-- Addressable -->
<Label Grid.Row="5" Grid.Column="0" Content="Addressable:" VerticalAlignment="Center" />
<CheckBox Grid.Row="5" Grid.Column="1" x:Name="AddressableCheckBox" Margin="0,0,0,10" VerticalAlignment="Center" />
<!-- Warning for SDK-style projects without VsixSdk when selecting template assets -->
<Border Grid.Row="6" Grid.Column="0" Grid.ColumnSpan="2" x:Name="WarningBorder"
Background="#FFF3CD" BorderBrush="#FFCC00" BorderThickness="1" CornerRadius="3"
Padding="10" Margin="0,0,0,10" Visibility="Collapsed">
<TextBlock x:Name="WarningText" TextWrapping="Wrap" Foreground="#856404">
Warning: SDK-style projects require CodingWithCalvin.VsixSdk to properly handle template assets.
</TextBlock>
</Border>
<!-- Buttons -->
<StackPanel Grid.Row="7" Grid.Column="0" Grid.ColumnSpan="2"
Orientation="Horizontal" HorizontalAlignment="Right">
<Button Content="OK" Width="75" Margin="0,0,10,0" IsDefault="True" Click="OkButton_Click" />
<Button Content="Cancel" Width="75" IsCancel="True" />
</StackPanel>
</Grid>
</platformUi:DialogWindow>