Click here to Skip to main content
12,827,635 members (47,466 online)
Click here to Skip to main content


113 bookmarked
Posted 6 Apr 2008

Conceptual Children: A powerful new concept in WPF

, 6 Apr 2008 BSD
This article describes a new approach by which an element can remove its visual and logical relationships to its children while maintaining a conceptual parental relationship with those children.
using System;
using System.Diagnostics;
using System.Windows;
using System.Windows.Input;
using System.Xml;

namespace WpfDiscipleBlogViewer3D
    /// <summary>
    /// Interaction logic for Window1.xaml
    /// </summary>
    public partial class Window1 : Window
        Panel3D _panel3D;
        readonly TimeSpan ANIMATION_LENGTH = TimeSpan.FromSeconds(.7);

        public Window1()

        void OnPanel3DLoaded(object sender, RoutedEventArgs e)
            // Grab a reference to the Panel3D when it loads.
            _panel3D = sender as Panel3D;

        void Open_CanExecute(object sender, CanExecuteRoutedEventArgs e)
            e.CanExecute = true;

        void Open_Executed(object sender, ExecutedRoutedEventArgs e)
            string url = (e.Parameter as XmlAttribute).Value;

        void MoveForwardButtonClicked(object sender, RoutedEventArgs e)
            _panel3D.MoveItems(1, true, ANIMATION_LENGTH);

        void MoveBackButtonClicked(object sender, RoutedEventArgs e)
            _panel3D.MoveItems(1, false, ANIMATION_LENGTH);

        void PageForwardButtonClicked(object sender, RoutedEventArgs e)
            _panel3D.MoveItems(3, true, ANIMATION_LENGTH);

        void PageBackButtonClicked(object sender, RoutedEventArgs e)
            _panel3D.MoveItems(3, false, ANIMATION_LENGTH);

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


This article, along with any associated source code and files, is licensed under The BSD License


About the Author

United States United States
Dr. WPF is a WPF Disciple! Check out the doctor's blog and bio for more information.

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170326.1 | Last Updated 6 Apr 2008
Article Copyright 2008 by Dr. WPF
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid