示例#1
0
        /// <summary>
        /// Creates and initializes a new instance of the MultiButtonEntry class.
        /// </summary>
        /// <param name="parent">The parent is a given container, which will be attached by the MultiButtonEntry as a child. It's <see cref="EvasObject"/> type.</param>
        /// <since_tizen> preview </since_tizen>
        public MultiButtonEntry(EvasObject parent) : base(parent)
        {
            _clicked              = new SmartEvent(this, "clicked");
            _expanded             = new SmartEvent(this, "expanded");
            _contracted           = new SmartEvent(this, "contracted");
            _expandedStateChanged = new SmartEvent(this, "expand,state,changed");

            _itemSelected    = new SmartEvent <MultiButtonEntryItemEventArgs>(this, "item,selected", MultiButtonEntryItemEventArgs.CreateFromSmartEvent);
            _itemClicked     = new SmartEvent <MultiButtonEntryItemEventArgs>(this, "item,clicked", MultiButtonEntryItemEventArgs.CreateFromSmartEvent);
            _itemLongPressed = new SmartEvent <MultiButtonEntryItemEventArgs>(this, "item,longpressed", MultiButtonEntryItemEventArgs.CreateFromSmartEvent);
            _itemAdded       = new SmartEvent <MultiButtonEntryItemEventArgs>(this, "item,added", MultiButtonEntryItemEventArgs.CreateAndAddFromSmartEvent);

            _filterCallback = new Interop.Elementary.MultiButtonEntryItemFilterCallback(FilterCallbackHandler);
            _formatCallback = new Interop.Elementary.MultiButtonEntryFormatCallback(FormatCallbackHandler);

            _clicked.On              += (sender, e) => Clicked?.Invoke(this, EventArgs.Empty);
            _expanded.On             += (sender, e) => Expanded?.Invoke(this, EventArgs.Empty);
            _contracted.On           += (sender, e) => Contracted?.Invoke(this, EventArgs.Empty);
            _expandedStateChanged.On += (sender, e) => ExpandedStateChanged?.Invoke(this, EventArgs.Empty);

            _itemSelected.On    += (sender, e) => { ItemSelected?.Invoke(this, e); };
            _itemClicked.On     += (sender, e) => { ItemClicked?.Invoke(this, e); };
            _itemLongPressed.On += (sender, e) => { ItemLongPressed?.Invoke(this, e); };
            _itemAdded.On       += OnItemAdded;
        }
示例#2
0
 /// <summary>
 /// Creates and initializes a new instance of the Hoversel class.
 /// </summary>
 /// <param name="parent">The parent is a given container which will be attached by Hoversel as a child. It's <see cref="EvasObject"/> type.</param>
 /// <since_tizen> preview </since_tizen>
 public Hoversel(EvasObject parent) : base(parent)
 {
     _clicked     = new SmartEvent(this, "clicked");
     _clicked.On += (sender, e) =>
     {
         Clicked?.Invoke(this, EventArgs.Empty);
     };
     _expanded     = new SmartEvent(this, "expanded");
     _expanded.On += (sender, e) =>
     {
         Expanded?.Invoke(this, EventArgs.Empty);
     };
     _dismissed     = new SmartEvent(this, "dismissed");
     _dismissed.On += (sender, e) =>
     {
         Dismissed?.Invoke(this, EventArgs.Empty);
     };
     _selected     = new SmartEvent <HoverselItemEventArgs>(this, RealHandle, "selected", HoverselItemEventArgs.CreateFromSmartEvent);
     _selected.On += (s, e) =>
     {
         if (e.Item != null)
         {
             ItemSelected?.Invoke(this, e);
         }
     };
     _onItemSelected = (data, obj, info) =>
     {
         HoverselItem item = ItemObject.GetItemById((int)data) as HoverselItem;
         item?.SendItemSelected();
     };
 }
