Example #1
0
        private void animateItemInclChilds(string parentElem)
        {
            TreeViewItem parentElement = findItem(presentation.SecuredSoapItem, parentElem);

            TextSizeAnimation.AutoReverse = true;
            parentElement.BeginAnimation(TreeViewItem.FontSizeProperty, TextSizeAnimation);
            TextSizeAnimation.AutoReverse = false;
        }
Example #2
0
        private void FormatOrigTV(TreeViewItem treeViewItem)
        {
            StackPanel      tempHeader     = (StackPanel)treeViewItem.Header;
            TextBlock       elem           = new TextBlock();
            DoubleAnimation widthAnimation =
                new DoubleAnimation(16, 11, TimeSpan.FromSeconds(1));

            widthAnimation.AutoReverse = false;
            elem = (TextBlock)tempHeader.Children[0];
            if (elem.FontSize == 16.0)
            {
                treeViewItem.BeginAnimation(TreeViewItem.FontSizeProperty, widthAnimation);
            }
            treeViewItem.FontStyle = FontStyles.Normal;
            string s = treeViewItem.Header.ToString();

            if (treeViewItem.HasItems)
            {
                foreach (TreeViewItem child in treeViewItem.Items)
                {
                    FormatOrigTV(child);
                }
            }
        }