diff --git a/AttachedBehaviours/AutomaticCloseExpander.vb b/AttachedBehaviours/AutomaticCloseExpander.vb
index fc44883..d383aa5 100644
--- a/AttachedBehaviours/AutomaticCloseExpander.vb
+++ b/AttachedBehaviours/AutomaticCloseExpander.vb
@@ -61,47 +61,76 @@ Public Class AutomaticCloseExpander
End Sub
Private Sub VerticalVerifyDimension(SelectedExpander As Expander)
- Dim TotalDimension As Double = 0
- 'Aggiungo la dimensione di tutti gli Header
- For Each Expander In ExpanderList
- If Expander IsNot SelectedExpander Then
- If Not Expander.IsExpanded Then
- TotalDimension += Expander.ActualHeight
- Else
- Dim ExpanderContent As FrameworkElement = DirectCast(Expander.Content, FrameworkElement)
- ExpanderContent.Measure(New Size(Double.PositiveInfinity, Double.PositiveInfinity))
- TotalDimension += (Expander.ActualHeight - ExpanderContent.DesiredSize.Height)
- End If
- Else
- TotalDimension += Expander.ActualHeight
- End If
- Next
- ' Aggiungo la dimensione dei controlli fissi (non Expander)
- For Each OtherControl In OtherControlList
- TotalDimension += OtherControl.ActualHeight
- Next
+ Dim AssociatedObjectElement As FrameworkElement = DirectCast(AssociatedObject, FrameworkElement)
+ AssociatedObjectElement.Measure(New Size(Double.PositiveInfinity, Double.PositiveInfinity))
+ Dim TotalCurrentHeight = AssociatedObjectElement.DesiredSize.Height
' Aggiungo la dimensione del contenuto dell'expander selezionato
Dim SelectedContent As FrameworkElement = DirectCast(SelectedExpander.Content, FrameworkElement)
SelectedContent.Measure(New Size(Double.PositiveInfinity, Double.PositiveInfinity))
- TotalDimension += SelectedContent.DesiredSize.Height
- ' Verifico per tutti gli expander (tranne quello selezionato) a partire dal primo se sono espansi e nel caso se la loro dimensione totale li fa stare nello spazio disponibile
- Dim Index As Integer = 0
- For Index = 0 To ExpanderList.Count - 1
- If ExpanderList(Index) IsNot SelectedExpander Then
- If ExpanderList(Index).IsExpanded Then
- Dim ExpanderContent As FrameworkElement = DirectCast(ExpanderList(Index).Content, FrameworkElement)
- TotalDimension += ExpanderContent.ActualHeight
- If TotalDimension > Me.AssociatedObject.MaxHeight Then
- Exit For
- End If
+ TotalCurrentHeight += SelectedContent.DesiredSize.Height
+ ' Aggiungo il padding del contenuto
+ TotalCurrentHeight += (SelectedExpander.Padding.Top + SelectedExpander.Padding.Bottom)
+ If TotalCurrentHeight < Me.AssociatedObject.MaxHeight Then
+ Return
+ End If
+ For Index = ExpanderList.Count - 1 To 0 Step -1
+ If TotalCurrentHeight > Me.AssociatedObject.MaxHeight Then
+ If ExpanderList(Index) IsNot SelectedExpander AndAlso ExpanderList(Index).IsExpanded = True Then
+ 'TotalCurrentHeight -= ExpanderList(Index).ActualHeight
+ ExpanderList(Index).IsExpanded = False
+ Dim CurrExpanderContent As FrameworkElement = DirectCast(ExpanderList(Index).Content, FrameworkElement)
+ CurrExpanderContent.Measure(New Size(Double.PositiveInfinity, Double.PositiveInfinity))
+ TotalCurrentHeight -= CurrExpanderContent.DesiredSize.Height
+ ' Sottraggo anche i padding
+ TotalCurrentHeight -= (ExpanderList(Index).Padding.Top + ExpanderList(Index).Padding.Bottom)
End If
+ Else
+ Exit For
End If
Next
- For CancelIndex = Index To ExpanderList.Count - 1
- If ExpanderList(CancelIndex) IsNot SelectedExpander Then
- ExpanderList(CancelIndex).IsExpanded = False
- End If
- Next
+
+
+ 'Dim TotalDimension As Double = 0
+ ''Aggiungo la dimensione di tutti gli Header
+ 'For Each Expander In ExpanderList
+ ' If Expander IsNot SelectedExpander Then
+ ' If Not Expander.IsExpanded Then
+ ' TotalDimension += Expander.ActualHeight
+ ' Else
+ ' Dim ExpanderContent As FrameworkElement = DirectCast(Expander.Content, FrameworkElement)
+ ' ExpanderContent.Measure(New Size(Double.PositiveInfinity, Double.PositiveInfinity))
+ ' TotalDimension += (Expander.ActualHeight - ExpanderContent.DesiredSize.Height)
+ ' End If
+ ' Else
+ ' TotalDimension += Expander.ActualHeight
+ ' End If
+ 'Next
+ '' Aggiungo la dimensione dei controlli fissi (non Expander)
+ 'For Each OtherControl In OtherControlList
+ ' TotalDimension += OtherControl.ActualHeight
+ 'Next
+ '' Aggiungo la dimensione del contenuto dell'expander selezionato
+ 'Dim SelectedContent As FrameworkElement = DirectCast(SelectedExpander.Content, FrameworkElement)
+ 'SelectedContent.Measure(New Size(Double.PositiveInfinity, Double.PositiveInfinity))
+ 'TotalDimension += SelectedContent.DesiredSize.Height
+ '' Verifico per tutti gli expander (tranne quello selezionato) a partire dal primo se sono espansi e nel caso se la loro dimensione totale li fa stare nello spazio disponibile
+ 'Dim Index As Integer = 0
+ 'For Index = 0 To ExpanderList.Count - 1
+ ' If ExpanderList(Index) IsNot SelectedExpander Then
+ ' If ExpanderList(Index).IsExpanded Then
+ ' Dim ExpanderContent As FrameworkElement = DirectCast(ExpanderList(Index).Content, FrameworkElement)
+ ' TotalDimension += ExpanderContent.ActualHeight
+ ' If TotalDimension > Me.AssociatedObject.MaxHeight Then
+ ' Exit For
+ ' End If
+ ' End If
+ ' End If
+ 'Next
+ 'For CancelIndex = Index To ExpanderList.Count - 1
+ ' If ExpanderList(CancelIndex) IsNot SelectedExpander Then
+ ' ExpanderList(CancelIndex).IsExpanded = False
+ ' End If
+ 'Next
End Sub
Private Sub HorizontalVerifyDimension(SelectedExpander As Expander)
diff --git a/IniFile.vb b/IniFile.vb
index bd667fe..39a9fd5 100644
--- a/IniFile.vb
+++ b/IniFile.vb
@@ -4,6 +4,8 @@ Imports EgtUILib
Module IniFile
Friend EgaltechBlue1 As New SolidColorBrush(Color.FromArgb(255, 77, 132, 196))
+ Friend ReferenceContactColRed As New Color3d(255, 0, 0)
+ Friend ReferenceContactColGreen As New Color3d(0, 255, 0)
Friend Enum ProjectModeOpt As Integer
DRAW = 1
diff --git a/ProjectPage/OptionPanel/MachiningOptionPanel/OperationExpander/DispositionParameterExpander/DispositionParameterExpanderViewModel.vb b/ProjectPage/OptionPanel/MachiningOptionPanel/OperationExpander/DispositionParameterExpander/DispositionParameterExpanderViewModel.vb
index a5acefe..be5da45 100644
--- a/ProjectPage/OptionPanel/MachiningOptionPanel/OperationExpander/DispositionParameterExpander/DispositionParameterExpanderViewModel.vb
+++ b/ProjectPage/OptionPanel/MachiningOptionPanel/OperationExpander/DispositionParameterExpander/DispositionParameterExpanderViewModel.vb
@@ -319,6 +319,7 @@ Namespace EgtCAM5
Public Sub Done(ByVal param As Object)
' Verifico la validità del punto in Input
If Not String.IsNullOrEmpty(m_InputValue) Then
+ ' se movimento di traslazione
If m_MoveIsChecked Then
Dim InputPoint As New Point3d(0, 0, 0)
Dim Values() As String = m_InputValue.Split(","c)
@@ -334,42 +335,19 @@ Namespace EgtCAM5
Dim vtMove As Vector3d
' lo imposto a seconda del tipo del primo elemento selezionato
Dim nFirstSelectedId As Integer = EgtGetFirstSelectedObj()
+ ' se è un grezzo
If EgtVerifyRawPartCurrPhase(nFirstSelectedId) Then
- Dim bboxRawPart As New BBox3d
- ' recupero il solido del grezzo dal primo elemento selezionato
- Dim nRawSolidId As Integer = EgtGetFirstNameInGroup(nFirstSelectedId, RAWSOLID)
- ' ne calcolo il BBox
- EgtGetBBoxGlob(nRawSolidId, GDB_BB.STANDARD, bboxRawPart)
' imposto il riferimento della tavola
Dim ptTableRef As Point3d
EgtGetTableRef(1, ptTableRef)
- ' calcolo i punti min e max del bbox riferiti alla tavola
- Dim ptBBoxRawPartMin As New Point3d(bboxRawPart.Min)
- Dim ptBBoxRawPartMax As New Point3d(bboxRawPart.Max)
- ptBBoxRawPartMin.ToLoc(New Frame3d(ptTableRef))
- ptBBoxRawPartMax.ToLoc(New Frame3d(ptTableRef))
- ' dal box e dal tipo di punto di riferimento selezionato ricavo le coordinate del punto di riferimento
- Dim ptRawRefPoint As Point3d
- Select Case m_RawRefPosition
- Case MCH_CR.TL
- ptRawRefPoint.x = ptBBoxRawPartMin.x
- ptRawRefPoint.y = ptBBoxRawPartMax.y
- Case MCH_CR.TR
- ptRawRefPoint.x = ptBBoxRawPartMax.x
- ptRawRefPoint.y = ptBBoxRawPartMax.y
- Case MCH_CR.BL
- ptRawRefPoint.x = ptBBoxRawPartMin.x
- ptRawRefPoint.y = ptBBoxRawPartMin.y
- Case MCH_CR.BR
- ptRawRefPoint.x = ptBBoxRawPartMax.x
- ptRawRefPoint.y = ptBBoxRawPartMin.y
- End Select
- ptRawRefPoint.z = ptBBoxRawPartMin.z
+ ' calcolo il punto del grezzo da posizionar nelle coordinate di input
+ Dim ptRawRefPoint As Point3d = GetRawPartRefPoint(nFirstSelectedId, m_RawRefPosition)
' creo un punto con le coordinate di input espresse rispetto alla tavola
Dim TableRefInputPoint As New Point3d(InputPoint)
TableRefInputPoint.LocToLoc(EgtGetGridFrame(), New Frame3d(ptTableRef))
' calcolo il vettore di spostamento del grezzo
vtMove = TableRefInputPoint - ptRawRefPoint
+ ' se è una ventosa
ElseIf EgtVerifyFixture(nFirstSelectedId) Then
Dim SelObjFrame3d As New Frame3d(Frame3d.GLOB)
EgtGetGroupGlobFrame(nFirstSelectedId, SelObjFrame3d)
@@ -381,11 +359,19 @@ Namespace EgtCAM5
End If
' Muovo tutti gli oggetti selezionati
MoveRawPartPartAndFixture(GDB_ID.SEL, vtMove)
-
-
-
-
-
+ ' se è un grezzo
+ If EgtVerifyRawPartCurrPhase(nFirstSelectedId) Then
+ Dim ptRawRefPoint As Point3d = GetRawPartRefPoint(nFirstSelectedId, m_RawRefPosition)
+ ' verifico se lo spostamento effettuato differisce da quello richiesto
+ Dim vtRemainingMove As Vector3d = InputPoint - ptRawRefPoint
+ ' se differisce
+ If Not vtRemainingMove.IsSmall() Then
+ ' eseguo lo spostamento rimanente sull'asse x
+ MoveRawPartPartAndFixture(GDB_ID.SEL, New Vector3d(vtRemainingMove.x, 0, 0))
+ ' eseguo lo spostamento rimanente sull'asse y
+ MoveRawPartPartAndFixture(GDB_ID.SEL, New Vector3d(0, vtRemainingMove.y, 0))
+ End If
+ End If
@@ -494,6 +480,8 @@ Namespace EgtCAM5
' End Select
'nSelId = EgtGetNextSelectedObj()
'End While
+
+ ' se rotazione
Else
Dim InputAngle As Double = 0
If Not StringToDouble(m_InputValue, InputAngle) Then
@@ -524,6 +512,40 @@ Namespace EgtCAM5
End If
End Sub
+ Private Shared Function GetRawPartRefPoint(nRawPartId As Integer, RawRefPosition As MCH_CR) As Point3d
+ Dim bboxRawPart As New BBox3d
+ ' recupero il solido del grezzo dal primo elemento selezionato
+ Dim nRawSolidId As Integer = EgtGetFirstNameInGroup(nRawPartId, RAWSOLID)
+ ' ne calcolo il BBox
+ EgtGetBBoxGlob(nRawSolidId, GDB_BB.STANDARD, bboxRawPart)
+ ' imposto il riferimento della tavola
+ Dim ptTableRef As Point3d
+ EgtGetTableRef(1, ptTableRef)
+ ' calcolo i punti min e max del bbox riferiti alla tavola
+ Dim ptBBoxRawPartMin As New Point3d(bboxRawPart.Min)
+ Dim ptBBoxRawPartMax As New Point3d(bboxRawPart.Max)
+ ptBBoxRawPartMin.ToLoc(New Frame3d(ptTableRef))
+ ptBBoxRawPartMax.ToLoc(New Frame3d(ptTableRef))
+ ' dal box e dal tipo di punto di riferimento selezionato ricavo le coordinate del punto di riferimento
+ Dim ptRawRefPoint As Point3d
+ Select Case RawRefPosition
+ Case MCH_CR.TL
+ ptRawRefPoint.x = ptBBoxRawPartMin.x
+ ptRawRefPoint.y = ptBBoxRawPartMax.y
+ Case MCH_CR.TR
+ ptRawRefPoint.x = ptBBoxRawPartMax.x
+ ptRawRefPoint.y = ptBBoxRawPartMax.y
+ Case MCH_CR.BL
+ ptRawRefPoint.x = ptBBoxRawPartMin.x
+ ptRawRefPoint.y = ptBBoxRawPartMin.y
+ Case MCH_CR.BR
+ ptRawRefPoint.x = ptBBoxRawPartMax.x
+ ptRawRefPoint.y = ptBBoxRawPartMin.y
+ End Select
+ ptRawRefPoint.z = ptBBoxRawPartMin.z
+ Return ptRawRefPoint
+ End Function
+
Public Shared Function MoveRawPartPartAndFixture(nMoveId As Integer, vtMove As Vector3d, Optional nCount As Integer = 1) As Boolean
Dim bErrorMoving As Boolean = False
' Muovo gli oggetti selezionati se consentito
@@ -772,11 +794,19 @@ Namespace EgtCAM5
' calcolo il vettore di spostamento necessario ad allinearli
Dim vtDelta As Vector3d = ptArcCenter - ptMin
vtDelta.z = 0
- ' se i punti non coincidono, esco
- If Not vtDelta.IsSmall() Then
+ ' se i punti coincidono, esco
+ If vtDelta.IsSmall() Then
+ ' il grezzo è in battuta sul riferimento
+ Dim nContactColDisk As Integer = EgtGetFirstNameInGroup(EgtGetFirstNameInGroup(nFixtureId, SOLID), REF_CONTACTCOLDISK)
+ EgtSetColor(nContactColDisk, ReferenceContactColGreen)
+ Else
' altrimenti riporto il vettore di correzione
vtRefMove = -vtDelta.Glob(ccompoRawPartOutlineId)
End If
+ Else
+ ' il grezzo non è in battuta sul riferimento
+ Dim nContactColDisk As Integer = EgtGetFirstNameInGroup(EgtGetFirstNameInGroup(nFixtureId, SOLID), REF_CONTACTCOLDISK)
+ EgtSetColor(nContactColDisk, ReferenceContactColRed)
End If
End Select
End If
@@ -881,7 +911,11 @@ Namespace EgtCAM5
Dim vtDelta As Vector3d = -(ptDist - ptArcCenter)
vtDelta.z = 0
' se il vettore non è nullo
- If Not vtDelta.IsSmall() Then
+ If vtDelta.IsSmall() Then
+ ' il grezzo è in battuta sul riferimento
+ Dim nContactColDisk As Integer = EgtGetFirstNameInGroup(EgtGetFirstNameInGroup(nFixtureId, SOLID), REF_CONTACTCOLDISK)
+ EgtSetColor(nContactColDisk, ReferenceContactColGreen)
+ Else
vtDelta = vtDelta.Glob(ccompoRawPartOutlineId)
' il vettore da restituire è nullo, quindi lo inizializzo
If vtRefMove.IsSmall() Then
@@ -902,6 +936,11 @@ Namespace EgtCAM5
EgtErase(nDistLine)
EgtErase(ccompoRawPartOutlineOffsetId)
End Select
+ ' se non c'è sovrapposizione
+ ElseIf FixtureType(nFixtureId) = FIX_TYPE.REFERENCE Then
+ ' il grezzo non è in battuta sul riferimento
+ Dim nContactColDisk As Integer = EgtGetFirstNameInGroup(EgtGetFirstNameInGroup(nFixtureId, SOLID), REF_CONTACTCOLDISK)
+ EgtSetColor(nContactColDisk, ReferenceContactColRed)
End If
nFixtureId = EgtGetNextFixture(nFixtureId)
End While
diff --git a/ProjectPage/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/MachiningParameterExpanderView.xaml b/ProjectPage/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/MachiningParameterExpanderView.xaml
index b56cb2b..331f124 100644
--- a/ProjectPage/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/MachiningParameterExpanderView.xaml
+++ b/ProjectPage/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/MachiningParameterExpanderView.xaml
@@ -61,52 +61,54 @@
49
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ ConverterParameter={StaticResource HeadSide}}">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ProjectPage/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/MachiningParameterExpanderView.xaml.vb b/ProjectPage/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/MachiningParameterExpanderView.xaml.vb
index d1edbb9..dfd7f2d 100644
--- a/ProjectPage/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/MachiningParameterExpanderView.xaml.vb
+++ b/ProjectPage/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/MachiningParameterExpanderView.xaml.vb
@@ -1,3 +1,83 @@
-Public Class MachiningParameterExpanderView
+Imports EgtWPFLib5
+Imports EgtWPFLib5.EgtFloating
+
+Public Class MachiningParameterExpanderView
+
+ Private EgtFloatingTray As EgtFloatingTray
+ Private EgtFloatingPanel As EgtFloatingPanel
+
+ Private m_bFirst As Boolean = True
+
+ Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
+ If m_bFirst Then
+ EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me)
+ EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
+ AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged
+ PanelHeight = EgtFloatingPanel.ActualHeight
+ Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
+ m_bFirst = False
+ End If
+ CalculateOperationParametersStackPanelMaxHeight()
+ End Sub
+
+ Dim m_bSizeChanging As Boolean = False
+
+ Private Sub EgtFloatingTray_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
+ If m_bSizeChanging Then Return
+ m_bSizeChanging = True
+ CalculateOperationParametersStackPanelMaxHeight()
+ m_bSizeChanging = False
+ End Sub
+
+ Dim PanelHeight As Double = 0
+ Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
+
+ Private Sub CalculateOperationParametersStackPanelMaxHeight()
+ Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
+ Dim OpenedExpanderList As New List(Of Boolean)
+ For Index = 0 To AutomaticCloseExpanderStackPanel.Children.Count - 1
+ If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
+ Dim IndexedExpander As Expander = DirectCast(AutomaticCloseExpanderStackPanel.Children(Index), Expander)
+ If IndexedExpander.IsExpanded Then
+ OpenedExpanderList.Add(True)
+ IndexedExpander.IsExpanded = False
+ Dim CurrExpanderContent As FrameworkElement = DirectCast(IndexedExpander.Content, FrameworkElement)
+ CurrExpanderContent.Measure(New Size(Double.PositiveInfinity, Double.PositiveInfinity))
+ AutomaticCloseExpanderStackPanelHeight -= CurrExpanderContent.DesiredSize.Height
+ ' Sottraggo anche i padding
+ AutomaticCloseExpanderStackPanelHeight -= (IndexedExpander.Padding.Top + IndexedExpander.Padding.Bottom)
+ Else
+ OpenedExpanderList.Add(False)
+ End If
+ Else
+ OpenedExpanderList.Add(False)
+ End If
+ Next
+ Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight
+ AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight
+ For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1
+ If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
+ Dim IndexedExpander As Expander = DirectCast(AutomaticCloseExpanderStackPanel.Children(Index), Expander)
+ If OpenedExpanderList(Index) Then
+ IndexedExpander.IsExpanded = True
+ End If
+ End If
+ Next
+ End Sub
+
+ ' Funzione che permette di trovare il primo contenitore di tipo T di un elemento grafico dependencyObject
+ Public Function FindAncestor(Of T As Class)(dependencyObject As DependencyObject) As T
+ Dim target As DependencyObject = dependencyObject
+ Do
+ target = LogicalTreeHelper.GetParent(target)
+ Loop While target IsNot Nothing AndAlso Not (TypeOf target Is T)
+ If IsNothing(target) Then
+ target = dependencyObject
+ Do
+ target = VisualTreeHelper.GetParent(target)
+ Loop While target IsNot Nothing AndAlso Not (TypeOf target Is T)
+ End If
+ Return TryCast(target, T)
+ End Function
End Class
diff --git a/ProjectPage/OptionPanel/MachiningOptionPanel/OperationExpander/OperationExpanderView.xaml b/ProjectPage/OptionPanel/MachiningOptionPanel/OperationExpander/OperationExpanderView.xaml
index b352ffb..bec40af 100644
--- a/ProjectPage/OptionPanel/MachiningOptionPanel/OperationExpander/OperationExpanderView.xaml
+++ b/ProjectPage/OptionPanel/MachiningOptionPanel/OperationExpander/OperationExpanderView.xaml
@@ -81,7 +81,7 @@
-
+
diff --git a/ProjectPage/OptionPanel/MachiningOptionPanel/OperationExpander/OperationExpanderView.xaml.vb b/ProjectPage/OptionPanel/MachiningOptionPanel/OperationExpander/OperationExpanderView.xaml.vb
index ba6137d..3c143a3 100644
--- a/ProjectPage/OptionPanel/MachiningOptionPanel/OperationExpander/OperationExpanderView.xaml.vb
+++ b/ProjectPage/OptionPanel/MachiningOptionPanel/OperationExpander/OperationExpanderView.xaml.vb
@@ -6,6 +6,7 @@ Public Class OperationExpanderView
Private EgtFloatingTray As EgtFloatingTray
Private OptionPanelView As UserControl
Private OptionPanelViewStackPanel As StackPanel
+ 'Private OperationParameters As ContentPresenter
Private MachiningTreeContentPresenter As ContentPresenter
Private MachiningTreeUserControl As UserControl
Private MachiningTreeExpander As Expander
@@ -72,13 +73,13 @@ Public Class OperationExpanderView
OperationsListExpanderContent.Measure(New Size(Double.PositiveInfinity, Double.PositiveInfinity))
OccupiedHeight += (OperationsListExpander.ActualHeight - OperationsListExpanderContent.DesiredSize.Height)
End If
- 'If Not OperationParametersExpander.IsExpanded Then
- ' OccupiedHeight += OperationParametersExpander.ActualHeight
- 'Else
- ' Dim OperationParametersExpanderContent As FrameworkElement = DirectCast(OperationParametersExpander.Content, FrameworkElement)
- ' OperationParametersExpanderContent.Measure(New Size(Double.PositiveInfinity, Double.PositiveInfinity))
- ' OccupiedHeight += (OperationParametersExpander.ActualHeight - OperationParametersExpanderContent.DesiredSize.Height)
- 'End If
+ If Not OperationParametersExpander.IsExpanded Then
+ OccupiedHeight += OperationParametersExpander.ActualHeight
+ Else
+ Dim OperationParametersExpanderContent As FrameworkElement = DirectCast(OperationParametersExpander.Content, FrameworkElement)
+ OperationParametersExpanderContent.Measure(New Size(Double.PositiveInfinity, Double.PositiveInfinity))
+ OccupiedHeight += (OperationParametersExpander.ActualHeight - OperationParametersExpanderContent.DesiredSize.Height)
+ End If
'' Aggiungo altezza contenuto OperationParameters che però è fuori dallo Stackpanel
'OperationFirstParametersStackPanel.Measure(New Size(Double.PositiveInfinity, Double.PositiveInfinity))
'If OperationFirstParametersStackPanel.DesiredSize.Height <> 0 Then