Telerik Forums
UI for WPF Forum
1 answer
144 views
Hi everybody.

I need a suggestion on this issue: I got an object list that I use as itemssource for Carousel. Those objects inside list includes some strings and the image, which comes from a query that, unfortunately, takes very long time due to dimension of images.
The only way to make it faster is to remove image field from the output of the query and set it to null: in this way, obviously, my carouselitems will be without photo.

Now, how can I manage an event (e.g. Click) inside the elements  of my ControlTemplate of my corouselItem? I would like to have something like a "deferred image loading", so the user will see many carouselItem without photo, but when he clicks on the item inside the eventhandler a single specific query will be done for only the image selected (so faster).

I made carouselItem following telerik sample code:



            <Style TargetType="{x:Type telerik:CarouselItem}">  
                <Setter Property="Height" Value="500" /> 
                <Setter Property="Width" Value="500" /> 
                <Setter Property="MaxHeight" Value="550" /> 
                <Setter Property="Template">  
                    <Setter.Value> 
                        <ControlTemplate TargetType="{x:Type telerik:CarouselItem}" > 
                            <Grid ClipToBounds="False" Height="350" Width="300">  
                                <Border RenderTransformOrigin="0.5, 1" ClipToBounds="False" 
                                        Width="{Binding ElementName=CarouselItemInnerGrid, Path=ActualWidth}" 
                                        Opacity="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ReflectionSettings.Opacity}" 
                                        Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ReflectionSettings.Visibility}" 
                                        BorderBrush="White" BorderThickness="0">  
                                    <Border.RenderTransform> 
                                        <TransformGroup> 
                                            <ScaleTransform ScaleX="{Binding RelativeSource={RelativeSource TemplatedParent},   
                                                        Path=ReflectionSettings.WidthOffset,   
                                                        Converter={StaticResource ArithmeticValueConverter},   
                                                        ConverterParameter=1}" ScaleY="{Binding RelativeSource={RelativeSource TemplatedParent},   
                                                        Path=ReflectionSettings.HeightOffset,   
                                                        Converter={StaticResource ArithmeticValueConverter},   
                                                        ConverterParameter=-1}"  
                                                    CenterY="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ReflectionSettings.OffsetY}" /> 
                                            <TranslateTransform  
                                                    X="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ReflectionSettings.OffsetX}" /> 
                                            <SkewTransform  
                                                    AngleX="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ReflectionSettings.Angle}" /> 
                                        </TransformGroup> 
 
                                    </Border.RenderTransform> 
                                    <Border.OpacityMask> 
                                        <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">  
                                            <LinearGradientBrush.GradientStops> 
                                                <GradientStop  
                                                        Offset="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ReflectionSettings.HiddenPercentage}" 
                                                        Color="Transparent" /> 
                                                <GradientStop Offset="1" Color="Black" /> 
                                            </LinearGradientBrush.GradientStops> 
                                        </LinearGradientBrush> 
                                    </Border.OpacityMask> 
                                    <Border.Background> 
                                        <VisualBrush  
                                                Visual="{Binding ElementName=CarouselItemInnerGrid}">  
                                        </VisualBrush> 
                                    </Border.Background> 
 
                                </Border> 
 
                                <Grid x:Name="CarouselItemInnerGrid">  
                                    <Border x:Name="CarouselItemMainBorder" Opacity="0.5" 
                                            BorderBrush="#FF91B3FF" BorderThickness="1,1,1,1" 
                                            CornerRadius="5,5,5,5" SnapsToDevicePixels="True">  
                                        <Border.Background> 
                                            <LinearGradientBrush EndPoint="108,472" 
                                                    StartPoint="108,23" MappingMode="Absolute">  
                                                <GradientStop Color="#FF2C3A68" Offset="0" /> 
                                                <GradientStop Color="#FF000000" Offset="1" /> 
                                                <GradientStop Color="#FF0F224C" Offset="0.045" /> 
                                                <GradientStop Color="#FF000000" Offset="0.0451" /> 
                                            </LinearGradientBrush> 
                                        </Border.Background> 
                                    </Border> 
                                    <Border Opacity="1" BorderBrush="#3F000000" 
                                            BorderThickness="1,1,1,1" CornerRadius="5,5,5,5" 
                                            Margin="10,10,10,10" x:Name="CarouselItemInnerBorder" 
                                            SnapsToDevicePixels="True">  
                                        <Border.Background> 
                                            <LinearGradientBrush EndPoint="101,462" 
                                                    StartPoint="101,13" MappingMode="Absolute">  
                                                <GradientStop Color="#FF2C3A68" Offset="0" /> 
                                                <GradientStop Color="#FF000000" Offset="1" /> 
                                                <GradientStop Color="#FF0F224C" Offset="0.045" /> 
                                                <GradientStop Color="#FF000000" Offset="0.0451" /> 
                                            </LinearGradientBrush> 
                                        </Border.Background> 
                                        <ContentPresenter IsHitTestVisible="True" /> 
                                        <Border.Triggers> 
 
                                        </Border.Triggers> 
                                    </Border> 
                                </Grid> 
                            </Grid> 
 
                            <ControlTemplate.Triggers> 
                                <MultiTrigger> 
                                    <MultiTrigger.Conditions> 
                                        <Condition Property="IsSelected" Value="False" /> 
                                        <Condition Property="IsMouseOver" Value="True" /> 
                                    </MultiTrigger.Conditions> 
                                    <MultiTrigger.EnterActions> 
                                        <BeginStoryboard> 
                                            <Storyboard> 
                                                <ColorAnimation  
                                                        Storyboard.TargetName="CarouselItemMainBorder" 
                                                        Storyboard.TargetProperty="Background.GradientStops[0].Color" 
                                                        To="#FF344B97" Duration="0:0:0.3" /> 
                                                <ColorAnimation  
                                                        Storyboard.TargetName="CarouselItemMainBorder" 
                                                        Storyboard.TargetProperty="Background.GradientStops[2].Color" 
                                                        To="#FF233F7E" Duration="0:0:0.3" /> 
                                                <ColorAnimation  
                                                        Storyboard.TargetName="CarouselItemInnerBorder" 
                                                        Storyboard.TargetProperty="Background.GradientStops[0].Color" 
                                                        To="#FF344B97" Duration="0:0:0.3" /> 
                                                <ColorAnimation  
                                                        Storyboard.TargetName="CarouselItemInnerBorder" 
                                                        Storyboard.TargetProperty="Background.GradientStops[2].Color" 
                                                        To="#FF233F7E" Duration="0:0:0.3" /> 
                                            </Storyboard> 
                                        </BeginStoryboard> 
 
                                    </MultiTrigger.EnterActions> 
                                    <MultiTrigger.ExitActions> 
                                        <BeginStoryboard> 
                                            <Storyboard FillBehavior="Stop">  
                                                <ColorAnimation  
                                                        Storyboard.TargetName="CarouselItemMainBorder" 
                                                        Storyboard.TargetProperty="Background.GradientStops[0].Color" 
                                                        To="#FF2C3A68" Duration="0:0:0.3" /> 
                                                <ColorAnimation  
                                                        Storyboard.TargetName="CarouselItemMainBorder" 
                                                        Storyboard.TargetProperty="Background.GradientStops[2].Color" 
                                                        To="#FF0F224C" Duration="0:0:0.3" /> 
                                                <ColorAnimation  
                                                        Storyboard.TargetName="CarouselItemInnerBorder" 
                                                        Storyboard.TargetProperty="Background.GradientStops[0].Color" 
                                                        To="#FF2C3A68" Duration="0:0:0.3" /> 
                                                <ColorAnimation  
                                                        Storyboard.TargetName="CarouselItemInnerBorder" 
                                                        Storyboard.TargetProperty="Background.GradientStops[2].Color" 
                                                        To="#FF0F224C" Duration="0:0:0.3" /> 
                                            </Storyboard> 
                                        </BeginStoryboard> 
                                    </MultiTrigger.ExitActions> 
                                </MultiTrigger> 
 
                                <Trigger Property="IsSelected" Value="True">  
                                    <Setter TargetName="CarouselItemMainBorder" 
                                            Property="Background">  
                                        <Setter.Value> 
                                            <LinearGradientBrush EndPoint="108,472" 
                                                    StartPoint="108,23" MappingMode="Absolute">  
                                                <GradientStop Color="#FF344B97" Offset="0" /> 
                                                <GradientStop Color="#FF000000" Offset="1" /> 
                                                <GradientStop Color="#FF233F7E" Offset="0.045" /> 
                                                <GradientStop Color="#FF000000" Offset="0.0451" /> 
                                            </LinearGradientBrush> 
                                        </Setter.Value> 
                                    </Setter> 
                                    <Setter TargetName="CarouselItemInnerBorder" 
                                            Property="Background">  
                                        <Setter.Value> 
                                            <LinearGradientBrush EndPoint="101,462" 
                                                    StartPoint="101,13" MappingMode="Absolute">  
                                                <GradientStop Color="#FF344B97" Offset="0" /> 
                                                <GradientStop Color="#FF000000" Offset="1" /> 
                                                <GradientStop Color="#FF233F7E" Offset="0.045" /> 
                                                <GradientStop Color="#FF000000" Offset="0.0451" /> 
                                            </LinearGradientBrush> 
                                        </Setter.Value> 
                                    </Setter> 
                                </Trigger> 
 
                            </ControlTemplate.Triggers> 
                        </ControlTemplate> 
                    </Setter.Value> 
                </Setter> 
            </Style> 
            <Style TargetType="{x:Type telerik:CarouselDataRecordPresenter}">  
                <Setter Property="Template">  
                    <Setter.Value> 
                        <ControlTemplate TargetType="{x:Type telerik:CarouselDataRecordPresenter}">  
                            <Grid IsHitTestVisible="False" HorizontalAlignment="Stretch" 
                                    VerticalAlignment="Stretch">  
                                <Grid.RowDefinitions> 
                                    <RowDefinition Height="35" /> 
                                    <RowDefinition Height="260" /> 
                                    <RowDefinition Height="Auto" /> 
                                </Grid.RowDefinitions> 
                                <StackPanel Grid.Row="0" Orientation="Horizontal" 
                                        VerticalAlignment="Center">  
                                    <Label Content="Data: " Foreground="#ff8FB3FF" FontSize="12" Margin="10,0,0,0" /> 
                                    <Label Content="{Binding Path=PlateDate, Converter={StaticResource DateConversion}}" 
                                            Foreground="#ff8FB3FF" FontSize="12" /> 
                                    <Label Content="Ora: " Foreground="#ff8FB3FF" FontSize="12" Margin="50,0,0,0"/>  
                                    <Label Content="{Binding Path=PlateTime, Converter={StaticResource TimeConversion}}" 
                                            Foreground="#ff8FB3FF" FontSize="12" /> 
                                </StackPanel> 
                                <Rectangle Grid.Row="1" RadiusX="3" RadiusY="3" Width="260" 
                                        Height="245">  
                                    <Rectangle.Fill> 
                                        <ImageBrush x:Name="brush" 
                                                ImageSource="{Binding Path=PlateImage}" /> 
                                    </Rectangle.Fill> 
                                </Rectangle> 
                                <StackPanel Grid.Row="2" Orientation="Horizontal" 
                                        VerticalAlignment="Center">  
                                    <Label Content="TARGA: " Foreground="#ff8FB3FF" FontSize="12" /> 
                                    <Label Content="{Binding Path=LicensePlate}" FontSize="12" 
                                            Foreground="#ff8FB3FF" /> 
                                </StackPanel> 
                            </Grid> 
                        </ControlTemplate> 
                    </Setter.Value> 
                </Setter> 
            </Style> 
