Need Windows 7 Template For RadUpload v2010.3.1110.1040

2 posts, 0 answers
  1. Randy
    Randy avatar
    40 posts
    Member since:
    Nov 2007

    Posted 10 Mar 2011 Link to this post

    We're using your silverlight 4 controls:  2010.3.1110.1040
    We're using your theme:  Telerik.Windows.Themes.Office_Blue

    [NOTE: I accidentally said win7 theme in the post title, but we want the Office_Blue theme template!]

    Some time ago I had to modify the upload control's template so I could add a drop down list box next to each file to upload.
    (and to work around the fact that you guys hard-coded the height of as 300px)

    As we upgraded to newer versions of your control suite, our control is now broken.
    Can you provide me with the entire upload template for your Office_Blue theme, which will be self contained in a user control.
    I have not debugged it since it stopped working (I select a file to upload, but the file never gets into the control's upload list).
    It has been a lower priority since it's not going into phase 1 of the app launch.
    Just in case the problem is your template has changed, I'd like you to send me the current Office_Blue radupload template.

    I'll display what I currently have so that you can see what I need:
    (this is the win7 version because we started off with that theme, but we do want the Office_Blue version now)

    <UserControl.Resources>
        <!--Windows 7 Theme Rad Upload Style - Modified to Dynamically Stretch Vertically -->
        <SolidColorBrush x:Key="Upload_Background" Color="#FFFCFCFC" />
        <SolidColorBrush x:Key="Upload_OuterBorder" Color="#FFA0AFC3" />
        <CornerRadius x:Key="Upload_OuterCornerRadius">0</CornerRadius>
        <Thickness x:Key="ControlInnerBorder_Thickness">0</Thickness>
        <SolidColorBrush x:Key="Upload_InnerBorder" Color="Transparent" />
        <CornerRadius x:Key="Upload_InnerCornerRadius">0</CornerRadius>
        <LinearGradientBrush x:Key="ControlHeader_Background" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FFFDFEFF" Offset="0" />
            <GradientStop Color="#FFDDE9F7" Offset="1" />
            <GradientStop Color="#FFE6F0FA" Offset="0.5" />
            <GradientStop Color="#FFDCE6F4" Offset="0.5" />
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="ControlHeader_OuterBorderBrush" EndPoint="0.5,1"
            StartPoint="0.5,0">
            <GradientStop Color="#FFA9BFD6" Offset="0" />
            <GradientStop Color="#FFCDDAEA" Offset="1" />
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="ControlHeader_InnerBorderBrush" EndPoint="0.5,1"
        StartPoint="0.5,0">
            <GradientStop Color="#FFFAFCFD" Offset="0" />
            <GradientStop Color="#FFE4EFFB" Offset="1" />
        </LinearGradientBrush>
        <SolidColorBrush x:Key="ControlHeader_Foreground" Color="#FF1E395B" />
        <telerik:Windows7Theme x:Key="Theme" />
        <SolidColorBrush x:Key="Upload_BottomPartBorder" Color="#FFA0AFC3" />
        <Thickness x:Key="Upload_BottomPartBorder_Thickness">0 1 0 0</Thickness>
        <LinearGradientBrush x:Key="Upload_BottomPartBackground" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FFD9E3F0" />
            <GradientStop Color="#FFF1F5FB" Offset="0.07" />
            <GradientStop Color="#FFE8EEF7" Offset="0.04" />
            <GradientStop Color="#FFE8EEF7" Offset="0.05" />
        </LinearGradientBrush>
        <SolidColorBrush x:Key="Upload_BottomPartInnerBorder" Color="Transparent" />
        <Thickness x:Key="Upload_BottomPartInnerBorder_Thickness">0</Thickness>
        <Style x:Key="RadUploadStyleDocType" TargetType="telerikInput:RadUpload">
            <Setter Property="Filter" Value="Image files (*.tif;*.tiff)|*.tif;*.tiff"></Setter>
            <Setter Property="FilterIndex" Value="1"></Setter>
            <Setter Property="IsMultiselect" Value="True"></Setter>
            <Setter Property="BufferSize" Value="100000"></Setter>
            <Setter Property="MaxFileSize" Value="-1"></Setter>
            <Setter Property="MaxUploadSize" Value="-1"></Setter>
            <Setter Property="MaxFileCount" Value="-1"></Setter>
            <Setter Property="MinHeight" Value="175"></Setter>
            <Setter Property="MinWidth" Value="350"></Setter>
            <Setter Property="MaxHeight" Value="2000"></Setter>
            <Setter Property="Width" Value="Auto"></Setter>
            <Setter Property="Height" Value="Auto"></Setter>
            <Setter Property="IsEnabled" Value="True"></Setter>
            <Setter Property="IsPauseEnabled" Value="False"></Setter>
            <Setter Property="IsDeleteEnabled" Value="True"></Setter>
            <Setter Property="IsAutomaticUpload" Value="False"></Setter>
            <Setter Property="IsAppendFilesEnabled" Value="True" />
            <Setter Property="OverwriteExistingFiles" Value="False"></Setter>
            <Setter Property="Background" Value="{StaticResource Upload_Background}" />
            <Setter Property="BorderBrush" Value="{StaticResource Upload_OuterBorder}" />
            <Setter Property="BorderThickness" Value="1" />
            <Setter Property="HorizontalAlignment" Value="Stretch" />
              
            <Setter Property="TargetFolder" Value="UserUploads\DocImport" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="telerikInput:RadUpload">
                        <!-- Upload background decorations -->
                        <Border Grid.RowSpan="4" BorderThickness="{TemplateBinding BorderThickness}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            CornerRadius="{StaticResource Upload_OuterCornerRadius}">
                            <Border BorderThickness="{StaticResource ControlInnerBorder_Thickness}"
                                BorderBrush="{StaticResource Upload_InnerBorder}"
                                CornerRadius="{StaticResource Upload_InnerCornerRadius}">
                                <Grid x:Name="RootElement">
                                    <Grid.RowDefinitions>
                                        <!-- Caption -->
                                        <RowDefinition Height="auto"></RowDefinition>
                                        <!-- Selected Files area -->
                                        <RowDefinition Height="*"></RowDefinition>
                                        <!-- Total Progress -->
                                        <RowDefinition Height="auto"></RowDefinition>
                                        <!-- Command buttons -->
                                        <RowDefinition Height="auto"></RowDefinition>
                                    </Grid.RowDefinitions>
                                    <!-- Header Row -->
                                    <Border Background="{StaticResource ControlHeader_Background}"
                                        BorderBrush="{StaticResource ControlHeader_OuterBorderBrush}"
                                        BorderThickness="1" Margin="-1 -1 -1 0" >
                                        <Border BorderBrush="{StaticResource ControlHeader_InnerBorderBrush}"
                                            BorderThickness="1"/>
                                    </Border>
                                    <!-- header text -->
                                    <TextBlock x:Name="ProgressCaptionText" Margin="12,7,12,6"
                                        Text="Uploading ..."
                                        Foreground="{StaticResource ControlHeader_Foreground}"
                                        telerik:LocalizationManager.ResourceKey="UploadCaptionSelect" />
                                    <!-- error icon -->
                                    <Grid x:Name="IconError" Margin="0,0,10,0"
                                        VerticalAlignment="Center" HorizontalAlignment="Right"
                                        Visibility="Collapsed" Width="14.609" Height="17.97">
                                        <Path Stretch="Fill" Stroke="#FFFFFFFF" Margin="0,1.786,0,3.288"
                                            Data="M577.89149,269.68195 L584.80031,257.78582 591.50111,269.64775 z">
                                            <Path.Fill>
                                                <LinearGradientBrush EndPoint="0.5,0" StartPoint="0.5,1">
                                                    <GradientStop Color="#FFFFC600" Offset="0" />
                                                    <GradientStop Color="#FFFDFF00" Offset="1" />
                                                </LinearGradientBrush>
                                            </Path.Fill>
                                        </Path>
                                        <TextBlock Text="!" Margin="6,4,6,4" Width="Auto" Height="Auto"
                                            TextWrapping="Wrap" FontSize="8" FontWeight="Bold" />
                                    </Grid>
                                    <!-- Selected files container -->
                                    <Border Background="{TemplateBinding Background}" Grid.Row="1"
                                        Grid.RowSpan="2" />
                                    <ScrollViewer x:Name="ScrollViewer" Grid.Row="1" Margin="12,8"
                                        telerik:StyleManager.Theme="{StaticResource Theme}"
                                        BorderThickness="0" VerticalScrollBarVisibility="Auto">
                                        <ItemsPresenter />
                                    </ScrollViewer>
                                    <!-- Total Progress area -->
                                    <Grid x:Name="TotalProgressArea" Visibility="Collapsed" Grid.Row="2"
                                        Margin="0 10 0 10">
                                        <telerik:RadProgressBar MinHeight="20" x:Name="TotalProgressBar"
                                            Height="27" Minimum="0" Maximum="100" Margin="5,0" />
                                        <Grid VerticalAlignment="Center">
                                            <TextBlock x:Name="TotalText" Margin="12, 5" Text="Total 0 Documents"
                                                FontWeight="Bold"
                                                telerik:LocalizationManager.ResourceKey="UploadTotal" />
                                            <TextBlock x:Name="TotalPercentText" FontWeight="Bold"
                                                Margin="5" HorizontalAlignment="Center" Text="0%" />
                                            <TextBlock x:Name="TotalSizeText" FontWeight="Bold"
                                                Margin="5,5,12,5" HorizontalAlignment="Right"
                                                Text="0" />
                                        </Grid>
                                    </Grid>
                                    <!-- Command buttons -->
                                    <!--telerik:LocalizationManager.ResourceKey="UploadCancel"-->
                                    <Border Grid.Row="3" BorderBrush="{StaticResource Upload_BottomPartBorder}"
                                        BorderThickness="{StaticResource Upload_BottomPartBorder_Thickness}"
                                        Background="{StaticResource Upload_BottomPartBackground}">
                                        <Border BorderBrush="{StaticResource Upload_BottomPartInnerBorder}"
                                            BorderThickness="{StaticResource Upload_BottomPartInnerBorder_Thickness}">
                                            <StackPanel Orientation="Horizontal" VerticalAlignment="Center"
                                                HorizontalAlignment="Right" Margin="3">
                                                <Button telerik:StyleManager.Theme="{StaticResource Theme}"
                                                    Margin="5" Padding="15 3" x:Name="CancelButton" Content="Clear"
                                                    Visibility="Collapsed" Width="85" />
                                                <Button
                                                    telerik:StyleManager.Theme="{StaticResource Theme}"
                                                    Margin="5" Padding="15 3" x:Name="UploadButton"
                                                    Content="Upload" Width="85"
                                                    telerik:LocalizationManager.ResourceKey="UploadUpload"
                                                    Visibility="Collapsed" />
                                                <Button
                                                    telerik:StyleManager.Theme="{StaticResource Theme}"
                                                    Margin="5" Padding="15 3" x:Name="PauseButton"
                                                    Content="Pause" Width="85"
                                                    telerik:LocalizationManager.ResourceKey="UploadPause"
                                                    Visibility="Collapsed" />
                                                <Button
                                                    telerik:StyleManager.Theme="{StaticResource Theme}"
                                                    Margin="5" Padding="15 3" x:Name="BrowseButton"
                                                    Content="Browse" Width="85"
                                                    telerik:LocalizationManager.ResourceKey="UploadBrowse" />
                                            </StackPanel>
                                        </Border>
                                    </Border>
                                </Grid>
                            </Border>
                        </Border>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style TargetType="telerikInput:RadUploadDropPanel">
            <!--<Setter Property="AllowDrop" Value="True" />-->
            <Setter Property="Background" Value="Transparent" />
            <Setter Property="BorderThickness" Value="0" />
            <Setter Property="HorizontalContentAlignment" Value="Stretch" />
            <Setter Property="VerticalContentAlignment" Value="Stretch" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="telerikInput:RadUploadDropPanel">
                        <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Padding="{TemplateBinding Padding}">
                            <ContentPresenter
                                Cursor="{TemplateBinding Cursor}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                Content="{TemplateBinding Content}"
                                ContentTemplate="{TemplateBinding ContentTemplate}" />
                        </Border>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <!--Out of the Box Wndows 7 Theme Rad Upload Item for Code Library Reference - BUT NOT USED IN THIS CONTROL -->
        <Style TargetType="telerikInput:RadUploadItem">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="telerikInput:RadUploadItem">
                        <Grid Margin="0,5">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <telerik:RadProgressBar Height="25" MinHeight="20" x:Name="FileProgressBar"
                                Minimum="0" Maximum="100" Grid.ColumnSpan="2" />
                            <TextBlock Text="{TemplateBinding FileName}" HorizontalAlignment="Left"
                                VerticalAlignment="Center" Margin="10 0 0 0" TextWrapping="NoWrap"
                                Grid.Column="0" />
                            <StackPanel Orientation="Horizontal" HorizontalAlignment="Right"
                                VerticalAlignment="Center" Grid.Column="1">
                                <TextBlock Text="{TemplateBinding FileSize}" Margin="8,0,10,0"
                                    TextWrapping="NoWrap" VerticalAlignment="Center" />
                                <Grid VerticalAlignment="Center" x:Name="IconError" Margin="0,0,10,0"
                                    Visibility="Collapsed" Width="14.609" Height="17.97">
                                    <Path Stretch="Fill" Stroke="#FFFFFFFF" Margin="0,1.786,0,3.288"
                                        Data="M577.89149,269.68195 L584.80031,257.78582 591.50111,269.64775 z">
                                        <Path.Fill>
                                            <LinearGradientBrush EndPoint="0.5,0" StartPoint="0.5,1">
                                                <GradientStop Color="#FFFFC600" Offset="0" />
                                                <GradientStop Color="#FFFDFF00" Offset="1" />
                                            </LinearGradientBrush>
                                        </Path.Fill>
                                    </Path>
                                    <TextBlock Text="!" Margin="6,4,6,4" Width="Auto" Height="Auto"
                                        TextWrapping="Wrap" FontSize="8" FontWeight="Bold" />
                                </Grid>
                                <Path VerticalAlignment="Center" x:Name="IconDone" Margin="0,0,10,0"
                                    Stretch="Fill" Visibility="Collapsed" Fill="#FF000000"
                                    Data="M719.90131,266.74252 L728,276.64667 L743.13574,254.96999 L727.96881,271.52853"
                                    Width="12" Height="12" />
                                <Path VerticalAlignment="Center" x:Name="IconDelete" Margin="0,-4,5,0"
                                    Cursor="Hand" Stretch="Fill" Fill="#FF000000"
                                    Data="M5.0000001,0 L7,0 7,5 12,5 12,7 7,7 7,12 5.0000001,12 5.0000001,7 0,7 0,5 5.0000001,5 5.0000001,0 z"
                                    Width="12" Height="12">
                                    <Path.RenderTransform>
                                        <TransformGroup>
                                            <RotateTransform Angle="45" />
                                        </TransformGroup>
                                    </Path.RenderTransform>
                                </Path>
                            </StackPanel>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <!--Rad Upload Item With Our Doc Type Dropdown - USED FOR THIS CONTROL -->
        <Style x:Key="RadUploadItemStyleDocType" TargetType="telerikInput:RadUploadItem">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="telerikInput:RadUploadItem">
                        <Grid Margin="0,5">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="172" MinWidth="172" MaxWidth="172" />
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox x:Name="RadComboBoxDocType" 
                                                 ItemsSource="{Binding DocTypeDataSource, Mode=OneTime}"
                                                 SelectionChanged="RadComboBoxDocType_SelectionChanged" 
                                                 Grid.Column="2" 
                                                 HorizontalAlignment="Left"  
                                                 Margin="5,0,5,0" 
                                                 MinWidth="162" MaxWidth="162" Width="162" 
                                                 IsTabStop="True" 
                                                 Canvas.ZIndex="100">
                            </telerik:RadComboBox>
                            <telerik:RadProgressBar x:Name="FileProgressBar" Height="25"
                                    MinHeight="20" Grid.ColumnSpan="2" Maximum="100" Minimum="0" />
                            <TextBlock HorizontalAlignment="Left" Margin="10 0 0 0"
                                    VerticalAlignment="Center" Grid.Column="0"
                                    Text="{TemplateBinding FileName}" TextWrapping="NoWrap" />
                            <StackPanel HorizontalAlignment="Right" VerticalAlignment="Center"
                                    Grid.Column="1" Orientation="Horizontal">
                                <TextBlock Margin="8,0,10,0" VerticalAlignment="Center"
                                        Text="{TemplateBinding FileSize}" TextWrapping="NoWrap" />
                                <Grid x:Name="IconError" Height="17.97" Margin="0,0,10,0"
                                        VerticalAlignment="Center" Width="14.609"
                                        Visibility="Collapsed">
                                    <Path Stretch="Fill" Stroke="#FFFFFFFF" Margin="0,1.786,0,3.288"
                                            Data="M577.89149,269.68195 L584.80031,257.78582 591.50111,269.64775 z">
                                        <Path.Fill>
                                            <LinearGradientBrush EndPoint="0.5,0" StartPoint="0.5,1">
                                                <GradientStop Color="#FFFFC600" Offset="0" />
                                                <GradientStop Color="#FFFDFF00" Offset="1" />
                                            </LinearGradientBrush>
                                        </Path.Fill>
                                    </Path>
                                    <TextBlock Height="Auto" Margin="6,4,6,4" Width="Auto"
                                            FontSize="8" FontWeight="Bold" Text="!"
                                            TextWrapping="Wrap" />
                                </Grid>
                                <Path x:Name="IconDone" Fill="#FF000000" Stretch="Fill" Height="12"
                                        Margin="0,0,10,0" VerticalAlignment="Center" Width="12"
                                        Visibility="Collapsed"
                                        Data="M719.90131,266.74252 L728,276.64667 L743.13574,254.96999 L727.96881,271.52853" />
                                <Path x:Name="IconDelete" Fill="#FF000000" Stretch="Fill"
                                        Cursor="Hand" Height="12" Margin="0,-4,5,0"
                                        VerticalAlignment="Center" Width="12"
                                        Data="M5.0000001,0 L7,0 7,5 12,5 12,7 7,7 7,12 5.0000001,12 5.0000001,7 0,7 0,5 5.0000001,5 5.0000001,0 z">
                                    <Path.RenderTransform>
                                        <TransformGroup>
                                            <RotateTransform Angle="45" />
                                        </TransformGroup>
                                    </Path.RenderTransform>
                                </Path>
                            </StackPanel>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </UserControl.Resources>


    Thanks,
    Randy
  2. Alex Fidanov
    Admin
    Alex Fidanov avatar
    636 posts

    Posted 15 Mar 2011 Link to this post

    Hello Randy,

    We did change the style of the RadUpload and the RadUploadItem. We made a refactoring on the UI related code by making it more SL4 friendly. We added VisualStateManager, commands, routed events, etc. I am attaching the new template and you should have no issues using it. Please let me know if you still have questions on this matter.

    Regards,
    Alex Fidanov
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  3. DevCraft banner
Back to Top