This question is locked. New answers and comments are not allowed.
I am using the RadUpload Silverlight control in a SharePoint web part, and it seems that when the control initially loads on the page, there is a sem-transparent blocking panel that appears in front of the control. If you wait for 3 seconds or so, it disappears, and it also disappears if you click on the control. Can anyone explain why this is happening? I have attached a couple screenshots to demonstrate what is happening.
Blocking Panel on initial load
Blocking panel disappeared
Here is my SL user control code:
Codebehind:
Any help would be appreciated.
Thanks,
Larkin
Blocking Panel on initial load
Blocking panel disappeared
Here is my SL user control code:
<UserControl x:Class="AttachmentUploader.MainPage" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" mc:Ignorable="d" Height="300" Width="400"> <Grid x:Name="LayoutRoot" Background="White" Height="Auto"> <Grid.RowDefinitions> <RowDefinition Height="100"></RowDefinition> <RowDefinition Height="200"></RowDefinition> </Grid.RowDefinitions> <telerik:RadUploadDropPanel telerik:StyleManager.Theme="Windows7" BorderThickness="1" Grid.Row="0" BorderBrush="#FFA7A7A7" Background="White" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" DragEnter="AttachmentDropPanel_DragEnter" DragLeave="AttachmentDropPanel_DragLeave" x:Name="AttachmentDropPanel" RadUpload="{Binding ElementName=FileAttachmentUpload}" Height="100"> <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Text="Drag and drop files here." TextWrapping="Wrap" Margin="10"/> </telerik:RadUploadDropPanel> <telerik:RadUpload x:Name="FileAttachmentUpload" telerik:StyleManager.Theme="Windows7" HorizontalAlignment="Left" Grid.Row="1" VerticalAlignment="Top" IsAppendFilesEnabled="True" IsAutomaticUpload="True" MaxFileCount="10" MaxFileSize="100000000" MaxUploadSize="200000000" UploadServiceUrl="_layouts/eo-cms/AttachmentUploadHandler.ashx" FileUploaded="FileAttachmentUpload_FileUploaded" FileUploadStarting="FileAttachmentUpload_FileUploadStarting" Height="200" /> </Grid></UserControl>Codebehind:
using System;using System.Collections.Generic;using System.Linq;using System.Net;using System.Windows;using System.Windows.Controls;using System.Windows.Documents;using System.Windows.Input;using System.Windows.Media;using System.Windows.Media.Animation;using System.Windows.Shapes;using System.Windows.Browser;namespace AttachmentUploader{ public partial class MainPage : UserControl { private string _trackingFileInputId = ""; List<RecordAttachment> _attachments = new List<RecordAttachment>(); public MainPage() { InitializeComponent(); } public MainPage(IDictionary<string, string> initParams) { InitializeComponent(); if (initParams.Keys.Contains("TrackFilesInput")) { _trackingFileInputId = initParams["TrackFilesInput"]; } } private void AttachmentDropPanel_DragEnter(object sender, DragEventArgs e) { Color backgroundColor = new Color(); backgroundColor.R = 208; backgroundColor.G = 232; backgroundColor.B = 254; this.FileAttachmentUpload.Background = new SolidColorBrush(backgroundColor); } private void AttachmentDropPanel_DragLeave(object sender, DragEventArgs e) { this.FileAttachmentUpload.Background = new SolidColorBrush(Colors.White); } private void FileAttachmentUpload_FileUploaded(object sender, Telerik.Windows.Controls.FileUploadedEventArgs e) { var fileId = e.HandlerData.CustomData["FileItemId"]; var fileName = e.SelectedFile.Name; _attachments.Add(new RecordAttachment() { Id = Convert.ToInt32(fileId), FileName = fileName, Type = 0 }); HtmlDocument doc = HtmlPage.Document; HtmlElement uploadedFilesElem = doc.GetElementById(_trackingFileInputId); uploadedFilesElem.SetAttribute("value", SerializationHelper.JsonSerialize(_attachments)); } private void FileAttachmentUpload_FileUploadStarting(object sender, Telerik.Windows.Controls.FileUploadStartingEventArgs e) { } }}Any help would be appreciated.
Thanks,
Larkin