12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- using System.Collections.Generic;
- using System.Windows;
- using System.Windows.Controls;
- namespace MECF.Framework.UI.Client.CenterViews.DataLogs.Event
- {
- /// <summary>
- /// EventView.xaml 的交互逻辑
- /// </summary>
- public delegate void ItemSelectionChange(bool changeFalg);
- public class ItemSelectionData
- {
- public bool _IsSelcet;
- public string _SelectItem;
- public bool IsSelect { get { return _IsSelcet; } set { _IsSelcet = value; } }
- public string SelectItem { get { return _SelectItem; } set { _SelectItem = value; } }
- public ItemSelectionData(bool IsSelcet,string SelectItem)
- {
- this.IsSelect = IsSelcet;
- this.SelectItem = SelectItem;
- }
- }
- public partial class EventView : UserControl
- {
- public EventView()
- {
- InitializeComponent();
- tbLoadPort1ToolTipList = new List<string>();
- }
- public List<string> tbLoadPort1ToolTipList { get; set; }
- public static readonly DependencyProperty tbLoadPort1ToolTipValueProperty = DependencyProperty.Register(
- "tbLoadPort1ToolTipValueData", typeof(ItemSelectionData), typeof(EventView));
- public ItemSelectionData tbLoadPort1ToolTipValueData
- {
- get { return (ItemSelectionData)this.GetValue(tbLoadPort1ToolTipValueProperty); }
- set { SetValue(tbLoadPort1ToolTipValueProperty, value); }
- }
- private void tbLoadPort1_ItemSelectionChanged(object sender, Xceed.Wpf.Toolkit.Primitives.ItemSelectionChangedEventArgs e)
- {
- if (e.Item != null)
- {
- //if(e.Item.ToString()=="ALL")
- tbLoadPort1ToolTipValueData= new ItemSelectionData(e.IsSelected,e.Item.ToString());
- }
- else
- {
- tbLoadPort1ToolTipValueData = null;
- }
- }
- }
- }
|