Milan
Telerik team
 answered on 24 Mar 2010
1 answer
99 views
I upgraded to the latest 2010 WPF RadCharts and the custom colors for the series are not displayed anymore.  I was doing this for a pie chart and a bar chart that needed specific green and red colors.  Now it displays what I assume is the default colors.  Here is the style for the pie chart, it is similar for the bar chart.  How do I get this to work with the new Charting. 

<Grid.Resources> 
    <SolidColorBrush x:Key="CustomBrush" Color="#FF4ED843" /> 
    <SolidColorBrush x:Key="CustomBrush2" Color="#FFFF9393" /> 
 
    <TelerikCharting:StylesPalette x:Key="{TelerikControls:ThemeResourceKey ElementType={x:Type TelerikCharting:ChartArea}, ResourceId={x:Static TelerikCharting:ResourceHelper.ResourceKeyRadialStyle}, ThemeType={x:Type TelerikControls:Office_BlackTheme}}">  
    <Style TargetType="{x:Type Shape}">  
        <Setter Property="Stroke" Value="Gray" /> 
        <Setter Property="StrokeThickness" Value="1" /> 
        <Setter Property="Fill" Value="{DynamicResource CustomBrush}" /> 
    </Style> 
    <Style TargetType="{x:Type Shape}">  
        <Setter Property="Stroke" Value="Gray" /> 
        <Setter Property="StrokeThickness" Value="1" /> 
        <Setter Property="Fill" Value="{DynamicResource CustomBrush2}" /> 
    </Style> 
    </TelerikCharting:StylesPalette> 
 
