diff --git a/EgtBEAMWALL.ViewerOptimizer/InstrumentPanel/InstrumentPanelV.xaml b/EgtBEAMWALL.ViewerOptimizer/InstrumentPanel/InstrumentPanelV.xaml index 168a3f29..3cd93da2 100644 --- a/EgtBEAMWALL.ViewerOptimizer/InstrumentPanel/InstrumentPanelV.xaml +++ b/EgtBEAMWALL.ViewerOptimizer/InstrumentPanel/InstrumentPanelV.xaml @@ -25,7 +25,8 @@ FontWeight="Light" ToolTip="{Binding ChangeParam_ToolTip}" Style="{StaticResource ToolBar_Button}" - Command="{Binding ChangeParameter_Command}"> + Command="{Binding ChangeParameter_Command}" + Visibility="{Binding ChangeParam_Visibility}"> diff --git a/EgtBEAMWALL.ViewerOptimizer/InstrumentPanel/MyInstrumentPanelVM.vb b/EgtBEAMWALL.ViewerOptimizer/InstrumentPanel/MyInstrumentPanelVM.vb index 64ccc3b1..abfc28e9 100644 --- a/EgtBEAMWALL.ViewerOptimizer/InstrumentPanel/MyInstrumentPanelVM.vb +++ b/EgtBEAMWALL.ViewerOptimizer/InstrumentPanel/MyInstrumentPanelVM.vb @@ -7,6 +7,11 @@ Imports EgtBEAMWALL.Core Public Class MyInstrumentPanelVM Inherits InstrumentPanelVM + Public ReadOnly Property ChangeParam_Visibility As Visibility + Get + Return If(Map.refMainMenuVM.SelPage = Pages.VIEW, Visibility.Visible, Visibility.Collapsed) + End Get + End Property ' Definizione comandi Private m_cmdData As ICommand Private m_cmdChangeParameter As ICommand diff --git a/EgtBEAMWALL.ViewerOptimizer/MainMenu/MainMenuVM.vb b/EgtBEAMWALL.ViewerOptimizer/MainMenu/MainMenuVM.vb index 25354989..7f38a2b5 100644 --- a/EgtBEAMWALL.ViewerOptimizer/MainMenu/MainMenuVM.vb +++ b/EgtBEAMWALL.ViewerOptimizer/MainMenu/MainMenuVM.vb @@ -154,6 +154,7 @@ Public Class MainMenuVM Map.refProjectVM.MachGroupPanelVM = Nothing End If Map.refMainWindowVM.NotifyPropertyChanged("nSelTabPage") + Map.refInstrumentPanelVM.NotifyPropertyChanged(NameOf(Map.refInstrumentPanelVM.ChangeParam_Visibility)) Return True End Function @@ -200,6 +201,7 @@ Public Class MainMenuVM Map.refProjectVM.MachGroupPanelVM = Nothing End If Map.refMainWindowVM.NotifyPropertyChanged(NameOf(Map.refMainWindowVM.nSelTabPage)) + Map.refInstrumentPanelVM.NotifyPropertyChanged(NameOf(Map.refInstrumentPanelVM.ChangeParam_Visibility)) Return True End Function