Example #1
0
        private static void OnIsExpandedChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
        {
            AccordianItem item = sender as AccordianItem;

            if (item != null)
            {
                item.OnIsExpandedChanged(e);
            }
        }
Example #2
0
        protected virtual void OnExpandedItemChanged(object oldValue, object newValue)
        {
            AccordianItem oldItem = this.ItemContainerGenerator.ContainerFromItem(oldValue) as AccordianItem;

            if (oldItem != null)
            {
                oldItem.IsExpanded = false;
            }
        }
Example #3
0
        private static void OnExecuteExpand(object sender, ExecutedRoutedEventArgs e)
        {
            AccordianItem item = sender as AccordianItem;

            if (!item.IsExpanded)
            {
                item.IsExpanded = true;
            }
        }