Example #1
0
        private void RadCoverFlowItem_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            Telerik.Windows.Controls.RadCoverFlowItem item = (Telerik.Windows.Controls.RadCoverFlowItem)sender;

            if ((DateTime.Now.Ticks - doubleClickTicks) < 2310000)
            {
                if (WindowPreviewCoverFlow.SelectedItem == item)
                {
                    WindowClose_Click(null, null);

                    WindowManager.ActivateWindow(item.Tag.ToString());
                }
            }

            doubleClickTicks = DateTime.Now.Ticks;
        }
Example #2
0
        private void UpdatePreviewsProcess()
        {
            WindowPreviewCoverFlow.Items.Clear();

            WindowPreviews.Children.Clear();

            foreach (Silverlight.WindowManager.Window currentWindow in WindowManager.Windows)
            {
                Telerik.Windows.Controls.RadCoverFlowItem item = new Telerik.Windows.Controls.RadCoverFlowItem();

                Image previewImage = new Image();

                previewImage.Source = currentWindow.ScreenCapture;

                previewImage.Height = 300;

                previewImage.Width = 300;

                item.Content = previewImage;

                item.Tag = currentWindow.WindowHandle.ToString();

                item.MouseLeftButtonUp += new MouseButtonEventHandler(RadCoverFlowItem_MouseLeftButtonUp);

                WindowPreviews.Children.Add(previewImage);

                WindowPreviewCoverFlow.Items.Add(item);
            }

            WindowPreviewCoverFlow.InvalidateArrange();

            WindowPreviewCoverFlow.InvalidateMeasure();

            if (WindowPreviewCoverFlow.Items.Count > 0)
            {
                WindowPreviewCoverFlow.SelectedIndex = WindowPreviewCoverFlow.Items.Count - 1;
            }

            return;
        }