Files
EgtCAM5/DrawPanel/DrawPanelV.xaml
T
Emmanuele Sassi a4b5cd4834 EgtCAM5 :
- Cambiati nomi classi e file.
2018-04-10 17:08:35 +00:00

216 lines
14 KiB
XML

<UserControl x:Class="DrawPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
xmlns:EgtCAM5="clr-namespace:EgtCAM5">
<StackPanel Background="Transparent" MaxHeight="{Binding MaxHeight,RelativeSource={RelativeSource AncestorType={x:Type EgtFloating:EgtFloatingPanel}}}">
<Expander Name="Draw2D" Style="{StaticResource ExpanderStyle}" Grid.Row="0"
IsExpanded="{Binding Draw2DIsExpanded}">
<Expander.Header>
<TextBlock Text="{Binding Draw2DMsg}"/>
</Expander.Header>
<UniformGrid Columns="2">
<Button ToolTip="{Binding PointToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding PointCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/Point.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding Line2PToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding Line2PCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/Line2P.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding LinePDLToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding LinePDLCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/LinePDL.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding CirclePDToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding CircleCPCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/CircleCP.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding CircleCDToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding CircleCDCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/CircleCD.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ArcCSEToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding ArcCSECommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/ArcCSE.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding Arc3PToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding Arc3PCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/Arc3P.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ArcPDPToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding ArcPDPCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/ArcPDP.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding FilletToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding FilletCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/Fillet.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ChamferToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding ChamferCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/Chamfer.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding Rectangle2PToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding Rectangle2PCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/Rectangle2P.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding PolygonToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding PolygonCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/Polygon.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding PolygonSideToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding PolygonSideCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/PolygonSide.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding TextToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding TextCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/Text.png" Stretch="Uniform"/>
</Button>
</UniformGrid>
</Expander>
<Expander Name="Draw3D" Style="{StaticResource ExpanderStyle}" Grid.Row="1" IsExpanded="{Binding Draw3DIsExpanded}">
<Expander.Header>
<TextBlock Text="{Binding Draw3DMsg}"/>
</Expander.Header>
<UniformGrid Columns="2">
<Button ToolTip="{Binding PlaneToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding PlaneCommand}" IsEnabled="{Binding bLayerOkAndSelOk}">
<Image Source="/Resources/DrawPanel/Plane.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ExtrudeToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding ExtrudeCommand}" IsEnabled="{Binding bLayerOkAndSelOk}">
<Image Source="/Resources/DrawPanel/Extrude.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding RevolveToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding RevolveCommand}" IsEnabled="{Binding bLayerOkAndSelOk}">
<Image Source="/Resources/DrawPanel/Revolve.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ScrewToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding ScrewCommand}" IsEnabled="{Binding bLayerOkAndSelOk}">
<Image Source="/Resources/DrawPanel/Screw.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding RuledToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding RuledCommand}" IsEnabled="{Binding bLayerOkAndSelOk}">
<Image Source="/Resources/DrawPanel/Ruled.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding MergeSurfToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding MergeSurfCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/MergeSurf.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ExplodeSurfToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding ExplodeSurfCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ExplodeSurf.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding InvertSurfToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding InvertSurfCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/InvertSurf.png" Stretch="Uniform"/>
</Button>
</UniformGrid>
</Expander>
<Expander Name="Modify" Style="{StaticResource ExpanderStyle}" Grid.Row="2" IsExpanded="{Binding ModifyIsExpanded}">
<Expander.Header>
<TextBlock Text="{Binding ModifyMsg}"/>
</Expander.Header>
<UniformGrid Columns="2">
<Button ToolTip="{Binding DeleteToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding DeleteCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/Delete.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ChangeLayerToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding ChangeLayerCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ChangeLayer.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ChangeColorToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding ChangeColorCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ChangeColor.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ChangeAlphaToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding ChangeAlphaCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ChangeColorAlpha.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ResetColorToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding ResetColorCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/RemoveColor.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding InvertCurveToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding InvertCurveCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/InvertCurve.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ChangeStartToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding ChangeStartCurveCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ChangeStart.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ExtendCurveToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding ExtendCurveCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ExtendCurve.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding BreakCurveToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding BreakCurveCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/BreakCurve.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding SplitCurveToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding SplitCurveCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/SplitCurve.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding JoinCurveToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding JoinCurveCommand}" IsEnabled="{Binding bLayerOkAndSelOk}">
<Image Source="/Resources/DrawPanel/JoinCurve.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ExplodeCurveToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding ExplodeCurveCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ExplodeCurve.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ThickCurveToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding SetCurveThCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ThickCurve.png" Stretch="Uniform"/>
</Button>
</UniformGrid>
</Expander>
<Expander Name="Transform" Style="{StaticResource ExpanderStyle}" Grid.Row="3" IsExpanded="{Binding TransformIsExpanded}">
<Expander.Header>
<TextBlock Text="{Binding TransformMsg}"/>
</Expander.Header>
<UniformGrid Columns="2">
<Button ToolTip="{Binding MoveToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding MoveCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/Move.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding RotateToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding RotateCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/Rotate.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding Rotate3DToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding Rotate3DCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/Rotate3D.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding MirrorToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding MirrorCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/Mirror.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding Mirror3DToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding Mirror3DCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/Mirror3D.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ScaleToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding ScaleCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/Scale.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding Scale3DToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding Scale3DCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/Scale3D.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding OffsetToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding OffsetCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/Offset.png" Stretch="Uniform"/>
</Button>
</UniformGrid>
</Expander>
<Interactivity:Interaction.Behaviors>
<EgtCAM5:AutomaticCloseExpander/>
</Interactivity:Interaction.Behaviors>
</StackPanel>
</UserControl>