</Grid.Resources> 
 
Sia
Telerik team
 answered on 24 Mar 2010
3 answers
154 views
No documentation for TransitionControl, no for WPF, no for Silverlight etc??? How do you think we can use it?
Valeri Hristov
Telerik team
 answered on 24 Mar 2010
7 answers
161 views
Hi,

I'm looking at my application and the QSF demos, and am seeing a similar thing happening with RadCarousel.  When you scroll into selection the item on either side of a RadCarousel, it correctly looks focused and selected.  However, on either end of the RadCarousel, you can scroll beyond the last item.  On the Carousel/First Look demo (WPF Q1 2009 SP2), you can scroll three extra notches to the left of "Ann Devon" and three extra notches to the right of "Ana Trujillo."  Thus it seems like there are six "ghost items" in the carousel.  I'm sure you have noticed this, since it is in the QSF itself.  However, I'm wondering, is there any way to disable this in my own RadCarousel (a property or something)?  Personally I think it looks a little weird to be able to scroll past either end of the list of items.  I'd love it if anybody could help me out getting rid of these ghost items!

Also, there's a bit of a quirk with these ghost items - I'm looking again at the Carousel/First Look example.  When an extrememost item is selected (in this case, Ann Devon or Ana Trujillo) by (single or double) clicking on it, scroll out into the ghost items.  You now cannot double click the extrememost item to bring that item in front and in focus.  Now scroll back and (single/double) click on either Georg Pipps or Christina Berglund to bring them front and center.  Now, without clicking on other items (i.e., use the scroll wheel on the mouse or the scroll buttons on the carousel), scroll out to the ghost items (this is, of course, the only way to scroll out into the ghost items, using the mouse or the buttons).  You will now be able to double click on one of the extrememost items and zoom back into the regular items list.  Sorry if my instructions to replicate this are a little foggy... you may need to scroll as far left or as far right into the ghost items as possible in order to see these effects.  However, even if this is a little unclear, it is totally happening every time on my machine and is just a little bit of a bug I think.  I hope it's not just me! :)

