Telerik Forums
UI for WPF Forum
3 answers
177 views
Hi,
I am using the carousel control to implement a media center like menu for my application. The main menu items should scroll vertically with the current item in the centre and the sub items should then appear below it and be chooseable. The priority is on easy keyboard navigation.

The problems I am facing are:

1) Styling the carousel seems to be incredibly difficult. Just having the main menu item description with a list of sub items is even difficult to do. Adding additional elements to the data template seems to stop the sub items from rendering.

2) Keyboard navigation does not work correctly. I'd like the main menu to scroll on Up / Down and the sub menu to scroll on Left / Right. Unfortunately, only the currently focused carousel panel will scroll and it then scrolls on all arrow key presses.

The control seems to have such a steep learning curve that I'm tempted to ditch it and write my own custom control - albeit without some of the nice scrolling effects that your control brings.

I've attached my attempt below, it is based on a sample I saw on this site. Any help would be appreciated.

    <UserControl.Resources>
        <Path
          x:Key="horizontalPath"
          Stretch="None"
          Opacity="1"
          Data="M0,0 C0,0 0,800 0,800"
          Stroke="#FFB4B4B4"
          StrokeThickness="4">
        </Path>
        <DataTemplate DataType="{x:Type local:Message}">
                <telerik:CarouselScrollViewer CanContentScroll="True" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden">
<!-- putting in a header here stops the child panel from rendering correctly -->
                    <telerik:RadCarouselPanel Loaded="RadCarouselPanel_Loaded" CanVerticallyScroll="False" TopContainerChanged="RadCarouselPanel_TopContainerChanged_1">
                        <Button Content="menu1"/>
                        <Button Content="menu2"/>
                        <Button Content="menu3"/>
                        <Button Content="menu4"/>
                        <Button Content="menu5"/>
                        <Button Content="menu6"/>
                    </telerik:RadCarouselPanel>
            </telerik:CarouselScrollViewer>
        </DataTemplate>
        <Style TargetType="{x:Type telerik:CarouselItem}">
            <Setter Property="MaxHeight" Value="1000"/>
            <Setter Property="MaxWidth" Value="1000"/>
            <Setter Property="Height" Value="200"/>
            <Setter Property="Width" Value="400"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="telerik:CarouselItem">
                        <Border x:Name="mainBorder">
                            <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>
                        </Border>
                        <ControlTemplate.Triggers>
<!-- IsSelected does not appear to fire -->
                            <Trigger Property="IsSelected" Value="True" >
                                <Setter TargetName="CarouselItemInnerBorder" 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>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </UserControl.Resources>
    <Grid>
        <telerik:RadCarousel x:Name="radCarousel" AutoGenerateDataPresenters="False" Loaded="radCarousel_Loaded" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden">
            <telerik:RadCarousel.ItemsPanel>               
                <ItemsPanelTemplate>
                    <telerik:RadCarouselPanel x:Name="radCarouselPanel" IsScalingEnabled="True" IsOpacityEnabled="False" CanHorizontallyScroll="False" TopContainerChanged="RadCarouselPanel_TopContainerChanged" >                       
                    </telerik:RadCarouselPanel>
                </ItemsPanelTemplate>
            </telerik:RadCarousel.ItemsPanel>
        </telerik:RadCarousel>
    </Grid>
</UserControl>
Milan
Telerik team
 answered on 27 Jan 2011
2 answers
291 views
Is it possible to have the predefined prompt window default focus to the input textbox? If so could you please give an example I have tryed looking into the Opened event and finding a property or looking at the UIElements without success finding the particular control that captures input.
Patrick VADEL
Top achievements
Rank 1
 answered on 27 Jan 2011
2 answers
477 views
Hello,
I am trying to recreate the performance "Live Data" example that is provided in the demos application. I am working with VS2010 .net 4.0 in VB.

My problem is in compiling the application i get the following error.

