aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Utilities/Tango.MachineDesigner.UI/Views/MachinesView.xaml
blob: 0bbf3a2851405e557f96be59f673c45534c173fd (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
39
40
41
42
43
<UserControl x:Class="Tango.MachineDesigner.UI.Views.MachinesView"
             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:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
             xmlns:local="clr-namespace:Tango.MachineDesigner.UI.Views"
             mc:Ignorable="d" 
             d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{Binding MachinesViewVM, Source={StaticResource Locator}}">
    <Grid>
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="300"/>
                <ColumnDefinition Width="1*"/>
            </Grid.ColumnDefinitions>

            <Grid Margin="10">
                <ListBox ItemsSource="{Binding Machines}" SelectedItem="{Binding SelectedMachine}">
                    <ListBox.ItemTemplate>
                        <DataTemplate>
                            <TextBlock>
                            <Run Text="{Binding Organization.Name}"></Run>
                            <LineBreak/>
                            <Run Text="{Binding Name}"></Run>
                            <LineBreak/>
                            <Run Text="{Binding Guid}"></Run>
                            </TextBlock>
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                </ListBox>
            </Grid>

            <Grid Grid.Column="1" Margin="10">
                <StackPanel Width="400" HorizontalAlignment="Left">
                    <TextBlock>Name</TextBlock>
                    <TextBox Text="{Binding SelectedMachine.Name}"></TextBox>
                    <TextBlock>Organization</TextBlock>
                    <ComboBox ItemsSource="{Binding Organizations}" SelectedItem="{Binding SelectedMachine.Organization}" DisplayMemberPath="Name"></ComboBox>
                </StackPanel>
            </Grid>
        </Grid>
    </Grid>
</UserControl>