blob: c1d784f10de5a4464708356e80878d46562980ab (
plain)
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
|
<Window x:Class="Tango.Scripting.Test.MainWindow"
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:scripting="clr-namespace:Tango.Scripting.Editors;assembly=Tango.Scripting.Editors"
xmlns:local="clr-namespace:Tango.Scripting.Test"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800" d:DataContext="{d:DesignInstance Type={x:Type local:MainWindowVM},IsDesignTimeCreatable=False}">
<Grid>
<DockPanel>
<Menu DockPanel.Dock="Top" IsMainMenu="True">
<MenuItem Header="File">
<MenuItem Header="Add Script" Command="{Binding AddScriptCommand}"></MenuItem>
</MenuItem>
<MenuItem Header="Debug">
<MenuItem Header="Run" Command="{Binding RunCommand}"></MenuItem>
</MenuItem>
</Menu>
<TabControl ItemsSource="{Binding Project.Scripts}" SelectedIndex="0">
<TabControl.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Name}"></TextBlock>
</DataTemplate>
</TabControl.ItemTemplate>
<TabControl.ContentTemplate>
<DataTemplate>
<scripting:ScriptEditor
ReferenceAssemblies="{Binding RelativeSource={RelativeSource AncestorType=Window},Path=DataContext.Project.ReferenceAssembliesLoaded}"
AdditionalScripts="{Binding RelativeSource={RelativeSource AncestorType=Window},Path=DataContext.Project.AdditionalScripts}"
Code="{Binding Code,Mode=TwoWay}" />
</DataTemplate>
</TabControl.ContentTemplate>
</TabControl>
</DockPanel>
</Grid>
</Window>
|