Error 1 Unknown build error, 'Cannot resolve dependency to assembly 'Telerik.Windows.Data, Version=2010.3.1314.40, Culture=neutral, PublicKeyToken=5803cfa389c90ce7' because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event. Line 16 Position 50.'  C:\Users\Paul Wheeler\documents\visual studio 2010\Projects\Telerik Chart Live Data\Telerik Chart Live Data\Example.xaml 16 50 Telerik Chart Live Data.

is there a simple VB example that is available.
I looked at the VB example that came with the download but it is in C#.

Thanks

Paul
Top achievements
Rank 1
 answered on 27 Jan 2011
5 answers
124 views
I have a gridview in my application and I get the following error

System.InvalidOperationException was unhandled
Message: Root AdornerLayer Not Found. Please make sure that your root visual is Window or other element that has an adorner layer. Alternatively, wrap your root panel in an <AdornerDecorator> element.

The structure of the application is as follows

UserControl
-DockPanle
--Grid
---GridView

The user control is loaded in
RadRibbonWindow
-DockPanl
--The Usercontrol

Do I need to changes something in the structure to be able to do the drag and drop?
Tsvyatko
Telerik team
 answered on 27 Jan 2011
4 answers
162 views
Hi there,

is there any way to select a whole column by clicking the column-header?
I can not find any option to do that.

Greetings
Andi
Top achievements
Rank 2
 answered on 27 Jan 2011
1 answer
47 views
Hi

I am having an Error message : "GridViewDataControl_ColumnDisplayIndexOutOfRange Sales Use
Parameter name: displayIndex"
foreach (ColumnSetting setting in Settings.ColumnSettings)
                    {
                        GridViewDataColumn column = new GridViewDataColumn();
                        column.UniqueName = setting.UniqueName;
                        column.Header = setting.Header;
                        column.DisplayIndex = setting.DisplayIndex;
                        if (setting.Width != null)
                        {
                            column.Width = new GridViewLength(setting.Width.Value);
                              
                        }
  
                        grid.Columns.Add(column);
                    }


Maya
Telerik team
 answered on 27 Jan 2011
2 answers
153 views
Hi,

Does anyone know how to create multiple instances of radwindow? I need to create an MDI window (but not a docking).

thanks
George
Telerik team
 answered on 27 Jan 2011
1 answer
88 views
Hello,
I have a problem with horizontal scrolling in the gridview.
I'm using the gridview with some premade columns and some columns that are added in code behind.
For filling in those programmaticly added columns I'm using a CellTemplate, because the value in each cell depends on column header and row item properties.
So, everything works just fine until the horizontal scroll. After it in some cells of the programmaticly added columns values from the premade columns appear.
With out celltemplate nothing like that happens.
Could you please help me?
Milan
Telerik team
 answered on 27 Jan 2011
2 answers
102 views
Hi there, 

I have a quick request - I'd like to bind a custom Command to a HeaderCloseButton on a pane docked on the left, top, bottom or top (ie: not as document). Any ideas how to do this?

I have achieved the same for tabbed documents by overriding the Pane HeaderTemplate as follows:

<!-- Define the style for component item headers -->
            <DataTemplate x:Key="PaneHeaderTemplate">
                <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
                    <TextBlock Text="{Binding ComponentDisplayName}"/>
                    <Button Command="{Binding CloseComponentCommand}" Style="{StaticResource ReportButtonStyle}"
                            Margin="10,0,0,0" ToolTipService.ToolTip="Remove Component">
                        <Button.Content>
                            <Path Data="M0,0 L6,6 M6, 0 L0,6" Stroke="Black" StrokeThickness="1"
                                    SnapsToDevicePixels="True" />
                        </Button.Content>
                    </Button>
                </StackPanel>
            </DataTemplate>

However modifying the TitleTemplate only changes the title area, not buttons on the pane. 

Any ideas? 

thanks!
Andrew Thompson
Top achievements
Rank 1
 answered on 27 Jan 2011
1 answer
119 views
Is it possible to duplicate a selected RadPade (with it's content inside) programatically?
Pana
Telerik team
 answered on 27 Jan 2011
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?