Ejemplo n.º 1
0
        /// <returns></returns>
        protected virtual UIElement CreateItemContainer()
        {
            DropdownItem ue = new DropdownItem();

            AddItemActivedHandler(ue, new RoutedEventHandler(Item_Actived));
            return(ue);
        }
Ejemplo n.º 2
0
        private static void FilterTextChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            DropdownItem di = d as DropdownItem;

            if (e.NewValue != e.OldValue)
            {
                string str = e.NewValue as string;
                di.FilterTextCore(str);
            }
        }
Ejemplo n.º 3
0
        private static void NormalTextChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            DropdownItem ditem = d as DropdownItem;

            if (e.NewValue != e.OldValue)
            {
                string val = e.NewValue as string;
                ditem.OnNormalTextChanged(val);
            }
        }
Ejemplo n.º 4
0
        private void Item_Actived(object sender, RoutedEventArgs e)
        {
            if (m_InputBox == null)
            {
                return;
            }
            DropdownItem item = e.Source as DropdownItem;

            if (item != null)
            {
                string str = item.NormalText;
                m_InputBox.Tag   = true;
                m_InputBox.Text  = str;
                m_InputBox.Tag   = false;
                IsDropdownOpened = false;
                var passwordBox = PasswordBoxParameter as PasswordBox;
                var selectUser  = ((List <User>)DropItems)
                                  .Where(user => { return(user.Email == str); })
                                  .First();
                passwordBox.Password = selectUser.Password;
                Console.WriteLine(selectUser.Password);
            }
        }
Ejemplo n.º 5
0
        private static void FilterBrushChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            DropdownItem dropitem = d as DropdownItem;

            dropitem.OnFilterBrushChanged();
        }
Ejemplo n.º 6
0
        private static void NormalBrushChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            DropdownItem ditem = d as DropdownItem;

            ditem.OnNormalBrushChanged();
        }