46 lines
1.4 KiB
C#
46 lines
1.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows;
|
|
using System.Windows.Controls;
|
|
using System.Windows.Data;
|
|
using System.Windows.Documents;
|
|
using System.Windows.Input;
|
|
using System.Windows.Media;
|
|
using System.Windows.Media.Imaging;
|
|
using System.Windows.Navigation;
|
|
using System.Windows.Shapes;
|
|
using 垂直剖面动态观测系统.ViewModel;
|
|
|
|
namespace 垂直剖面动态观测系统.View
|
|
{
|
|
/// <summary>
|
|
/// UserControlMenuItem.xaml 的交互逻辑
|
|
/// </summary>
|
|
public partial class UserControlMenuItem : UserControl
|
|
{
|
|
public UserControlMenuItem(ListPageViewModel itemMenu)
|
|
{
|
|
InitializeComponent();
|
|
ExpanderMenu.Visibility = itemMenu.Header == null ? Visibility.Collapsed : Visibility.Visible;
|
|
//ListViewItemMenu.Visibility = itemMenu.Header == null ? Visibility.Visible : Visibility.Collapsed;
|
|
|
|
this.DataContext = itemMenu;
|
|
}
|
|
|
|
private void Button_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
test.Change_Page((string)ExpanderMenu.Header + "," + sensor_Name + "," + (sender as Button).Tag as string);
|
|
//test.Change_Page("ParameterView");
|
|
}
|
|
|
|
string sensor_Name;
|
|
private void expander_PreviewMouseDown(object sender, MouseButtonEventArgs e)
|
|
{
|
|
sensor_Name = (sender as Expander).Header.ToString();
|
|
}
|
|
}
|
|
}
|