示例#3
0
        /// <summary>
        /// Accordion section was Expanded (aka selected)
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void OnExpanderExpanded(object sender, RoutedEventArgs e)
        {
            if (currentlyExpandedExpander != null)
            {
                Expander expanderLoosing = currentlyExpandedExpander as Expander;
                expanderLoosing.IsExpanded = false;
                SetRowHeight(currentlyExpandedExpander, GridUnitType.Auto);
            }

            currentlyExpandedExpander = sender as Expander;

            SetRowHeight(sender, GridUnitType.Star);

            if (Expanded != null)
            {
                Expanded.Invoke(currentlyExpandedExpander.Content, e);
            }

            QuickFilterControl qf = WpfHelper.FindDescendantElement(currentlyExpandedExpander, nameIdOfQuickFilter) as QuickFilterControl;

            if (qf != null)
            {
                qf.Visibility = System.Windows.Visibility.Visible;
            }
        }
        public void Show()
        {
            //slide out
            double slideTime = maxSlideOutTime * GetSlidePercent();

            slideOut = new ThicknessAnimation(new Thickness(0), new Duration(TimeSpan.FromSeconds(slideTime)));
            BeginAnimation(MarginProperty, slideOut);
            Expanded?.Invoke(this, new EventArgs());
        }
示例#5
0
        /// <summary>
        ///
        /// </summary>
        protected virtual void OnExpanded()
        {
            Expanded?.Invoke(this, new EventArgs());

            if (queryOnExpanded)
            {
                BeginQuery(SystemProvider);
            }
        }
示例#6
0
 private void UpdateInnerPanelCollapsedState()
 {
     if (isExpanded && innerPanel.Parent == null)
     {
         // todo - need to support collapsing without removing the child
         innerPanel.Parent = Visual;
         Expanded?.Invoke(this, null);
     }
     else if (!isExpanded && innerPanel.Parent != null)
     {
         innerPanel.Parent = null;
         Collapsed?.Invoke(this, null);
     }
 }
示例#7
0
        private void SetExpanded(bool expanded)
        {
            for (int i = 1; i < Children.Count; i++)
            {
                Children[i].Visible = expanded;
            }

            (FindChild("treeviewnode_expand_btn_icon") as Icon).IconType = expanded ? Icons.AngleDown : Icons.AngleRight;

            if (expanded == true)
            {
                Expanded?.Invoke(this);
                OnExpanded();
            }
        }
示例#8
0
        /// <summary>
        /// Opens the node.
        /// </summary>
        public void Open()
        {
            m_Panel.Show();
            if (m_ToggleButton != null)
            {
                m_ToggleButton.ToggleState = true;
            }

            if (Expanded != null)
            {
                Expanded.Invoke(this, EventArgs.Empty);
            }

            Invalidate();
        }
示例#9
0
        /// <summary>
        /// Opens the node.
        /// </summary>
        public void Open()
        {
            m_InnerPanel.Show();
            if (m_ToggleButton != null)
            {
                m_ToggleButton.ToggleState = true;
            }

            if (Expanded != null)
            {
                Expanded.Invoke(this);
            }
            if (m_TreeControl != null && m_TreeControl.Expanded != null)
            {
                m_TreeControl.Expanded.Invoke(this);
            }

            Invalidate();
        }
示例#10
0
        /// <summary>
        /// Opens the node.
        /// </summary>
        public void Open()
        {
            innerPanel.Show();
            if (toggleButton != null)
            {
                toggleButton.ToggleState = true;
            }

            if (Expanded != null)
            {
                Expanded.Invoke(this, EventArgs.Empty);
            }
            if (treeControl != null && treeControl.Expanded != null)
            {
                treeControl.Expanded.Invoke(this, EventArgs.Empty);
            }

            Invalidate();
        }
示例#11
0
 /// <summary>
 /// Called when control is expanded
 /// </summary>
 /// <param name="args">EventArgs</param>
 protected virtual void OnExpanded(EventArgs args)
 {
     Expanded?.Invoke(this, args);
 }
示例#12
0
 private void ExpandControl()
 {
     VisualStateManager.GoToState(this, StateContentExpanded, true);
     Expanded?.Invoke(this, new EventArgs());
 }
示例#13
0
 private void OnExpanded(object sender, RegionsExpandedEventArgs e)
 {
     Expanded?.Invoke(this, EventArgs.Empty);
 }
示例#14
0
 /// <summary>
 /// Raises the Expanded event.
 /// </summary>
 /// <param name="e">Contains event arguments.</param>
 protected virtual void OnExpanded(EventArgs e)
 {
     Expanded?.Invoke(this, e);
 }