|
|
|
|
@ -1,4 +1,4 @@
@@ -1,4 +1,4 @@
|
|
|
|
|
<Window |
|
|
|
|
<Window |
|
|
|
|
x:Class="ICSharpCode.AspNet.Mvc.AddMvcViewToProjectView" |
|
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|
|
|
|
xmlns:aspnetmvcaddin="clr-namespace:ICSharpCode.AspNet.Mvc" |
|
|
|
|
@ -11,7 +11,7 @@
@@ -11,7 +11,7 @@
|
|
|
|
|
WindowStartupLocation="CenterOwner" |
|
|
|
|
FocusManager.FocusedElement="{Binding ElementName=ViewNameTextBox}" |
|
|
|
|
Height="400" |
|
|
|
|
Width="400"> |
|
|
|
|
Width="500"> |
|
|
|
|
|
|
|
|
|
<Window.Resources> |
|
|
|
|
<Style TargetType="Button" BasedOn="{x:Static core:GlobalStyles.ButtonStyle}"/> |
|
|
|
|
@ -23,137 +23,211 @@
@@ -23,137 +23,211 @@
|
|
|
|
|
</Window.Resources> |
|
|
|
|
|
|
|
|
|
<Grid> |
|
|
|
|
<Grid.RowDefinitions> |
|
|
|
|
<RowDefinition Height="Auto"/> |
|
|
|
|
<RowDefinition Height="Auto"/> |
|
|
|
|
<RowDefinition Height="Auto"/> |
|
|
|
|
<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 |
|
|
|
|
x:Name="MainGrid"> |
|
|
|
|
<Grid.RowDefinitions> |
|
|
|
|
<RowDefinition Height="Auto"/> |
|
|
|
|
<RowDefinition Height="Auto"/> |
|
|
|
|
<RowDefinition Height="Auto"/> |
|
|
|
|
<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="Auto"/> |
|
|
|
|
<ColumnDefinition Width="*"/> |
|
|
|
|
</Grid.ColumnDefinitions> |
|
|
|
|
|
|
|
|
|
<Label |
|
|
|
|
Margin="0, 2, 0, 0" |
|
|
|
|
Content="View Name:"/> |
|
|
|
|
<TextBox |
|
|
|
|
x:Name="ViewNameTextBox" |
|
|
|
|
Margin="0, 2, 0, 0" |
|
|
|
|
Grid.Column="1" |
|
|
|
|
Text="{Binding Path=ViewName, UpdateSourceTrigger=PropertyChanged}"/> |
|
|
|
|
|
|
|
|
|
<Grid.ColumnDefinitions> |
|
|
|
|
<ColumnDefinition Width="Auto"/> |
|
|
|
|
<ColumnDefinition Width="*"/> |
|
|
|
|
</Grid.ColumnDefinitions> |
|
|
|
|
|
|
|
|
|
<Label |
|
|
|
|
Margin="0, 2, 0, 0" |
|
|
|
|
Content="View Name:"/> |
|
|
|
|
<TextBox |
|
|
|
|
x:Name="ViewNameTextBox" |
|
|
|
|
Margin="0, 2, 0, 0" |
|
|
|
|
Grid.Column="1" |
|
|
|
|
Text="{Binding Path=ViewName, UpdateSourceTrigger=PropertyChanged}"/> |
|
|
|
|
|
|
|
|
|
<Label |
|
|
|
|
Grid.Row="1" |
|
|
|
|
Content="View Engine:"/> |
|
|
|
|
<ComboBox |
|
|
|
|
Grid.Row="1" |
|
|
|
|
Grid.Column="1" |
|
|
|
|
Margin="0, 2, 0, 0" |
|
|
|
|
ItemsSource="{Binding Path=ViewEngines}" |
|
|
|
|
ItemTemplate="{StaticResource ViewEngineTemplate}" |
|
|
|
|
SelectedItem="{Binding Path=SelectedViewEngine}"/> |
|
|
|
|
|
|
|
|
|
<Label |
|
|
|
|
Grid.Row="2" |
|
|
|
|
Content="Partial View:"/> |
|
|
|
|
<CheckBox |
|
|
|
|
Grid.Column="1" |
|
|
|
|
Grid.Row="2" |
|
|
|
|
Margin="0, 6, 0, 0" |
|
|
|
|
IsChecked="{Binding Path=IsPartialView}"/> |
|
|
|
|
|
|
|
|
|
<Label |
|
|
|
|
Grid.Row="3" |
|
|
|
|
Margin="0, 20, 0, 0" |
|
|
|
|
Content="Strongly Typed:"/> |
|
|
|
|
<CheckBox |
|
|
|
|
Grid.Column="1" |
|
|
|
|
Grid.Row="3" |
|
|
|
|
Margin="0, 28, 0, 0" |
|
|
|
|
IsChecked="{Binding Path=IsStronglyTypedView}"/> |
|
|
|
|
|
|
|
|
|
<Label |
|
|
|
|
Grid.Row="4" |
|
|
|
|
IsEnabled="{Binding Path=IsStronglyTypedView}" |
|
|
|
|
Content="Model:"/> |
|
|
|
|
<ComboBox |
|
|
|
|
Grid.Row="4" |
|
|
|
|
Grid.Column="1" |
|
|
|
|
Margin="0, 2, 0, 0" |
|
|
|
|
IsEditable="True" |
|
|
|
|
IsEnabled="{Binding Path=IsStronglyTypedView}" |
|
|
|
|
ItemsSource="{Binding Path=ModelClasses}" |
|
|
|
|
Text="{Binding Path=ModelClassName, UpdateSourceTrigger=PropertyChanged}" |
|
|
|
|
SelectedItem="{Binding Path=SelectedModelClass}"/> |
|
|
|
|
|
|
|
|
|
<Label |
|
|
|
|
Grid.Row="6" |
|
|
|
|
Margin="0, 20, 0, 0" |
|
|
|
|
Visibility="{Binding Path=IsAspxViewEngineSelected, Converter={StaticResource BoolToVisibility}}" |
|
|
|
|
Content="Use Master Page:"/> |
|
|
|
|
<Label |
|
|
|
|
Grid.Row="6" |
|
|
|
|
Margin="0, 20, 0, 0" |
|
|
|
|
Visibility="{Binding Path=IsRazorViewEngineSelected, Converter={StaticResource BoolToVisibility}}" |
|
|
|
|
Content="Use Layout:"/> |
|
|
|
|
<CheckBox |
|
|
|
|
Grid.Column="1" |
|
|
|
|
Grid.Row="6" |
|
|
|
|
Margin="0, 28, 0, 0" |
|
|
|
|
IsChecked="{Binding Path=IsContentPage}"/> |
|
|
|
|
|
|
|
|
|
<Label |
|
|
|
|
Grid.Row="7" |
|
|
|
|
Visibility="{Binding Path=IsAspxViewEngineSelected, Converter={StaticResource BoolToVisibility}}" |
|
|
|
|
IsEnabled="{Binding Path=IsContentPage}" |
|
|
|
|
Content="Master Page:"/> |
|
|
|
|
<Label |
|
|
|
|
Grid.Row="7" |
|
|
|
|
Visibility="{Binding Path=IsRazorViewEngineSelected, Converter={StaticResource BoolToVisibility}}" |
|
|
|
|
IsEnabled="{Binding Path=IsContentPage}" |
|
|
|
|
Content="Layout:"/> |
|
|
|
|
<TextBox |
|
|
|
|
Grid.Row="7" |
|
|
|
|
Grid.Column="1" |
|
|
|
|
IsEnabled="{Binding Path=IsContentPage}" |
|
|
|
|
Text="{Binding Path=MasterPageFile}"/> |
|
|
|
|
|
|
|
|
|
<Label |
|
|
|
|
Grid.Row="8" |
|
|
|
|
Visibility="{Binding Path=IsAspxViewEngineSelected, Converter={StaticResource BoolToVisibility}}" |
|
|
|
|
IsEnabled="{Binding Path=IsContentPage}" |
|
|
|
|
Content="Main Content ID:"/> |
|
|
|
|
<TextBox |
|
|
|
|
Grid.Row="8" |
|
|
|
|
Grid.Column="1" |
|
|
|
|
Visibility="{Binding Path=IsAspxViewEngineSelected, Converter={StaticResource BoolToVisibility}}" |
|
|
|
|
IsEnabled="{Binding Path=IsContentPage}" |
|
|
|
|
Text="{Binding Path=PrimaryContentPlaceHolderId}"/> |
|
|
|
|
<Label |
|
|
|
|
Grid.Row="1" |
|
|
|
|
Content="View Engine:"/> |
|
|
|
|
<ComboBox |
|
|
|
|
Grid.Row="1" |
|
|
|
|
Grid.Column="1" |
|
|
|
|
Margin="0, 2, 0, 0" |
|
|
|
|
ItemsSource="{Binding Path=ViewEngines}" |
|
|
|
|
ItemTemplate="{StaticResource ViewEngineTemplate}" |
|
|
|
|
SelectedItem="{Binding Path=SelectedViewEngine}"/> |
|
|
|
|
|
|
|
|
|
<Label |
|
|
|
|
Grid.Row="2" |
|
|
|
|
Content="Partial View:"/> |
|
|
|
|
<CheckBox |
|
|
|
|
Grid.Column="1" |
|
|
|
|
Grid.Row="2" |
|
|
|
|
Margin="0, 6, 0, 0" |
|
|
|
|
IsChecked="{Binding Path=IsPartialView}"/> |
|
|
|
|
|
|
|
|
|
<Label |
|
|
|
|
Grid.Row="3" |
|
|
|
|
Margin="0, 20, 0, 0" |
|
|
|
|
Content="Strongly Typed:"/> |
|
|
|
|
<CheckBox |
|
|
|
|
Grid.Column="1" |
|
|
|
|
Grid.Row="3" |
|
|
|
|
Margin="0, 28, 0, 0" |
|
|
|
|
IsChecked="{Binding Path=IsStronglyTypedView}"/> |
|
|
|
|
|
|
|
|
|
<Label |
|
|
|
|
Grid.Row="4" |
|
|
|
|
IsEnabled="{Binding Path=IsStronglyTypedView}" |
|
|
|
|
Content="Model:"/> |
|
|
|
|
<ComboBox |
|
|
|
|
Grid.Row="4" |
|
|
|
|
Grid.Column="1" |
|
|
|
|
Margin="0, 2, 0, 0" |
|
|
|
|
IsEditable="True" |
|
|
|
|
IsEnabled="{Binding Path=IsStronglyTypedView}" |
|
|
|
|
ItemsSource="{Binding Path=ModelClasses}" |
|
|
|
|
Text="{Binding Path=ModelClassName, UpdateSourceTrigger=PropertyChanged}" |
|
|
|
|
SelectedItem="{Binding Path=SelectedModelClass}"/> |
|
|
|
|
|
|
|
|
|
<Label |
|
|
|
|
Grid.Row="6" |
|
|
|
|
Margin="0, 20, 0, 0" |
|
|
|
|
Visibility="{Binding Path=IsAspxViewEngineSelected, Converter={StaticResource BoolToVisibility}}" |
|
|
|
|
Content="Use Master Page:"/> |
|
|
|
|
<Label |
|
|
|
|
Grid.Row="6" |
|
|
|
|
Margin="0, 20, 0, 0" |
|
|
|
|
Visibility="{Binding Path=IsRazorViewEngineSelected, Converter={StaticResource BoolToVisibility}}" |
|
|
|
|
Content="Use Layout:"/> |
|
|
|
|
<CheckBox |
|
|
|
|
Grid.Column="1" |
|
|
|
|
Grid.Row="6" |
|
|
|
|
Margin="0, 28, 0, 0" |
|
|
|
|
IsChecked="{Binding Path=IsContentPage}"/> |
|
|
|
|
|
|
|
|
|
<Label |
|
|
|
|
Grid.Row="7" |
|
|
|
|
Visibility="{Binding Path=IsAspxViewEngineSelected, Converter={StaticResource BoolToVisibility}}" |
|
|
|
|
IsEnabled="{Binding Path=IsContentPage}" |
|
|
|
|
Content="Master Page:"/> |
|
|
|
|
<Label |
|
|
|
|
Grid.Row="7" |
|
|
|
|
Visibility="{Binding Path=IsRazorViewEngineSelected, Converter={StaticResource BoolToVisibility}}" |
|
|
|
|
IsEnabled="{Binding Path=IsContentPage}" |
|
|
|
|
Content="Layout:"/> |
|
|
|
|
<Grid |
|
|
|
|
Grid.Row="7" |
|
|
|
|
Grid.Column="1"> |
|
|
|
|
<Grid.ColumnDefinitions> |
|
|
|
|
<ColumnDefinition Width="*"/> |
|
|
|
|
<ColumnDefinition Width="Auto"/> |
|
|
|
|
<ColumnDefinition Width="Auto"/> |
|
|
|
|
</Grid.ColumnDefinitions> |
|
|
|
|
<TextBox |
|
|
|
|
IsEnabled="{Binding Path=IsContentPage}" |
|
|
|
|
Text="{Binding Path=MasterPageFile}"/> |
|
|
|
|
<StackPanel |
|
|
|
|
Grid.Column="2" |
|
|
|
|
Orientation="Horizontal"> |
|
|
|
|
<Button |
|
|
|
|
Padding="9, 0, 9, 0" |
|
|
|
|
Style="{x:Null}" |
|
|
|
|
IsEnabled="{Binding Path=IsContentPage}" |
|
|
|
|
Content="..." |
|
|
|
|
Command="{Binding Path=OpenSelectMasterPageViewCommand}"/> |
|
|
|
|
</StackPanel> |
|
|
|
|
</Grid> |
|
|
|
|
|
|
|
|
|
<Label |
|
|
|
|
Grid.Row="8" |
|
|
|
|
Visibility="{Binding Path=IsAspxViewEngineSelected, Converter={StaticResource BoolToVisibility}}" |
|
|
|
|
IsEnabled="{Binding Path=IsContentPage}" |
|
|
|
|
Content="Main Content ID:"/> |
|
|
|
|
<TextBox |
|
|
|
|
Grid.Row="8" |
|
|
|
|
Grid.Column="1" |
|
|
|
|
Visibility="{Binding Path=IsAspxViewEngineSelected, Converter={StaticResource BoolToVisibility}}" |
|
|
|
|
IsEnabled="{Binding Path=IsContentPage}" |
|
|
|
|
Text="{Binding Path=PrimaryContentPlaceHolderId}"/> |
|
|
|
|
|
|
|
|
|
<StackPanel |
|
|
|
|
Orientation="Horizontal" |
|
|
|
|
HorizontalAlignment="Right" |
|
|
|
|
Margin="4" |
|
|
|
|
Grid.ColumnSpan="2" |
|
|
|
|
Grid.Row="10"> |
|
|
|
|
<Button |
|
|
|
|
Margin="2, 0" |
|
|
|
|
Content="_Add" |
|
|
|
|
IsDefault="True" |
|
|
|
|
Command="{Binding Path=AddMvcViewCommand}"/> |
|
|
|
|
<Button |
|
|
|
|
Margin="2, 0" |
|
|
|
|
Content="_Cancel" |
|
|
|
|
IsCancel="True"/> |
|
|
|
|
</StackPanel> |
|
|
|
|
</Grid> |
|
|
|
|
|
|
|
|
|
<Grid |
|
|
|
|
x:Name="SelectMasterPageGrid" |
|
|
|
|
Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" |
|
|
|
|
mvc:SlideBehaviour.IsDisplayed="{Binding Path=IsSelectMasterPageViewOpen}" |
|
|
|
|
mvc:SlideBehaviour.FrameworkElementHiddenBySlide="{Binding ElementName=MainGrid}" |
|
|
|
|
Visibility="Collapsed"> |
|
|
|
|
|
|
|
|
|
<StackPanel |
|
|
|
|
Orientation="Horizontal" |
|
|
|
|
HorizontalAlignment="Right" |
|
|
|
|
Margin="4" |
|
|
|
|
Grid.ColumnSpan="2" |
|
|
|
|
Grid.Row="10"> |
|
|
|
|
<Button |
|
|
|
|
Margin="2, 0" |
|
|
|
|
Content="_Add" |
|
|
|
|
IsDefault="True" |
|
|
|
|
Command="{Binding Path=AddMvcViewCommand}"/> |
|
|
|
|
<Button |
|
|
|
|
Margin="2, 0" |
|
|
|
|
Content="_Cancel" |
|
|
|
|
IsCancel="True"/> |
|
|
|
|
</StackPanel> |
|
|
|
|
<Grid.RowDefinitions> |
|
|
|
|
<RowDefinition Height="Auto"/> |
|
|
|
|
<RowDefinition Height="*"/> |
|
|
|
|
<RowDefinition Height="Auto"/> |
|
|
|
|
</Grid.RowDefinitions> |
|
|
|
|
|
|
|
|
|
<TextBlock |
|
|
|
|
Margin="4" |
|
|
|
|
Visibility="{Binding Path=IsAspxViewEngineSelected, Converter={StaticResource BoolToVisibility}}" |
|
|
|
|
Text="Select a Master Page"/> |
|
|
|
|
<TextBlock |
|
|
|
|
Margin="4" |
|
|
|
|
Visibility="{Binding Path=IsRazorViewEngineSelected, Converter={StaticResource BoolToVisibility}}" |
|
|
|
|
Text="Select a Layout Page"/> |
|
|
|
|
<ListView |
|
|
|
|
Grid.Row="1" |
|
|
|
|
ItemsSource="{Binding Path=MasterPages}" |
|
|
|
|
SelectedItem="{Binding Path=SelectedMasterPage}"> |
|
|
|
|
<ListView.View> |
|
|
|
|
<GridView> |
|
|
|
|
<GridViewColumn |
|
|
|
|
Header="File" |
|
|
|
|
DisplayMemberBinding="{Binding Path=FileName}" |
|
|
|
|
Width="Auto"/> |
|
|
|
|
<GridViewColumn |
|
|
|
|
Header="Project Folder" |
|
|
|
|
DisplayMemberBinding="{Binding Path=FolderRelativeToProject}" |
|
|
|
|
Width="Auto"/> |
|
|
|
|
</GridView> |
|
|
|
|
</ListView.View> |
|
|
|
|
</ListView> |
|
|
|
|
<StackPanel |
|
|
|
|
Orientation="Horizontal" |
|
|
|
|
HorizontalAlignment="Right" |
|
|
|
|
Margin="4" |
|
|
|
|
Grid.Row="2"> |
|
|
|
|
<Button |
|
|
|
|
Margin="2, 0" |
|
|
|
|
Content="_Back" |
|
|
|
|
Command="{Binding Path=CloseSelectMasterPageViewCommand}"/> |
|
|
|
|
<Button |
|
|
|
|
Margin="2, 0" |
|
|
|
|
Content="_Select" |
|
|
|
|
Command="{Binding Path=SelectMasterPageCommand}"/> |
|
|
|
|
</StackPanel> |
|
|
|
|
</Grid> |
|
|
|
|
</Grid> |
|
|
|
|
</Window> |