aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/CalibrationDataView.xaml42
1 files changed, 39 insertions, 3 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/CalibrationDataView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/CalibrationDataView.xaml
index 824ed7495..f1995283c 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/CalibrationDataView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/CalibrationDataView.xaml
@@ -53,14 +53,50 @@
<Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}">
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="HorizontalContentAlignment" Value="Left"></Setter>
- <Setter Property="HorizontalAlignment" Value="Left"></Setter>
+ <Setter Property="HorizontalAlignment" Value="Stretch"></Setter>
<Setter Property="Foreground" Value="{StaticResource BlackForegroundBrush}"></Setter>
</Style>
</DataGrid.CellStyle>
+ <!--<DataGrid.RowStyle>
+ <Style BasedOn="{StaticResource {x:Type DataGridRow}}" TargetType="{x:Type DataGridRow}">
+ <Style.Triggers>
+ <Trigger Property="IsSelected" Value="True">
+ <Setter Property="Background" Value="Transparent" />
+ </Trigger>
+ </Style.Triggers>
+ </Style>
+ </DataGrid.RowStyle>-->
+ <DataGrid.Resources>
+ <Style x:Key="CellNumericUpDown" TargetType="{x:Type mahapps:NumericUpDown}" BasedOn="{StaticResource {x:Type mahapps:NumericUpDown}}">
+ <Setter Property="FrameworkElement.HorizontalAlignment" Value="Stretch"/>
+ <Setter Property="HorizontalContentAlignment" Value="Left"/>
+ <Setter Property="Background" Value="Transparent"/>
+ <Setter Property="BorderThickness" Value="0"/>
+ <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
+ <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/>
+ <Setter Property="Focusable" Value="false"/>
+ <Setter Property="IsHitTestVisible" Value="false"/>
+ <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/>
+ <Setter Property="FrameworkElement.VerticalAlignment" Value="Top"/>
+ <Setter Property="VerticalContentAlignment" Value="Center"/>
+ <Setter Property="FrameworkElement.MinHeight" Value="0"/>
+ <Setter Property="HideUpDownButtons" Value="true"/>
+ </Style>
+ <Style x:Key="EditableCellNumericUpDown" TargetType="{x:Type mahapps:NumericUpDown}" BasedOn="{StaticResource {x:Type mahapps:NumericUpDown}}">
+ <Setter Property="FrameworkElement.HorizontalAlignment" Value="Stretch"/>
+ <Setter Property="HorizontalContentAlignment" Value="Left"/>
+ <Setter Property="BorderThickness" Value="0"/>
+ <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
+ <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/>
+ <Setter Property="FrameworkElement.VerticalAlignment" Value="Top"/>
+ <Setter Property="VerticalContentAlignment" Value="Center"/>
+ <Setter Property="FrameworkElement.MinHeight" Value="0"/>
+ </Style>
+ </DataGrid.Resources>
<DataGrid.Columns>
<DataGridTextColumn Header="#" Binding="{Binding Index}" Width="Auto" IsReadOnly="True" Foreground="{StaticResource DimGrayBrush}" FontSize="11" />
- <mahapps:DataGridNumericUpDownColumn Header="X" Binding="{Binding X}" Minimum="0" Maximum="10000" HideUpDownButtons="True" Width="1*"/>
- <mahapps:DataGridNumericUpDownColumn Header="Y" Binding="{Binding Y}" Minimum="0" Maximum="10000" HideUpDownButtons="True" Width="1*" />
+ <mahapps:DataGridNumericUpDownColumn Header="X" Binding="{Binding X}" Minimum="0" Maximum="10000" HideUpDownButtons="True" Width="1*" ElementStyle="{StaticResource CellNumericUpDown}" EditingElementStyle="{StaticResource EditableCellNumericUpDown}"/>
+ <mahapps:DataGridNumericUpDownColumn Header="Y" Binding="{Binding Y}" Minimum="0" Maximum="10000" HideUpDownButtons="True" Width="1*" ElementStyle="{StaticResource CellNumericUpDown}" EditingElementStyle="{StaticResource EditableCellNumericUpDown}"/>
</DataGrid.Columns>
</DataGrid>
</Grid>