aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Controls/DbTableView.xaml
blob: 6602d8973e845d1544575410d9c0e33a4e4e118b (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
<UserControl x:Class="Tango.MachineStudio.DB.Controls.DbTableView"
             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"
             mc:Ignorable="d" 
             d:DesignHeight="720" d:DesignWidth="1300" BorderThickness="1" BorderBrush="{StaticResource AccentColorBrush}">
    <Grid>

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

            <Grid Background="#E9E9E9">
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="10">
                    <materialDesign:PackIcon VerticalAlignment="Center" Width="24" Height="24" Foreground="{Binding ElementName=txtSearch, Path=BorderBrush}" Kind="AccountSearch" />
                    <TextBox x:Name="txtSearch" Text="{Binding Filter,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" materialDesign:HintAssist.Hint="Search" Width="200" FontSize="14" />
                </StackPanel>

                <StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal" Margin="0 0 10 0">
                    <Button Style="{StaticResource MaterialDesignFloatingActionDarkButton}" ToolTip="Remove" Command="{Binding DeleteCommand}" Width="40" Height="40">
                        <materialDesign:PackIcon Width="20" Height="20" Kind="Delete" />
                    </Button>
                    <Button Style="{StaticResource MaterialDesignFloatingActionDarkButton}" ToolTip="Edit" Command="{Binding EditCommand}" Margin="10 0 0 0" Width="40" Height="40">
                        <materialDesign:PackIcon Width="20" Height="20" Kind="Pencil" />
                    </Button>
                    <Button Style="{StaticResource MaterialDesignFloatingActionDarkButton}" ToolTip="Add" Command="{Binding AddCommand}" Margin="10 0 0 0" Width="40" Height="40">
                        <materialDesign:PackIcon Width="20" Height="20" Kind="Plus" />
                    </Button>
                </StackPanel>
            </Grid>

            <Grid Grid.Row="1">
                <ContentControl Content="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=MainContent}" Margin="0 60 0 0"></ContentControl>
            </Grid>
        </Grid>
    </Grid>
</UserControl>
dows.Shapes; namespace Tango.MachineStudio.UI.Notifications { /// <summary> /// Interaction logic for TextInputBoxWindow.xaml /// </summary> public partial class TextInputBoxWindow : Window { public TextInputBoxWindow() { InitializeComponent(); this.Loaded += TextInputBoxWindow_Loaded; ContentRendered += TextInputBoxWindow_ContentRendered; } private void TextInputBoxWindow_ContentRendered(object sender, EventArgs e) { txtText.Focus(); txtText.SelectAll(); } private void TextInputBoxWindow_Loaded(object sender, RoutedEventArgs e) { DoubleAnimation ani = new DoubleAnimation(); ani.To = 1; ani.Duration = TimeSpan.FromSeconds(0.5); this.BeginAnimation(Window.OpacityProperty, ani); } public String Hint { get { return (String)GetValue(HintProperty); } set { SetValue(HintProperty, value); } } public static readonly DependencyProperty HintProperty = DependencyProperty.Register("Hint", typeof(String), typeof(TextInputBoxWindow), new PropertyMetadata(null)); public String Response { get { return (String)GetValue(ResponseProperty); } set { SetValue(ResponseProperty, value); } } public static readonly DependencyProperty ResponseProperty = DependencyProperty.Register("Response", typeof(String), typeof(TextInputBoxWindow), new PropertyMetadata(null)); public String Message { get { return (String)GetValue(MessageProperty); } set { SetValue(MessageProperty, value); } } public static readonly DependencyProperty MessageProperty = DependencyProperty.Register("Message", typeof(String), typeof(TextInputBoxWindow), new PropertyMetadata(null)); public Brush IconColor { get { return (Brush)GetValue(IconColorProperty); } set { SetValue(IconColorProperty, value); } } public static readonly DependencyProperty IconColorProperty = DependencyProperty.Register("IconColor", typeof(Brush), typeof(TextInputBoxWindow), new PropertyMetadata(Brushes.Black)); public PackIconKind IconKind { get { return (PackIconKind)GetValue(IconKindProperty); } set { SetValue(IconKindProperty, value); } } public static readonly DependencyProperty IconKindProperty = DependencyProperty.Register("IconKind", typeof(PackIconKind), typeof(TextInputBoxWindow), new PropertyMetadata(PackIconKind.Information)); private void OnOKClicked(object sender, RoutedEventArgs e) { DialogResult = true; Close(); } private void OnCancelClicked(object sender, RoutedEventArgs e) { DialogResult = false; Close(); } } }