aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Scripting/Tango.Scripting.Editors/Search/DropDownButton.cs
blob: dca5bea3032d963918356d159d3cc9d0516884e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Tango.FSE.MachineConfiguration.Models
{
    public class CsvModel
    {
        public String Date { get; set; }
        public String Collection { get; set; }
        public String Key { get; set; }
        public String Type { get; set; }
        public String MessageType { get; set; }
        public String Value { get; set; }
    }
}
odeAnalysis.SuppressMessage("Microsoft.Security", "CA2104:DoNotDeclareReadOnlyMutableReferenceTypes")] protected static readonly DependencyPropertyKey IsDropDownContentOpenPropertyKey = DependencyProperty.RegisterReadOnly("IsDropDownContentOpen", typeof(bool), typeof(DropDownButton), new FrameworkPropertyMetadata(false)); public static readonly DependencyProperty IsDropDownContentOpenProperty = IsDropDownContentOpenPropertyKey.DependencyProperty; static DropDownButton() { DefaultStyleKeyProperty.OverrideMetadata(typeof(DropDownButton), new FrameworkPropertyMetadata(typeof(DropDownButton))); } public Popup DropDownContent { get { return (Popup)GetValue(DropDownContentProperty); } set { SetValue(DropDownContentProperty, value); } } public bool IsDropDownContentOpen { get { return (bool)GetValue(IsDropDownContentOpenProperty); } protected set { SetValue(IsDropDownContentOpenPropertyKey, value); } } protected override void OnClick() { if (DropDownContent != null && !IsDropDownContentOpen) { DropDownContent.Placement = PlacementMode.Bottom; DropDownContent.PlacementTarget = this; DropDownContent.IsOpen = true; DropDownContent.Closed += DropDownContent_Closed; this.IsDropDownContentOpen = true; } } void DropDownContent_Closed(object sender, EventArgs e) { ((Popup)sender).Closed -= DropDownContent_Closed; this.IsDropDownContentOpen = false; } } }