Пример #1
0
        private void minimizeClick(object sender, RoutedEventArgs e)
        {
            UploadControl control = (UploadControl)((GroupBox)((StackPanel)((Button)sender).Parent).Parent).Parent;

            control.Description.MinHeight = 0;
            control.Tags.MinHeight        = 0;
            control.Minimize.Visibility   = System.Windows.Visibility.Collapsed;
        }
Пример #2
0
        private void CUpload_Dropped(object sender, DragEventArgs e)
        {
            base.OnDrop(e);

            UploadControl       uploadControlToMove           = (UploadControl)e.Data.GetData("UploadControl");
            UploadControl       uploadControlAtTargetPosition = (UploadControl)sender;
            UploadListViewModel uploadListViewModel           = (UploadListViewModel)this.DataContext;

            uploadListViewModel.ReOrder(((UploadViewModel)uploadControlToMove.DataContext).Upload, ((UploadViewModel)uploadControlAtTargetPosition.DataContext).Upload);

            e.Handled = true;
        }
Пример #3
0
        private void controlLostFocus(object sender, RoutedEventArgs e)
        {
            TextBox control = (TextBox)sender;

            control.MinHeight = 0;

            UploadControl uploadControl = (UploadControl)((GroupBox)((Grid)((StackPanel)control.Parent).Parent).Parent).Parent;

            if (uploadControl.Description.MinHeight == 0 && uploadControl.Tags.MinHeight == 0)
            {
                uploadControl.Minimize.Visibility = System.Windows.Visibility.Collapsed;
            }
        }
Пример #4
0
        private void controlGotFocus(object sender, RoutedEventArgs e)
        {
            TextBox control = (TextBox)sender;

            if (control.Name == "Description")
            {
                control.MinHeight = 200;
            }

            if (control.Name == "Tags")
            {
                control.MinHeight = 100;
            }

            UploadControl uploadControl = (UploadControl)((GroupBox)((Grid)((StackPanel)control.Parent).Parent).Parent).Parent;

            uploadControl.Minimize.Visibility = System.Windows.Visibility.Visible;
        }