Thanks,

UIdev
Milan
Telerik team
 answered on 24 Mar 2010
1 answer
120 views
In trying out the WPF stuffs, I've noticed there a string for TransitionControl.Transition, instead of enumeration.  Why?
And, what are the acceptable values.
Miroslav Nedyalkov
Telerik team
 answered on 24 Mar 2010
4 answers
122 views
1) Is there a way to have the currentcell enter edit mode when the user starts typing input?

2) Is there a way to move to the next column when the user presses enter?
Nedyalko Nikolov
Telerik team
 answered on 24 Mar 2010
1 answer
91 views
I want to download trial version of WPF Rad Controls. I find that it takes long time (more than an hour) and in the end hangs.
Finally am not able to download the trial software.
Any suggestions??

Regards,
Sandhya
Nikolay
Telerik team
 answered on 24 Mar 2010
5 answers
84 views
I have a RadPane blocking the correct compass, so instead of docking to a higher level, my window becomes a peer to the RadPane within the RadPane to which I want to dock.
Please help.
Miroslav Nedyalkov
Telerik team
 answered on 24 Mar 2010
1 answer
543 views
I have been fighting with this for the last two hours, reading other posts on it, editing a copy of the itemtemplate.  Basically, I like the RadPanelBar, but I really don't like the mouseover effect on the background.  I don't know if this is the Panel its self or the Item.  But I have to get rid of this.  I have a hard blue background with a listbox.  When I hover over to select a listbox item, the background turns yellowish which looks terrible.  Again, I read the other post about specifically taking over the triggers for the RadPanelBarItem, but it has no effect.

