清理引用,将NavigatorServices更改为使用Message来实现导航的切换
This commit is contained in:
@@ -3,10 +3,9 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:PMSWPF.Views"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="300" d:DesignWidth="300">
|
||||
<Grid>
|
||||
<TextBlock Text="DataTransformView" FontSize="40" HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock>
|
||||
<TextBlock Text="DataTransformView" FontSize="40" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||
</Grid>
|
||||
</UserControl>
|
||||
</UserControl>
|
||||
@@ -5,70 +5,70 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
|
||||
xmlns:ikw="http://schemas.inkore.net/lib/ui/wpf"
|
||||
xmlns:local="clr-namespace:PMSWPF.Views"
|
||||
xmlns:dl="clr-namespace:PMSWPF.Views.Dialogs"
|
||||
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
||||
xmlns:vm="clr-namespace:PMSWPF.ViewModels"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
d:DataContext="{d:DesignInstance vm:DevicesViewModel}"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="300" d:DesignWidth="300">
|
||||
<UserControl.Resources>
|
||||
<DataTemplate x:Key="DeviceItemTemplate">
|
||||
<Border Background="#eee" CornerRadius="10" Margin="3" Padding="10" >
|
||||
<ikw:SimpleStackPanel Spacing="10" Width="300" Height="200">
|
||||
<DockPanel >
|
||||
<ui:ToggleSwitch
|
||||
DockPanel.Dock="Right"
|
||||
Margin="20 0 0 0 "
|
||||
IsOn="{Binding IsActive}"
|
||||
OffContent="停止" OnContent="启动"/>
|
||||
<Border Background="#eee" CornerRadius="10" Margin="3" Padding="10">
|
||||
<ikw:SimpleStackPanel Spacing="10" Width="300" Height="200">
|
||||
<DockPanel>
|
||||
<ui:ToggleSwitch
|
||||
DockPanel.Dock="Right"
|
||||
Margin="20 0 0 0 "
|
||||
IsOn="{Binding IsActive}"
|
||||
OffContent="停止" OnContent="启动" />
|
||||
<TextBlock FontSize="24" FontWeight="Bold" Text="{Binding Name }" />
|
||||
</DockPanel>
|
||||
|
||||
|
||||
<TextBlock Text="{Binding Description }" />
|
||||
<TextBlock Text="{Binding Ip }" />
|
||||
<ListBox ItemsSource="{Binding }">
|
||||
|
||||
<ListBox ItemsSource="{Binding VariableTables }">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Button Content="{Binding Name}" />
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</ikw:SimpleStackPanel>
|
||||
</Border>
|
||||
|
||||
|
||||
</DataTemplate>
|
||||
</UserControl.Resources>
|
||||
|
||||
<StackPanel >
|
||||
|
||||
<StackPanel>
|
||||
|
||||
<ui:CommandBar x:Name="PrimaryCommandBar"
|
||||
DefaultLabelPosition="Right" IsOpen="False">
|
||||
<ui:AppBarButton x:Name="AddButton"
|
||||
Command="{Binding AddDeviceCommand}"
|
||||
Label="Add">
|
||||
Label="Add">
|
||||
<ui:AppBarButton.Icon>
|
||||
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Add}"/>
|
||||
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Add}" />
|
||||
</ui:AppBarButton.Icon>
|
||||
</ui:AppBarButton>
|
||||
<ui:AppBarButton x:Name="EditButton"
|
||||
Label="Edit">
|
||||
Label="Edit">
|
||||
<ui:AppBarButton.Icon>
|
||||
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Edit}"/>
|
||||
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Edit}" />
|
||||
</ui:AppBarButton.Icon>
|
||||
|
||||
</ui:AppBarButton>
|
||||
<ui:AppBarButton x:Name="ShareButton"
|
||||
Label="Share">
|
||||
Label="Share">
|
||||
<ui:AppBarButton.Icon>
|
||||
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Share}"/>
|
||||
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Share}" />
|
||||
</ui:AppBarButton.Icon>
|
||||
</ui:AppBarButton>
|
||||
<ui:CommandBar.SecondaryCommands>
|
||||
<ui:AppBarButton x:Name="SettingsButton"
|
||||
Icon="Setting" Label="Settings"
|
||||
/>
|
||||
|
||||
Icon="Setting" Label="Settings" />
|
||||
</ui:CommandBar.SecondaryCommands>
|
||||
</ui:CommandBar>
|
||||
|
||||
|
||||
|
||||
|
||||
<ui:GridView x:Name="BasicGridView"
|
||||
Margin="20"
|
||||
IsItemClickEnabled="True"
|
||||
@@ -76,7 +76,7 @@
|
||||
ItemsSource="{Binding Devices}"
|
||||
ItemTemplate="{StaticResource DeviceItemTemplate}"
|
||||
SelectionMode="Single" />
|
||||
|
||||
|
||||
</StackPanel>
|
||||
|
||||
</UserControl>
|
||||
|
||||
</UserControl>
|
||||
@@ -1,7 +1,6 @@
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using iNKORE.UI.WPF.Modern.Controls;
|
||||
using PMSWPF.ViewModels;
|
||||
|
||||
namespace PMSWPF.Views;
|
||||
|
||||
@@ -10,17 +9,15 @@ public partial class DevicesView : UserControl
|
||||
public DevicesView()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
}
|
||||
|
||||
private void BasicGridView_ItemClick(object sender, ItemClickEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private async void DevicesView_OnLoaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
// var devicesViewModel = (DevicesViewModel)this.DataContext;
|
||||
// await devicesViewModel.OnLoadedAsync();
|
||||
// var devicesViewModel = (DevicesViewModel)this.DataContext;
|
||||
// await devicesViewModel.OnLoadedAsync();
|
||||
}
|
||||
}
|
||||
@@ -19,41 +19,43 @@
|
||||
d:DataContext="{d:DesignInstance vmd:DeviceDialogViewModel}"
|
||||
mc:Ignorable="d">
|
||||
<ui:ContentDialog.Resources>
|
||||
<ex:EnumBindingSource x:Key="deviceType" EnumType="{x:Type en:DeviceType}"/>
|
||||
<ex:EnumBindingSource x:Key="protocolType" EnumType="{x:Type en:ProtocolType}"/>
|
||||
<vc:EnumDescriptionConverter x:Key="EnumDescriptionConverter"/>
|
||||
<ex:EnumBindingSource x:Key="deviceType" EnumType="{x:Type en:DeviceType}" />
|
||||
<ex:EnumBindingSource x:Key="protocolType" EnumType="{x:Type en:ProtocolType}" />
|
||||
<vc:EnumDescriptionConverter x:Key="EnumDescriptionConverter" />
|
||||
</ui:ContentDialog.Resources>
|
||||
<ikw:SimpleStackPanel Width="260" Spacing="12">
|
||||
<!-- 设备名称 -->
|
||||
<TextBlock Text="设备名称" HorizontalAlignment="Left" Style="{StaticResource TextBlockSubTitle}"></TextBlock>
|
||||
<TextBlock Text="设备名称" HorizontalAlignment="Left" Style="{StaticResource TextBlockSubTitle}" />
|
||||
<TextBox
|
||||
Text="{Binding Device.Name, UpdateSourceTrigger=PropertyChanged}" />
|
||||
<!-- 设备描述 -->
|
||||
<TextBlock Text="设备描述" HorizontalAlignment="Left" Style="{StaticResource TextBlockSubTitle}"></TextBlock>
|
||||
<TextBox
|
||||
Text="{Binding Device.Description, UpdateSourceTrigger=PropertyChanged}" />
|
||||
<TextBlock Text="设备描述" HorizontalAlignment="Left" Style="{StaticResource TextBlockSubTitle}" />
|
||||
<TextBox
|
||||
Text="{Binding Device.Description, UpdateSourceTrigger=PropertyChanged}" />
|
||||
<!-- 设备IP地址 -->
|
||||
<TextBlock Text="设备IP地址" HorizontalAlignment="Left" Style="{StaticResource TextBlockSubTitle}"></TextBlock>
|
||||
<TextBlock Text="设备IP地址" HorizontalAlignment="Left" Style="{StaticResource TextBlockSubTitle}" />
|
||||
<TextBox
|
||||
AcceptsReturn="True"
|
||||
Text="{Binding Device.Ip, UpdateSourceTrigger=PropertyChanged}" />
|
||||
|
||||
|
||||
<!-- 设备类型 -->
|
||||
<TextBlock Text="设备类型" HorizontalAlignment="Left" Style="{StaticResource TextBlockSubTitle}"></TextBlock>
|
||||
<ComboBox SelectedItem="{Binding Device.DeviceType}" ItemsSource="{Binding Source={StaticResource deviceType} }" >
|
||||
<TextBlock Text="设备类型" HorizontalAlignment="Left" Style="{StaticResource TextBlockSubTitle}" />
|
||||
<ComboBox SelectedItem="{Binding Device.DeviceType}"
|
||||
ItemsSource="{Binding Source={StaticResource deviceType} }">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Converter={StaticResource EnumDescriptionConverter}}"></TextBlock>
|
||||
<TextBlock Text="{Binding Converter={StaticResource EnumDescriptionConverter}}" />
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
</ComboBox>
|
||||
|
||||
<!-- 通讯协议-->
|
||||
<TextBlock Text="设备通信协议" HorizontalAlignment="Left" Style="{StaticResource TextBlockSubTitle}"></TextBlock>
|
||||
<ComboBox SelectedItem="{Binding Device.ProtocolType}" ItemsSource="{Binding Source={StaticResource protocolType} }" >
|
||||
<TextBlock Text="设备通信协议" HorizontalAlignment="Left" Style="{StaticResource TextBlockSubTitle}" />
|
||||
<ComboBox SelectedItem="{Binding Device.ProtocolType}"
|
||||
ItemsSource="{Binding Source={StaticResource protocolType} }">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Converter={StaticResource EnumDescriptionConverter}}"></TextBlock>
|
||||
<TextBlock Text="{Binding Converter={StaticResource EnumDescriptionConverter}}" />
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
@@ -1,18 +1,15 @@
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using iNKORE.UI.WPF.Modern.Controls;
|
||||
using PMSWPF.Models;
|
||||
using PMSWPF.ViewModels.Dialogs;
|
||||
|
||||
namespace PMSWPF.Views.Dialogs;
|
||||
|
||||
public partial class DeviceDialog
|
||||
{
|
||||
|
||||
public DeviceDialog(DeviceDialogViewModel viewModel)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.DataContext = viewModel;
|
||||
DataContext = viewModel;
|
||||
}
|
||||
|
||||
private void OnPrimaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args)
|
||||
@@ -44,5 +41,4 @@ public partial class DeviceDialog
|
||||
// ErrorText.Text = string.Empty;
|
||||
// ErrorText.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3,10 +3,9 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:PMSWPF.Views"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="300" d:DesignWidth="300">
|
||||
<Grid>
|
||||
<TextBlock Text="HomeView" FontSize="40" HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock>
|
||||
<TextBlock Text="HomeView" FontSize="40" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||
</Grid>
|
||||
</UserControl>
|
||||
</UserControl>
|
||||
@@ -4,8 +4,6 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
|
||||
xmlns:ikw="http://schemas.inkore.net/lib/ui/wpf"
|
||||
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||
xmlns:local="clr-namespace:PMSWPF.Views"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:vm="clr-namespace:PMSWPF.ViewModels"
|
||||
@@ -13,24 +11,24 @@
|
||||
Title="设备管理系统"
|
||||
Width="1080"
|
||||
Height="800"
|
||||
|
||||
|
||||
ui:WindowHelper.UseModernWindowStyle="True"
|
||||
ui:WindowHelper.SystemBackdropType="Mica"
|
||||
d:DataContext="{d:DesignInstance vm:MainViewModel}"
|
||||
mc:Ignorable="d">
|
||||
<Grid>
|
||||
<ui:NavigationView
|
||||
|
||||
ExpandedModeThresholdWidth="500"
|
||||
IsTabStop="False"
|
||||
PaneDisplayMode="Left"
|
||||
PaneTitle="设备管理系统"
|
||||
IsSettingsVisible="False"
|
||||
AlwaysShowHeader="True"
|
||||
IsBackButtonVisible="Collapsed"
|
||||
IsBackEnabled="False"
|
||||
SelectionFollowsFocus="Disabled"
|
||||
SelectionChanged="NavigationView_SelectionChanged">
|
||||
<ui:NavigationView
|
||||
|
||||
ExpandedModeThresholdWidth="500"
|
||||
IsTabStop="False"
|
||||
PaneDisplayMode="Left"
|
||||
PaneTitle="设备管理系统"
|
||||
IsSettingsVisible="False"
|
||||
AlwaysShowHeader="True"
|
||||
IsBackButtonVisible="Collapsed"
|
||||
IsBackEnabled="False"
|
||||
SelectionFollowsFocus="Disabled"
|
||||
SelectionChanged="NavigationView_SelectionChanged">
|
||||
|
||||
<ui:NavigationView.MenuItems>
|
||||
<ui:NavigationViewItem
|
||||
@@ -64,7 +62,7 @@
|
||||
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Info}" />
|
||||
</ui:NavigationViewItem.Icon>
|
||||
</ui:NavigationViewItem>
|
||||
|
||||
|
||||
</ui:NavigationView.MenuItems>
|
||||
|
||||
<ui:NavigationView.AutoSuggestBox>
|
||||
@@ -76,31 +74,30 @@
|
||||
</ui:NavigationView.AutoSuggestBox>
|
||||
|
||||
|
||||
|
||||
<Grid>
|
||||
|
||||
|
||||
<ContentControl Content="{Binding CurrentViewModel}">
|
||||
<ContentControl.Resources>
|
||||
<DataTemplate DataType="{x:Type vm:HomeViewModel}">
|
||||
<local:HomeView/>
|
||||
<local:HomeView />
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type vm:DevicesViewModel}">
|
||||
<local:DevicesView/>
|
||||
<local:DevicesView />
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type vm:DataTransformViewModel}">
|
||||
<local:DataTransformView/>
|
||||
<local:DataTransformView />
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type vm:SettingViewModel}">
|
||||
<local:SettingView/>
|
||||
<local:SettingView />
|
||||
</DataTemplate>
|
||||
</ContentControl.Resources>
|
||||
</ContentControl>
|
||||
|
||||
|
||||
<ScrollViewer VerticalScrollBarVisibility="Hidden" HorizontalAlignment="Right">
|
||||
<StackPanel hc:Growl.GrowlParent="True" VerticalAlignment="Top" Margin="0,10,10,10"/>
|
||||
<StackPanel hc:Growl.GrowlParent="True" VerticalAlignment="Top" Margin="0,10,10,10" />
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
|
||||
|
||||
</ui:NavigationView>
|
||||
</Grid>
|
||||
</Window>
|
||||
@@ -1,65 +1,62 @@
|
||||
using System.Windows;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Messaging;
|
||||
using iNKORE.UI.WPF.Modern.Controls;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using PMSWPF.Message;
|
||||
using PMSWPF.ViewModels;
|
||||
|
||||
namespace PMSWPF.Views
|
||||
namespace PMSWPF.Views;
|
||||
|
||||
/// <summary>
|
||||
/// MainView.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class MainView : Window
|
||||
{
|
||||
/// <summary>
|
||||
/// MainView.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class MainView : Window
|
||||
private readonly ILogger<MainView> _logger;
|
||||
|
||||
public MainView(MainViewModel viewModel, ILogger<MainView> logger)
|
||||
{
|
||||
private readonly ILogger<MainView> _logger;
|
||||
|
||||
public MainView(MainViewModel viewModel, ILogger<MainView> logger)
|
||||
{
|
||||
|
||||
_logger = logger;
|
||||
InitializeComponent();
|
||||
this.DataContext=viewModel;
|
||||
_logger.LogInformation("主界面加载成功");
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 左边菜单项被点击的事件,切换右边的视图
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="args"></param>
|
||||
private void NavigationView_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args)
|
||||
{
|
||||
NavigationViewItem? item = args.SelectedItem as NavigationViewItem;
|
||||
MainViewModel mainViewModel = (MainViewModel)this.DataContext ;
|
||||
switch (item.Tag)
|
||||
{
|
||||
case "Home":
|
||||
mainViewModel.NavgateTo<HomeViewModel>();
|
||||
_logger.LogInformation("导航到到主页面");
|
||||
break;
|
||||
case "Devices":
|
||||
|
||||
mainViewModel.NavgateTo<DevicesViewModel>();
|
||||
_logger.LogInformation("导航到到设备页面");
|
||||
break;
|
||||
case "DataTransform":
|
||||
mainViewModel.NavgateTo<DataTransformViewModel>();
|
||||
_logger.LogInformation("导航到到数据转换页面");
|
||||
break;
|
||||
case "Setting":
|
||||
mainViewModel.NavgateTo<SettingViewModel>();
|
||||
_logger.LogInformation("导航到到设备页面");
|
||||
break;
|
||||
default:
|
||||
mainViewModel.NavgateTo<HomeViewModel>();
|
||||
_logger.LogInformation("没有设置Tag,默认导航到主页面。");
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
_logger = logger;
|
||||
InitializeComponent();
|
||||
DataContext = viewModel;
|
||||
_logger.LogInformation("主界面加载成功");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 左边菜单项被点击的事件,切换右边的视图
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="args"></param>
|
||||
private void NavigationView_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args)
|
||||
{
|
||||
var item = args.SelectedItem as NavigationViewItem;
|
||||
ViewModelBase navgateVM = App.Current.Services.GetRequiredService<HomeViewModel>();
|
||||
switch (item.Tag)
|
||||
{
|
||||
case "Home":
|
||||
// mainViewModel.NavgateTo<HomeViewModel>();
|
||||
navgateVM = App.Current.Services.GetRequiredService<HomeViewModel>();
|
||||
_logger.LogInformation("导航到到主页面");
|
||||
break;
|
||||
case "Devices":
|
||||
navgateVM = App.Current.Services.GetRequiredService<DevicesViewModel>();
|
||||
// mainViewModel.NavgateTo<DevicesViewModel>();
|
||||
_logger.LogInformation("导航到到设备页面");
|
||||
break;
|
||||
case "DataTransform":
|
||||
navgateVM = App.Current.Services.GetRequiredService<DataTransformViewModel>();
|
||||
// mainViewModel.NavgateTo<DataTransformViewModel>();
|
||||
_logger.LogInformation("导航到到数据转换页面");
|
||||
break;
|
||||
case "Setting":
|
||||
// mainViewModel.NavgateTo<SettingViewModel>();
|
||||
navgateVM = App.Current.Services.GetRequiredService<SettingViewModel>();
|
||||
_logger.LogInformation("导航到到设备页面");
|
||||
break;
|
||||
}
|
||||
|
||||
var nm = new NavgatorMessage(navgateVM);
|
||||
WeakReferenceMessenger.Default.Send(nm);
|
||||
}
|
||||
}
|
||||
@@ -3,10 +3,7 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:PMSWPF.Views"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="300" d:DesignWidth="300">
|
||||
<Grid>
|
||||
|
||||
</Grid>
|
||||
</UserControl>
|
||||
<Grid />
|
||||
</UserControl>
|
||||
23
Views/VariableTableView.xaml
Normal file
23
Views/VariableTableView.xaml
Normal file
@@ -0,0 +1,23 @@
|
||||
<UserControl x:Class="PMSWPF.Views.VariableTableView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:ikw="http://schemas.inkore.net/lib/ui/wpf"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="300" d:DesignWidth="300">
|
||||
<ikw:SimpleStackPanel Spacing="5">
|
||||
|
||||
<ikw:SimpleStackPanel Orientation="Horizontal" Spacing="10">
|
||||
<TextBlock Text="变量表名称:" /> <TextBlock Text="默认变量表" />
|
||||
</ikw:SimpleStackPanel>
|
||||
<ikw:SimpleStackPanel Orientation="Horizontal" Spacing="10">
|
||||
<TextBlock Text="变量表描述:" /> <TextBlock Text="默认变量表" />
|
||||
</ikw:SimpleStackPanel>
|
||||
<ikw:SimpleStackPanel Orientation="Horizontal" Spacing="10">
|
||||
<TextBlock Text="所属设备:" /> <TextBlock Text="默认变量表" />
|
||||
</ikw:SimpleStackPanel>
|
||||
</ikw:SimpleStackPanel>
|
||||
|
||||
|
||||
</UserControl>
|
||||
13
Views/VariableTableView.xaml.cs
Normal file
13
Views/VariableTableView.xaml.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System.Windows.Controls;
|
||||
using PMSWPF.ViewModels;
|
||||
|
||||
namespace PMSWPF.Views;
|
||||
|
||||
public partial class VariableTableView : UserControl
|
||||
{
|
||||
public VariableTableView(VariableTableViewModel viewModel)
|
||||
{
|
||||
InitializeComponent();
|
||||
DataContext = viewModel;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user