aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ComboboxEditable.xaml
blob: 01e7d796075fb281e7aa87e955948868cf2720f7 (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
<UserControl x:Class="Tango.MachineStudio.ThreadExtensions.Views.ComboboxEditable"
             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:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
             xmlns:local="clr-namespace:Tango.MachineStudio.ThreadExtensions.Views"
             mc:Ignorable="d" 
             d:DesignHeight="450" d:DesignWidth="800">
    <Grid>
        <DockPanel>
            <Button Margin="2 0 0 0"  Command="{Binding EditCommand, RelativeSource={RelativeSource AncestorType=UserControl}}" DockPanel.Dock="Right" Padding="0" Background="Transparent" BorderThickness="0">
                <materialDesign:PackIcon Kind="Pencil" Height="12" Foreground="{StaticResource BlueBrush100}" Width="12" FontWeight="UltraBold">
                    <materialDesign:PackIcon.LayoutTransform>
                        <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.6" ScaleY="1.6"/>
                    </materialDesign:PackIcon.LayoutTransform>
                </materialDesign:PackIcon>
            </Button>

            <Button Margin="2 0 0 0"  Command="{Binding AddCommand, RelativeSource={RelativeSource AncestorType=UserControl}}" DockPanel.Dock="Right" Padding="0" Background="Transparent" BorderThickness="0">
                <materialDesign:PackIcon Kind="Plus" Height="12" Foreground="{StaticResource RedBrush100}" Width="12" FontWeight="UltraBold">
                    <materialDesign:PackIcon.LayoutTransform>
                        <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.6" ScaleY="1.6"/>
                    </materialDesign:PackIcon.LayoutTransform>
                </materialDesign:PackIcon>
            </Button>

            <ComboBox DockPanel.Dock="Left" VerticalAlignment="Center" ItemsSource="{Binding RelativeSource={RelativeSource AncestorType=UserControl,Mode=FindAncestor},Path=ItemsSource}" SelectedItem="{Binding SelectedItem, RelativeSource={RelativeSource AncestorType=UserControl}}" DisplayMemberPath="{Binding RelativeSource={RelativeSource AncestorType=UserControl,Mode=FindAncestor},Path=DisplayMemberPath}"  IsEditable="False" Margin="0 0 0 0" Width="Auto" />

        </DockPanel>
    </Grid>
</UserControl>