aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Scripting/Tango.Scripting.IDE/ProjectItemsViews/CSharpScriptItemView.xaml
blob: 682956205b29cd95bbf6dc3e3a1f4d9d3b111a12 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
<UserControl x:Class="Tango.Scripting.IDE.ProjectItemsViews.CSharpScriptItemView"
             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:Tango.Scripting.IDE.ProjectItemsViews"
             xmlns:editors="clr-namespace:Tango.Scripting.Editors;assembly=Tango.Scripting.Editors"
             mc:Ignorable="d" 
             d:DesignHeight="450" d:DesignWidth="800">
    <Grid>
        <editors:ScriptEditor />
    </Grid>
</UserControl>
t */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
<UserControl x:Class="Tango.Scripting.IDE.ScriptIDEView"
             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:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
             xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
             xmlns:fa="http://schemas.fontawesome.io/icons/"
             xmlns:controls="clr-namespace:Tango.Scripting.IDE.Controls"
             xmlns:local="clr-namespace:Tango.Scripting.IDE"
             mc:Ignorable="d" 
             d:DesignHeight="450" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=local:ScriptIDEViewVM, IsDesignTimeCreatable=False}" x:Name="control">

    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <!-- MahApps.Metro resource dictionaries. Make sure that all file names are Case Sensitive! -->
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colors.xaml" />

                <!-- Accent and AppTheme setting -->

                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/Blue.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseDark.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/FlatButton.xaml" />

                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/VS/Colors.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/VS/Styles.xaml" />

                <ResourceDictionary Source="Resources.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>

    <Grid Background="{StaticResource IdeLightBackgroundBrush}">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="40"/>
                <RowDefinition Height="41*"/>
            </Grid.RowDefinitions>

            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="20"/>
                    <RowDefinition Height="1*"/>
                </Grid.RowDefinitions>

                <Grid>
                    <Menu>
                        <MenuItem Header="File"></MenuItem>
                        <MenuItem Header="Edit"></MenuItem>
                        <MenuItem Header="View"></MenuItem>
                        <MenuItem Header="Project"></MenuItem>
                        <MenuItem Header="Build"></MenuItem>
                        <MenuItem Header="Debug"></MenuItem>
                        <MenuItem Header="Tools"></MenuItem>
                        <MenuItem Header="Theme"></MenuItem>
                    </Menu>
                </Grid>
            </Grid>

            <Grid Grid.Row="1">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="1*" MinWidth="100" />
                    <ColumnDefinition Width="5"/>
                    <ColumnDefinition Width="300" MinWidth="20" />
                </Grid.ColumnDefinitions>

                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="1*" MinHeight="100" />
                        <RowDefinition Height="5"/>
                        <RowDefinition Height="100" MinHeight="20" />
                    </Grid.RowDefinitions>

                    <Grid>
                        <TabControl ItemsSource="{Binding OpenProjectItems}" SelectedItem="{Binding SelectedProjectItem}">
                            <TabControl.ItemContainerStyle>
                                <Style BasedOn="{StaticResource MetroTabItem}" TargetType="{x:Type TabItem}">
                                    <Setter Property="Background" Value="{StaticResource IdeLightBackgroundBrush}"></Setter>
                                    <Setter Property="mahapps:ControlsHelper.HeaderFontSize" Value="12"></Setter>
                                    <Setter Property="HeaderTemplate">
                                        <Setter.Value>
                                            <DataTemplate>
                                                <Border>
                                                    <StackPanel Orientation="Horizontal">
                                                        <TextBlock Text="{Binding Name}" Foreground="Gainsboro" VerticalAlignment="Center"></TextBlock>
                                                        <Button Command="{Binding ElementName=control,Path=DataContext.CloseProjectItemCommand}" CommandParameter="{Binding}" Margin="5 0 0 0" Cursor="Hand" Width="24" Height="24" VerticalAlignment="Center" Style="{DynamicResource MetroCircleButtonStyle}" mahapps:ButtonHelper.PreserveTextCase="True" BorderThickness="0">
                                                            <StackPanel Orientation="Horizontal">
                                                                <fa:ImageAwesome Width="10" Height="10" Icon="WindowClose" Foreground="Gainsboro"></fa:ImageAwesome>
                                                            </StackPanel>
                                                        </Button>
                                                    </StackPanel>
                                                </Border>
                                            </DataTemplate>
                                        </Setter.Value>
                                    </Setter>
                                    <Style.Triggers>
                                        <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self},Path=IsSelected}" Value="True">
                                            <Setter Property="Background" Value="#007ACC"></Setter>
                                        </DataTrigger>
                                    </Style.Triggers>
                                </Style>
                            </TabControl.ItemContainerStyle>

                            <TabControl.ContentTemplate>
                                <DataTemplate>
                                    <ContentPresenter Content="{Binding View}" />
                                </DataTemplate>
                            </TabControl.ContentTemplate>
                        </TabControl>
                    </Grid>

                    <GridSplitter HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Row="1" Background="{StaticResource IdeLightBackgroundBrush}" />

                    <Grid Grid.Row="2" Background="{StaticResource IdeMidBackgroundBrush}">

                    </Grid>
                </Grid>

                <GridSplitter HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="1" Background="{StaticResource IdeLightBackgroundBrush}" />

                <Grid Grid.Column="2">
                    <GroupBox Margin="0" Header="Solution Explorer" BorderThickness="1" BorderBrush="{StaticResource IdeBorderBrush}" mahapps:ControlsHelper.ContentCharacterCasing="Normal">
                        <TreeView ItemsSource="{Binding Solution.Projects}" Background="{StaticResource IdeMidBackgroundBrush}" >
                            <TreeView.ItemContainerStyle>
                                <Style TargetType="TreeViewItem" BasedOn="{StaticResource {x:Type TreeViewItem}}">
                                    <Setter Property="Background" Value="Transparent"></Setter>
                                    <Style.Triggers>
                                        <Trigger Property="IsMouseOver" Value="True">
                                            <Setter Property="Background" Value="Transparent"></Setter>
                                        </Trigger>
                                    </Style.Triggers>
                                </Style>
                            </TreeView.ItemContainerStyle>
                            <TreeView.ItemTemplate>
                                <HierarchicalDataTemplate ItemsSource="{Binding Path=Items}" DataType="{x:Type local:IProject}">
                                    <controls:SolutionItemControl SolutionItem="{Binding}" OpenCommand="{Binding ElementName=control,Path=DataContext.OpenProjectItemCommand}" />
                                </HierarchicalDataTemplate>
                            </TreeView.ItemTemplate>
                        </TreeView>
                    </GroupBox>
                </Grid>
            </Grid>
        </Grid>
    </Grid>
</UserControl>