diff --git a/XplorePlane/ViewModels/Main/MainViewModel.cs b/XplorePlane/ViewModels/Main/MainViewModel.cs
index 1809723..fdd75c9 100644
--- a/XplorePlane/ViewModels/Main/MainViewModel.cs
+++ b/XplorePlane/ViewModels/Main/MainViewModel.cs
@@ -21,7 +21,7 @@ namespace XplorePlane.ViewModels
{
public class MainViewModel : BindableBase
{
- private const double CncEditorHostWidth = 710d;
+ private const double CncEditorHostWidth = 502d;
private readonly ILoggerService _logger;
private readonly IContainerProvider _containerProvider;
private readonly IEventAggregator _eventAggregator;
diff --git a/XplorePlane/Views/Cnc/CncPageView.xaml b/XplorePlane/Views/Cnc/CncPageView.xaml
index 147fbf9..b320d06 100644
--- a/XplorePlane/Views/Cnc/CncPageView.xaml
+++ b/XplorePlane/Views/Cnc/CncPageView.xaml
@@ -9,7 +9,7 @@
xmlns:views="clr-namespace:XplorePlane.Views"
xmlns:vm="clr-namespace:XplorePlane.ViewModels.Cnc"
d:DesignHeight="760"
- d:DesignWidth="702"
+ d:DesignWidth="502"
prism:ViewModelLocator.AutoWireViewModel="True"
mc:Ignorable="d">
@@ -23,9 +23,6 @@
-
-
-
Microsoft YaHei UI
@@ -101,8 +98,8 @@
-
-
-
+
@@ -248,18 +243,15 @@
Stretch="Uniform" />
-
-
-
+ FontFamily="{StaticResource UiFont}"
+ FontSize="11"
+ FontWeight="SemiBold"
+ Text="{Binding Name}"
+ TextTrimming="CharacterEllipsis" />
-
-
-
-
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
+
-
-
-
+ CornerRadius="6">
diff --git a/XplorePlane/Views/Cnc/CncPageView.xaml.cs b/XplorePlane/Views/Cnc/CncPageView.xaml.cs
index 530b86f..9c56a20 100644
--- a/XplorePlane/Views/Cnc/CncPageView.xaml.cs
+++ b/XplorePlane/Views/Cnc/CncPageView.xaml.cs
@@ -69,7 +69,6 @@ namespace XplorePlane.Views.Cnc
logger);
InspectionModulePipelineEditor.DataContext = _inspectionModulePipelineViewModel;
- InspectionModulePipelineEmptyState.DataContext = _inspectionModulePipelineViewModel;
}
catch (Exception)
{
@@ -216,6 +215,10 @@ namespace XplorePlane.Views.Cnc
}
bool isReadOnlyNode = viewModel.SelectedNode?.IsReadOnlyNodeProperties == true;
+ bool showNodeProperties = viewModel.SelectedNode != null && !viewModel.SelectedNode.IsInspectionModule;
+
+ NodePropertyEditor.Visibility = showNodeProperties ? Visibility.Visible : Visibility.Collapsed;
+ NodePropertyEmptyState.Visibility = viewModel.SelectedNode == null ? Visibility.Visible : Visibility.Collapsed;
foreach (var textBox in FindVisualDescendants(propertyEditorRoot))
{
@@ -322,15 +325,7 @@ namespace XplorePlane.Views.Cnc
private DependencyObject FindPropertyEditorRoot()
{
- foreach (var scrollViewer in FindVisualDescendants(this))
- {
- if (Grid.GetColumn(scrollViewer) == 2)
- {
- return scrollViewer;
- }
- }
-
- return null;
+ return NodePropertyEditor;
}
private static Border FindNodeCard(DependencyObject root)