예제 #1
0
        private void ReplaceContentMethod(ShatteringControl sc)
        {
            DispatcherTimer t = new DispatcherTimer()
            {
            };

            t.Interval = new TimeSpan(0, 0, 2);
            t.Tick    += delegate
            {
                sc.Content = null;
                //  sc.Content = sc.ShatteringContent;
                t.Stop();
            };
            t.Start();
        }
예제 #2
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.shatterControl = ((WPFCustomControls.Presentations.ShatteringControl)(target));

            #line 12 "..\..\ShatteringControlWindow.xaml"
                this.shatterControl.Finished += new System.Windows.RoutedEventHandler(this.shatterControl_Finished);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
예제 #3
0
        public void DetermineAction(ShatteringControl sc)
        {
            switch (sc.EffectToUse)
            {
            case ShartteringEffect.SlideOn:
                MovePeicesToPostion();
                break;

            case ShartteringEffect.SlideOff:
                MovePeicesFromPosition();
                break;

            //case ShartteringEffect.FadeOn:
            //    break;
            //case ShartteringEffect.FadeOff:
            //    break;
            default:
                break;
            }
        }