public ProviderTemplate(Provider p)
 {
     InitializeComponent();
     this.provider = p;
     this.currentState = ProviderItemState.overview;
     this.fillWithData();
 }
        /// <summary>
        /// Sets the state.
        /// </summary>
        /// <param name="future">The future state</param>
        public void setState(ProviderItemState future)
        {
            if (this._opener == null || this._closer == null) //lazy init
            {
                this.initMorphers();
            }

            switch (future)
            {
                case ProviderItemState.detailed:
                    this.onStoryboardStarted();
                    this._closer.Stop();
                    this._opener.Begin();
                    break;

                case ProviderItemState.overview:
                    this.onStoryboardStarted();
                    this._opener.Stop();
                    this._closer.Begin();
                    break;
            }

            this.currentState = future;
        }