aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/FSE/Modules/Tango.FSE.Diagnostics/Project/Widgets/RealTimeGraph/RealTimeGraphWidgetSettingsView.xaml
blob: 823df1ffe5da8cdd61947b6b1ebedb21b37f4514 (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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<UserControl x:Class="Tango.FSE.Diagnostics.Project.Widgets.RealTimeGraph.RealTimeGraphWidgetSettingsView"
             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:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
             xmlns:controls="clr-namespace:Tango.FSE.Common.Controls;assembly=Tango.FSE.Common"
             xmlns:colorPicker="clr-namespace:Tango;assembly=Tango.ColorPicker"
             xmlns:material="http://materialdesigninxaml.net/winfx/xaml/themes"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:Tango.FSE.Diagnostics.Project.Widgets.RealTimeGraph"
             mc:Ignorable="d" 
             d:DesignHeight="1200" d:DesignWidth="600" d:DataContext="{d:DesignInstance Type=local:RealTimeGraphWidget,IsDesignTimeCreatable=False}">
    <Grid>
        <StackPanel>

            <controls:FSEGroupBox Header="DURATION" HeaderFontSize="{StaticResource FSE_SmallFontSize}">
                <StackPanel>
                    <DockPanel>
                        <TextBlock DockPanel.Dock="Right" FontSize="{StaticResource FSE_SmallerFontSize}"  Text="{Binding Settings.Duration,Mode=OneWay}" />
                        <TextBlock FontSize="{StaticResource FSE_SmallerFontSize}">Maximum Visible Time</TextBlock>
                    </DockPanel>
                    <Slider Margin="0 5 0 0" Minimum="10" Maximum="3600" IsSnapToTickEnabled="True" Value="{Binding Settings.Duration,Converter={StaticResource TimeSpanToSecondsConverter},Mode=TwoWay}"></Slider>
                </StackPanel>
            </controls:FSEGroupBox>

            <controls:FSEGroupBox Margin="0 10 0 0" Header="RANGE" HeaderFontSize="{StaticResource FSE_SmallFontSize}">
                <StackPanel>
                    <DockPanel>
                        <StackPanel Margin="0 -5 0 0" DockPanel.Dock="Right" Orientation="Horizontal">
                            <TextBox Width="70" Style="{StaticResource FSE_Rounded_Corners_TextBox}" FontSize="{StaticResource FSE_SmallerFontSize}" Text="{Binding Settings.Min}"></TextBox>
                            <TextBlock Margin="5 0">-</TextBlock>
                            <TextBox Width="70" Style="{StaticResource FSE_Rounded_Corners_TextBox}" FontSize="{StaticResource FSE_SmallerFontSize}" Text="{Binding Settings.Max}"></TextBox>
                        </StackPanel>
                        <TextBlock FontSize="{StaticResource FSE_SmallerFontSize}" >Y Min/Max</TextBlock>
                    </DockPanel>
                    <mahapps:RangeSlider Margin="0 5 0 0" 
                                         Minimum="-100000" 
                                         Interval="1"
                                         Maximum="100000"
                                         SmallChange="1"
                                         IsSnapToTickEnabled="True"
                                         AutoToolTipPlacement="None"
                                         LowerValue="{Binding Settings.Min,UpdateSourceTrigger=PropertyChanged}"
                                         UpperValue="{Binding Settings.Max,UpdateSourceTrigger=PropertyChanged}"/>

                    <CheckBox FontSize="{StaticResource FSE_SmallFontSize}" Margin="0 10 0 0" IsChecked="{Binding Settings.AutoRange}">Auto Range</CheckBox>
                </StackPanel>
            </controls:FSEGroupBox>

            <controls:FSEGroupBox Header="FORMAT" Margin="0 10 0 0" HeaderFontSize="{StaticResource FSE_SmallFontSize}">
                <StackPanel>
                    <TextBlock FontSize="{StaticResource FSE_SmallerFontSize}" >Decimal Places</TextBlock>
                    <mahapps:NumericUpDown Minimum="0" Maximum="3" Focusable="False" Value="{Binding Settings.DecimalPlaces,UpdateSourceTrigger=PropertyChanged}" />
                </StackPanel>
            </controls:FSEGroupBox>

            <controls:FSEGroupBox Header="COLOR" Margin="0 10 0 0" HeaderFontSize="{StaticResource FSE_SmallFontSize}">
                <Viewbox>
                    <colorPicker:ColorCanvas Background="Transparent" BorderThickness="0" FontSize="{StaticResource FSE_SmallerFontSize}"  SelectedColor="{Binding Settings.Color,Mode=TwoWay}" />
                </Viewbox>
            </controls:FSEGroupBox>

            <Button Style="{StaticResource FSE_RaisedButton_Dark_Hover}" Margin="0 20 0 0" Height="50" material:ButtonAssist.CornerRadius="25" Command="{Binding ClearCommand}">CLEAR</Button>
        </StackPanel>
    </Grid>
</UserControl>