Here is my code.  Try it yourself and you will see the very bad yellow trigger effect.  I don't want it to change. I want it to stay the dark blue the entire time.

 

 

 

<Grid>

 

 

 

 

<Grid.Background>

 

 

 

 

<RadialGradientBrush>

 

 

 

 

<GradientStop Color="#FF3A7198" Offset="0.982"/>

 

 

 

 

<GradientStop Color="#FF365D7A" Offset="0.029"/>

 

 

 

 

</RadialGradientBrush>

 

 

 

 

</Grid.Background>

 

 

 

 

<telerikNavigation:RadPanelBar VerticalAlignment="Stretch" x:Name="radPanelBar" Background="Transparent">

 

 

 

 

<telerikNavigation:RadPanelBarItem>

 

 

 

 

<telerikNavigation:RadPanelBarItem.Header>

 

 

 

 

<TextBlock Text="Workflow Templates" Margin="5 4 5 5" />

 

 

 

 

</telerikNavigation:RadPanelBarItem.Header>

 

 

 

 

<ListBox x:Name="lstWorkFlowTemplates"

 

 

 

SelectionChanged="lstTemplates_SelectionChanged"

 

 

 

Background="Transparent"

 

 

 

BorderThickness="0"

 

 

 

IsSynchronizedWithCurrentItem="True"/>

 

 

 

 

</telerikNavigation:RadPanelBarItem>

 

 

 

 

<telerikNavigation:RadPanelBarItem>

 

 

 

 

<telerikNavigation:RadPanelBarItem.Header>

 

 

 

 

<TextBlock Text="Column Templates" Margin="5 4 5 5" />

 

 

 

 

</telerikNavigation:RadPanelBarItem.Header>

 

 

 

 

<ListBox x:Name="lstTemplates"

 

 

 

SelectionChanged="lstTemplates_SelectionChanged"

 

 

 

Background="Transparent"

 

 

 

BorderThickness="0"

 

 

 

IsSynchronizedWithCurrentItem="True"/>

 

 

 

 

</telerikNavigation:RadPanelBarItem>

 

 

 

 

</telerikNavigation:RadPanelBar>

 

 

 

 

</Grid>

 

Dimitrina
Telerik team
 answered on 24 Mar 2010
3 answers
160 views
I would like to known if

RadBook is avaiable to WPF ( windows ) Application .

Bobi
Telerik team
 answered on 24 Mar 2010
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Expander
Slider
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?