Files
EgtWPFLib5/StringParamWithButtonV.xaml
T
Demetrio Cassarino 95551c5049 -aggiunto lista note selezionabili
-pulito codice
2024-03-07 08:48:06 +01:00

249 lines
16 KiB
XML

<UserControl x:Class="StringParamWithButtonV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5"
xmlns:theme="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero">
<!--x:Name="Self">-->
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="EgtWPFLib5Resources.xaml"/>
</ResourceDictionary.MergedDictionaries>
<Style x:Key="ButtonFocusVisual">
<Setter Property="Control.Template">
<Setter.Value>
<ControlTemplate>
<Rectangle Margin="2" StrokeDashArray="1 2" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" SnapsToDevicePixels="true" StrokeThickness="1"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<LinearGradientBrush x:Key="ButtonNormalBackground" EndPoint="0,1" StartPoint="0,0">
<GradientStop Color="#F3F3F3" Offset="0"/>
<GradientStop Color="#EBEBEB" Offset="0.5"/>
<GradientStop Color="#DDDDDD" Offset="0.5"/>
<GradientStop Color="#CDCDCD" Offset="1"/>
</LinearGradientBrush>
<SolidColorBrush x:Key="ButtonNormalBorder" Color="#FF707070"/>
<Style x:Key="ToggleButtonStyleManage" TargetType="{x:Type ToggleButton}">
<Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/>
<Setter Property="Background" Value="{Binding BackgroundIsChecked,
RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:StringParamWithButtonV}},
Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
<Setter Property="BorderBrush" Value="{Binding BorderBrushIsChecked,
RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:StringParamWithButtonV}},
Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
<Setter Property="BorderThickness" Value="{Binding BorderThicknessIsChecked,
RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:StringParamWithButtonV}},
Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
<Setter Property="Foreground" Value="{Binding ForegroundIsChecked,
RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:StringParamWithButtonV}},
Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Padding" Value="1"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<Border x:Name="border" CornerRadius="0" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
<ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Opacity" Value="{Binding OpacityIsChecked,
RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:StringParamWithButtonV}},
Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
</UserControl.Resources>
<!--Visibility="{Binding ParamVisibility, ElementName=Self,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">-->
<Grid Style="{DynamicResource Param_GpBxHeaderAlignment}">
<Grid.Resources>
<EgtWPFLib5:MachiningParamVisibilityConverter x:Key="MachiningParamVisibilityConverter"/>
<EgtWPFLib5:DepthUnitConverter x:Key="DepthUnitConverter"/>
<EgtWPFLib5:ErrorVisibilityConverter x:Key="ErrorVisibilityConverter"/>
<sys:Int32 x:Key="Invert">0</sys:Int32>
<sys:Int32 x:Key="LeaveTab">1</sys:Int32>
<sys:Int32 x:Key="WorkSide">2</sys:Int32>
<sys:Int32 x:Key="HeadSide">3</sys:Int32>
<sys:Int32 x:Key="LeadInType">4</sys:Int32>
<sys:Int32 x:Key="ExtLinkType">5</sys:Int32>
<sys:Int32 x:Key="LeadOutType">6</sys:Int32>
<sys:Int32 x:Key="CurveUse">7</sys:Int32>
<sys:Int32 x:Key="StepType">8</sys:Int32>
<sys:Int32 x:Key="LeadLinkType">9</sys:Int32>
<sys:Int32 x:Key="Speed">10</sys:Int32>
<sys:Int32 x:Key="Feed">11</sys:Int32>
<sys:Int32 x:Key="StartFeed">12</sys:Int32>
<sys:Int32 x:Key="EndFeed">13</sys:Int32>
<sys:Int32 x:Key="TipFeed">14</sys:Int32>
<sys:Int32 x:Key="OffSr">15</sys:Int32>
<sys:Int32 x:Key="OffSl">16</sys:Int32>
<sys:Int32 x:Key="SideAngle">17</sys:Int32>
<sys:Int32 x:Key="Approx">18</sys:Int32>
<sys:Int32 x:Key="StartPos">19</sys:Int32>
<sys:Int32 x:Key="StartSlowLen">20</sys:Int32>
<sys:Int32 x:Key="EndSlowLen">21</sys:Int32>
<sys:Int32 x:Key="ThrouAddLen">22</sys:Int32>
<sys:Int32 x:Key="StepPar">23</sys:Int32>
<sys:Int32 x:Key="ReturnPos">24</sys:Int32>
<sys:Int32 x:Key="TabLen">25</sys:Int32>
<sys:Int32 x:Key="TabDist">26</sys:Int32>
<sys:Int32 x:Key="TabHeight">27</sys:Int32>
<sys:Int32 x:Key="TabAngle">28</sys:Int32>
<sys:Int32 x:Key="LiTang">29</sys:Int32>
<sys:Int32 x:Key="LiPerp">30</sys:Int32>
<sys:Int32 x:Key="LiElev">31</sys:Int32>
<sys:Int32 x:Key="LiCompLen">32</sys:Int32>
<sys:Int32 x:Key="LoTang">33</sys:Int32>
<sys:Int32 x:Key="LoPerp">34</sys:Int32>
<sys:Int32 x:Key="LoElev">35</sys:Int32>
<sys:Int32 x:Key="LoCompLen">36</sys:Int32>
<sys:Int32 x:Key="StartAddLen">37</sys:Int32>
<sys:Int32 x:Key="EndAddLen">38</sys:Int32>
<sys:Int32 x:Key="StepExtArc">39</sys:Int32>
<sys:Int32 x:Key="StepIntArc">40</sys:Int32>
<sys:Int32 x:Key="SideStep">41</sys:Int32>
<sys:Int32 x:Key="VertFeed">42</sys:Int32>
<sys:Int32 x:Key="NamePar">43</sys:Int32>
<sys:Int32 x:Key="Tool">44</sys:Int32>
<sys:Int32 x:Key="DepthStr">45</sys:Int32>
<sys:Int32 x:Key="UserNotes">46</sys:Int32>
<sys:Int32 x:Key="OverLap">47</sys:Int32>
<sys:Int32 x:Key="SubType">49</sys:Int32>
<sys:Int32 x:Key="SelectedSolChoiceType">50</sys:Int32>
<sys:Int32 x:Key="InitAngs">51</sys:Int32>
<sys:Int32 x:Key="BlockedAxis">52</sys:Int32>
<sys:Int32 x:Key="FaceUseType">53</sys:Int32>
<sys:Int32 x:Key="InvertToolDir">54</sys:Int32>
<sys:Int32 x:Key="StepBack">55</sys:Int32>
<sys:Int32 x:Key="StepSideAngBack">56</sys:Int32>
<sys:Int32 x:Key="BackFeed">57</sys:Int32>
<sys:Int32 x:Key="StepSideAng">58</sys:Int32>
<sys:Int32 x:Key="ForwardAngle">59</sys:Int32>
<sys:Int32 x:Key="Probing">60</sys:Int32>
<sys:Int32 x:Key="ProbingMinDist">61</sys:Int32>
<sys:Int32 x:Key="ProbingMaxDist">62</sys:Int32>
<sys:Int32 x:Key="ExtCornType">63</sys:Int32>
<sys:Int32 x:Key="IntCornType">64</sys:Int32>
<sys:Int32 x:Key="CornSlowLen">65</sys:Int32>
<sys:Int32 x:Key="CornSlowPerc">66</sys:Int32>
<sys:Int32 x:Key="LiHole">67</sys:Int32>
<sys:Int32 x:Key="LiHoleRad">68</sys:Int32>
<sys:Int32 x:Key="LpTurns">69</sys:Int32>
<sys:Int32 x:Key="HpTurns">70</sys:Int32>
<sys:Int32 x:Key="ThicknessFeed">71</sys:Int32>
</Grid.Resources>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<!--<ColumnDefinition Width="Auto"/>-->
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<TextBlock Text="{Binding ParamTxBl,
RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:StringParamWithButtonV}},
Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
Foreground="{Binding ForegroundParamBtnTxBl,
RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:StringParamWithButtonV}},
Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
Style="{DynamicResource MachiningsToolTextBlock}"/>
<Grid Grid.Column="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<EgtWPFLib5:EgtTextBox x:Name="TextValue" Grid.Column="0"
BorderBrushIsMouseOver="{Binding BorderBrushIsMouseOver,
RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:StringParamWithButtonV}},
Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
GeneralBorderBrush="{Binding GeneralBorderBrush,
RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:StringParamWithButtonV}},
Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
BorderBrushIsFocused="{Binding BorderBrushIsFocused,
RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:StringParamWithButtonV}},
Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
BackgroundBrdEnable="{Binding BackgroundBrdEnable,
RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:StringParamWithButtonV}},
Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
BackgroundBrdDisable="{Binding BackgroundBrdDisable,
RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:StringParamWithButtonV}},
Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
BackgroundTxBlDisable="{Binding BackgroundTxBlDisable,
RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:StringParamWithButtonV}},
Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
ForegroundTxBlEnable="{Binding ForegroundTxBlEnable,
RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:StringParamWithButtonV}},
Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
ForegroundTxBlDisable="{Binding ForegroundTxBlDisable,
RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:StringParamWithButtonV}},
Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
GeneralForeground="{Binding GeneralForeground,
RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:StringParamWithButtonV}},
Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
GeneralBackground="{Binding GeneralBackground,
RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:StringParamWithButtonV}},
Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
Text="{Binding ParamTxBx,
RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:StringParamWithButtonV}},
Mode=TwoWay,
UpdateSourceTrigger=PropertyChanged}"
Margin="0,3,3,3"/>
<ToggleButton Style="{DynamicResource ToggleButtonStyleManage}" Grid.Column="1" Margin="0,3,3,3" Content="A" Width="{Binding ActualHeight, RelativeSource={RelativeSource Self}}"
IsChecked="{Binding AutoToolParamChecked,
Mode=TwoWay,
RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type EgtWPFLib5:StringParamWithButtonV}}}"
IsEnabled="{Binding AutoToolParamEnabled,
Mode=TwoWay,
RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type EgtWPFLib5:StringParamWithButtonV}}}"/>
</Grid>
<TextBlock Grid.Row="1" Grid.ColumnSpan="2" Style="{DynamicResource ValidationErrorTextBlock}"
Text="{Binding ParamErrorMsg,
RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:StringParamWithButtonV}}}"
Visibility="{Binding ParamErrorMsg,
RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:StringParamWithButtonV}},
Converter={StaticResource ErrorVisibilityConverter}}"
Margin="0,0,0,3"/>
<!--Visibility="{Binding Path=SelectedItem.SpeedErrorMsg, ElementName=MachiningsTreeView,
Converter={StaticResource ErrorVisibilityConverter}}" Margin="0,0,5,0"/>-->
<!--Visibility="{Binding RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:StringParamV}},
Path=ParamErrorMsgVisibility,
Mode=TwoWay,
UpdateSourceTrigger=PropertyChanged,
Converter={StaticResource ErrorVisibilityConverter}}" Margin="0,0,5,0"/>-->
<!--<TextBlock x:Name="ParamMsg" Style="{DynamicResource MachiningsToolTextBlock}"/>
<EgtWPFLib5:EgtTextBox x:Name="ParamValue" Grid.Column="1" Style="{DynamicResource MachiningsToolTextBox}"
/>
<TextBlock Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource ValidationErrorTextBlock}"
x:Name="ErrorMsg"
Visibility="{Binding Path=SelectedItem.SpeedErrorMsg, ElementName=MachiningsTreeView,
Converter={StaticResource ErrorVisibilityConverter}}" Margin="0,0,5,0"/>-->
</Grid>
</UserControl>