Telerik Forums
UI for WPF Forum
4 answers
123 views

Hi,
I'm trying to use this control, but I'm finding many problems and lose much time because I do not understand what is working and what is not.
I'm trying to run these events need to manage running some limitation that I want to impose on any of these items dynamically but it seems that events need not work.
It 'possible that these events are not implemented?

PreviewDragEnter
PreviewDragLeave
DragEnter
DragLeave

Thanks Marcello

Tina Stancheva
Telerik team
 answered on 15 Jun 2010
5 answers
227 views
DEFINE TEMPLATE

        <DataTemplate x:Key="MiaSubCategoria">
            <StackPanel Orientation="Horizontal">
                   <TextBlock Text="{Binding Nome}"/>
            </StackPanel>
        </DataTemplate>
        
       <HierarchicalDataTemplate x:Key="MiaCategoria"
                                 ItemTemplate="{StaticResource MiaSubCategoria}"
                                 ItemsSource="{Binding SubCategorie}">
            <StackPanel Orientation="Horizontal">
                <TextBlock Text="{Binding Nome}"/>
            </StackPanel>
        </HierarchicalDataTemplate>

 
SET TREEVIEW:

      <telerikNavigation:RadTreeView Canvas.Left="62" Canvas.Top="25" Height="137" Name="RadTreeView1" Width="486"  IsSingleExpandPath="True" TextDropAfter="Dopo" TextDropBefore="Prima" TextDropIn="In mezzo a" AllowDrop="True" IsDragDropEnabled="True" HorizontalContentAlignment="Stretch" IsExpandOnDblClickEnabled="False" IsExpandOnSingleClickEnabled="True" ItemTemplate="{StaticResource MiaCategoria}"/>


VB CODE FOR POPULATING TREE

Dim
miacollez As ObservableCollection(Of Categorie)

 

miacollez =

New ObservableCollection(Of Categorie)(MyEDM.Categorie.Include("SubCategorie"))

 

 

Me.RadTreeView1.ItemsSource = miacollez

 

 


Hi, I need clarification on how to handle correctly the label called DragTooltipText because I can not set the field name but I associate the name of dataobject (look image in attach). I tried with the styles but does not work .. I can only change colors but the content changes runtime clearly as I do?

Thanks for your cooperation

Marcello

PS: Sorry for my english

Tina Stancheva
Telerik team
 answered on 15 Jun 2010
1 answer
245 views
Hello,

I am using the latest version of the RadControls and the code in the WPF MVVM Support example to create a horizontal bar chart.  The example shows different colors in a regular bar chart, however, when I change it to a horizontal bar definition the fill colors in the rectangles disappear. What is the syntax for creating custom colors in a horizontal bar chart?  Is this possible?

Thank you.
Sia
Telerik team
 answered on 15 Jun 2010
3 answers
95 views
The RadGridView CanUserSelect property no longer works as of WPF controls version 2010_1_0603. This problem is visible in your online demo in the "overview/selection" section.

-Mark
Milan
Telerik team
 answered on 15 Jun 2010
1 answer
110 views
Hi team,
I have defined RadGridView as follows:
 

<

 

GroupBox Header="Available Parts" DockPanel.Dock="Left">

 

 

 

 

<telerik:RadGridView Name="AvailablePartsGrid"

 

 

 

Width="390"

 

 

 

UseAlternateRowStyle="True"

 

 

 

AutoGenerateColumns="False"

 

 

 

MultipleSelect="True"

 

 

 

ColumnsWidthMode="None"

 

 

 

ShowGroupPanel="False"

 

 

 

CanUserResizeColumns="False"

 

 

 

CanUserFreezeColumns="False"

 

 

 

FrozenColumnCount="1"

 

 

 

 

 

 

ItemsSource="{Binding AvailableParts}"

 

 

 

 

local:RadGridViewExtension.SelectedItemsSource="{Binding AvailableSelectedItems,Mode=TwoWay}">

 

 

 

 

<telerik:RadGridView.Columns>

 

 

 

 

<telerik:GridViewDataColumn DataType="{x:Null}" IsReadOnly="True" IsVisible="True" IsFilterable="False" IsGroupable="False" IsSortable="True" MinWidth="60" UniqueName="PartNumber" Header="Part #" />

 

 

 

 

<telerik:GridViewDataColumn DataType="{x:Null}" IsReadOnly="True" IsVisible="True" IsGroupable="True" IsSortable="True" UniqueName="Description" MinWidth="300" Header="Description"/>

 

 

 

 

</telerik:RadGridView.Columns>

 

 

 

 

<telerik:RadGridView.SortDescriptors>

 

 

 

 

<telerik:SortDescriptor Member="PartNumber" SortDirection="Descending" />

 

 

 

 

</telerik:RadGridView.SortDescriptors>

 

 

 

 

</telerik:RadGridView>

 

 

 

 

</GroupBox>

The problem is it shows the horizontal scroll bar with the desired width and at extreme left for the very first time but once the bar is moved and the source is updated, the scrollbar remains there rather than going to the extreme left (its default position), and its size also is not recalculated.

 

 

Maya
Telerik team
 answered on 15 Jun 2010
3 answers
174 views
Hi,

I am trying to use several radcontextmenu on same xaml page. And graphically it works fine . But on my output I have serveral errors  :

 

 
System.Windows.Data Error: 4 : Cannot find source for binding with reference   
'RelativeSource FindAncestor,   
AncestorType='Telerik.Windows.Controls.RadContextMenu'AncestorLevel='1''.   
BindingExpression:Path=DataContext.SelectIrisV2CodesCommand; DataItem=null;   
target element is 'EventToCommand' (HashCode=11696593); target property is   
'Command' (type 'ICommand')


This error happens when i open successively two different radcontextmenu.
Scenario :
- The first radcontextMenu clicked on, contains only leaves
- The second radcnctextMenu clicked on, contains on first level only root nodes (Role = Submenuheader?)

Below the code of my page :

 

 

<Style x:Key="IrisRadMenuItemStyle" TargetType="{x:Type telerik:RadMenuItem}">   
     <Setter Property="Template">   
        <Setter.Value> 
            <ControlTemplate TargetType="{x:Type telerik:RadMenuItem}">   
                <Grid x:Name="RootElement" Background="{TemplateBinding Background}" Margin="2" >   
                    <i:Interaction.Triggers>   
                        <i:EventTrigger EventName="MouseLeftButtonDown">   
                            <cmd:EventToCommand Command="{Binding DataContext.SelectIrisV2CodesCommand, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerikNavigation:RadContextMenu}}, Mode=OneWay}" CommandParameter="{Binding}" />   
                        </i:EventTrigger>   
                    </i:Interaction.Triggers> 
                        ...   
 
         </Setter.Value>   
    </Setter>   
    <Style.Triggers>   
        <Trigger Property="Role" Value="SubmenuHeader">   
            <Setter Property="Template">   
 
                <Setter.Value>   
                    <ControlTemplate TargetType="{x:Type telerik:RadMenuItem}">   
                    <Grid x:Name="RootElement" Background="{TemplateBinding Background}" Margin="2">   
                    <i:Interaction.Triggers> 
                        <i:EventTrigger EventName="MouseEnter">   
                            <cmd:EventToCommand Command="{Binding DataContext.ShowIrisCommand, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerikNavigation:RadContextMenu}}, Mode=OneWay}" CommandParameter="{Binding}" />   
 
                        </i:EventTrigger>   
                    </i:Interaction.Triggers> 
                    ...  
        </Trigger>   
    </Style.Triggers>   
</Style>   
 
<ToggleButton Grid.Row="1" Grid.Column="2" Width="20" IsChecked="{Binding IsOpen, ElementName=Nav, Mode=TwoWay}">  
    <telerikNavigation:RadContextMenu.ContextMenu > 
        <telerikNavigation:RadContextMenu EventName="MouseLeftButtonDown" Name="Nav"   
ItemContainerStyle="{DynamicResource IrisRadMenuItemStyle}" Style="{DynamicResource IrisRadContextMenuStyle}" ItemsSource="{Binding IrisCodes}" >   
 
            <telerikNavigation:RadContextMenu.ItemTemplate>   
                <HierarchicalDataTemplate ItemsSource="{Binding IrisCodes}" />   
            </telerikNavigation:RadContextMenu.ItemTemplate>   
        </telerikNavigation:RadContextMenu>   
    </telerikNavigation:RadContextMenu.ContextMenu>   
    <Image Source="/Solmis.Client;component/Images/16/view.png" />   
</ToggleButton>   
 
 
...  
 
 
<ToggleButton Grid.Row="2" Grid.Column="2" Width="20" IsChecked="{Binding IsOpen, ElementName=NavCOE, Mode=TwoWay}">   
    <telerikNavigation:RadContextMenu.ContextMenu >   
        <telerikNavigation:RadContextMenu EventName="MouseLeftButtonDown" Name="NavCOE"   
ItemContainerStyle="{DynamicResource IrisRadMenuItemStyle}" Style="{DynamicResource IrisRadContextMenuStyle}" ItemsSource="{Binding IrisCodes}" >   
 
            <telerikNavigation:RadContextMenu.ItemTemplate>   
                <HierarchicalDataTemplate ItemsSource="{Binding IrisCodes}" />   
            </telerikNavigation:RadContextMenu.ItemTemplate>   
        </telerikNavigation:RadContextMenu>   
    </telerikNavigation:RadContextMenu.ContextMenu>   
 
    <Image Source="/Solmis.Client;component/Images/16/view.png" />   
 
</ToggleButton> 

 

 

 


It seams there is only one instance of RadContextMenu for all RadContextMenu i have in my page.. If it's the case, i would know why the role=sumbmenuheader style is also applied on leaves ?

Thank you in advance for your help

Vlad
Telerik team
 answered on 15 Jun 2010
1 answer
98 views
I'd like the ScrollMode to allow us to scroll horizontally in deferred mode and vertically in RealTime, or vice-versa.
Vlad
Telerik team
 answered on 15 Jun 2010
3 answers
119 views
Hi All,

I have previously used an ArrayList as the ItemSource for my chart, this worked correctly
RadChart1.ItemSource = GetData(); 
Where GetData returned the ArrayList.

I know would like to customise the layout of my RadChart, I have done this in XAML
<telerik:RadChart x:Name="RadChart1" telerik:StyleManager.Theme="Vista" UseDefaultLayout="False">            
            <Grid> 
               <Grid.RowDefinitions> 
                   <RowDefinition Height="1*" /> 
                   <RowDefinition Height="6*" /> 
               </Grid.RowDefinitions> 
               <Grid.ColumnDefinitions> 
                   <ColumnDefinition /> 
               </Grid.ColumnDefinitions> 
               <telerik:ChartTitle Content="Sample Report" Grid.Row="0" Grid.Column="0" 
                                   VerticalAlignment="Center" HorizontalAlignment="Center" 
                                   TextElement.FontWeight="Bold" TextElement.FontSize="24" /> 
               <telerik:ChartArea x:Name="ChartArea1" Grid.Row="1" Grid.Column="0" /> 
            </Grid> 
        </telerik:RadChart> 
And now neither RadChart1.ItemSource nor ChartArea1.ItemSource will correctly display any graph data ("No Data Series")

Also I cannot add a dataseries to the dataseries collection using
ChartArea1.DataSeries.Add( 
I get the following error
Error   1   'Telerik.Windows.Controls.Charting.DataSeriesCollection' does not contain a definition for 'Add' and no extension method 'Add' accepting a first argument of type 'Telerik.Windows.Controls.Charting.DataSeriesCollection' 
 

Can anyone offer help on this please?

Rav
Velin
Telerik team
 answered on 14 Jun 2010
1 answer
107 views
Hello,

I have a TabControl with many items and I would like to activate the DropDownButton which shows a menu containing all TabItems.
As far as I can tell this feature should be supported as there is an IsDropDownOpen Property which shows me such a menu but I can't figure out how to get this menu during runtime.

In addition I'm looking for a way to change the appearance of the Left- and RightScrollButton (for the drop down button i've seen that there is a DropDownButtonStyle Property but I did not play around with it since I don't see this button at all yet).

I hope you can help me on these issues.
Thanks,
Peter



Tina Stancheva
Telerik team
 answered on 14 Jun 2010
6 answers
753 views
Hi,

I'm slowly getting to grips with styling the GridView control. So far I've styled the GridViewRow and GridViewHeaderCell. However I have noticed that somethin in my styling for GridViewHeaderCell (or maybe something I've left out) is causing the column resize functionality to stop working. Even if I fully define CanUserResizeColumns="True" on the grid itself, it still doesn't work. By commenting out all my GridViewHeaderCell style XAML the problem disappears, so its in there somewhere! Any help would be much appreciated.

<Pen x:Key="GridViewHeaderCellDropMarkerPen" Brush="{StaticResource GridViewHeaderCellDropMarkerPenBrush}" Thickness="60" /> 
     
    <Storyboard x:Key="MouseOver"
        <DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="GridViewHeaderCell_Over" Storyboard.TargetProperty="Opacity"
            <SplineDoubleKeyFrame KeyTime="0:0:0.12" Value="1" /> 
        </DoubleAnimationUsingKeyFrames> 
    </Storyboard> 
    <Storyboard x:Key="MouseOut"
        <DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="GridViewHeaderCell_Over" Storyboard.TargetProperty="Opacity"
            <SplineDoubleKeyFrame KeyTime="0:0:0.12" Value="0" /> 
        </DoubleAnimationUsingKeyFrames> 
    </Storyboard> 
     
 
    <ControlTemplate x:Key="GridViewHeaderCellTemplate" TargetType="telerik:GridViewHeaderCell"
        <Grid SnapsToDevicePixels="True" > 
            <Border x:Name="GridViewHeaderCell" 
                    BorderBrush="{TemplateBinding BorderBrush}"  
                    BorderThickness="{TemplateBinding BorderThickness}" 
                    Background="{TemplateBinding Background}" 
                     
                    SnapsToDevicePixels="True" 
                    /> 
            <Border x:Name="GridViewHeaderCell_Over" 
                    BorderBrush="{StaticResource GridViewHeaderCellMouseOverBorderBrush}"  
                    BorderThickness="{TemplateBinding BorderThickness}" 
                    Background="{StaticResource GridViewHeaderCellMouseOverBackground}" 
                    Opacity="0" 
                     
                    SnapsToDevicePixels="True" 
                    /> 
            <Border x:Name="GridViewHeaderCell_Selected" 
                    BorderBrush="{StaticResource GridViewHeaderCellMouseOverBorderBrush}"  
                    BorderThickness="{TemplateBinding BorderThickness}" 
                    Background="{StaticResource GridViewHeaderCellSortedBackground}" 
                    Opacity="0" 
                     
                    SnapsToDevicePixels="True" 
                    /> 
 
                <Grid x:Name="PART_HeaderCellGrid"
                    <Grid.ColumnDefinitions> 
                        <ColumnDefinition Width="*" /> 
                        <ColumnDefinition Width="Auto"  /> 
                    </Grid.ColumnDefinitions> 
 
                    <telerik:AlignmentContentPresenter Grid.Column="0"  
                                                    Margin="3,4,2,3" 
                                                    VerticalAlignment="Center" 
                                                    TextAlignment="{TemplateBinding TextAlignment}"   
                                                    TextBlock.FontWeight="Bold"/> 
                                                      
 
                        <Grid Grid.Column="1" HorizontalAlignment="Right"  
                              Background="{StaticResource GridViewHeaderCellSortingAndFilteringContentBackground}"
                            <Grid.ColumnDefinitions> 
                                <ColumnDefinition Width="Auto"/> 
                                <ColumnDefinition Width="Auto" /> 
                            </Grid.ColumnDefinitions> 
 
                            <Path x:Name="PART_SortIndicator" Fill="{StaticResource GridViewIndicatorsPartsFill}" Stretch="Fill" Data="M0,0 L1,0 2,0 3,0 4,0 5,0 5,1 4,1 4,2 3,2 3,3 2,3 2,2 1,2 1,1 0,1 0,0 z" HorizontalAlignment="Left" Margin="1,0,4,0" VerticalAlignment="Center" Width="5" Height="3" RenderTransformOrigin="0.5,0.5" > 
                                <Path.RenderTransform> 
                                    <TransformGroup> 
                                        <ScaleTransform ScaleX="1" ScaleY="-1"/> 
                                        <SkewTransform AngleX="0" AngleY="0"/> 
                                        <RotateTransform Angle="0"/> 
                                        <TranslateTransform X="0" Y="0"/> 
                                    </TransformGroup> 
                                </Path.RenderTransform> 
                            </Path> 
 
                            <telerik:FilteringDropDown Name="PART_DistinctFilterControl" Grid.Column="1"  SnapsToDevicePixels="True" 
                                                    Visibility="{TemplateBinding FilteringUIVisibility}" 
                                                    telerik:StyleManager.Theme="{StaticResource Theme}" Margin="0,0,8,0"/> 
 
                        </Grid> 
                </Grid> 
                 
        </Grid> 
         
        <ControlTemplate.Triggers> 
 
            <MultiTrigger> 
                <MultiTrigger.EnterActions> 
                    <BeginStoryboard Storyboard="{StaticResource MouseOver}" /> 
                </MultiTrigger.EnterActions> 
                <MultiTrigger.ExitActions> 
                    <BeginStoryboard Storyboard="{StaticResource MouseOut}" /> 
                </MultiTrigger.ExitActions> 
                <MultiTrigger.Conditions> 
                    <Condition Property="IsMouseOver" Value="True" /> 
                    <Condition Property="SortingState" Value="None" /> 
                </MultiTrigger.Conditions> 
            </MultiTrigger> 
             
            <Trigger Property="SortingState" Value="Ascending"
                <Setter TargetName="PART_SortIndicator" Property="Path.Visibility" Value="Visible" /> 
                <Setter TargetName="PART_SortIndicator" Property="Path.LayoutTransform" > 
                    <Setter.Value> 
                        <ScaleTransform ScaleX="1" ScaleY="1"/> 
                    </Setter.Value> 
                </Setter> 
                <Setter Property="Opacity" TargetName="GridViewHeaderCell_Selected" Value="1" /> 
            </Trigger> 
            <Trigger Property="SortingState" Value="Descending"
                <Setter TargetName="PART_SortIndicator" Property="Path.Visibility" Value="Visible" /> 
                <Setter TargetName="PART_SortIndicator" Property="Path.LayoutTransform" > 
                    <Setter.Value> 
                        <ScaleTransform ScaleX="1" ScaleY="-1"/> 
                    </Setter.Value> 
                </Setter> 
                <Setter Property="Opacity" TargetName="GridViewHeaderCell_Selected" Value="1" /> 
            </Trigger> 
            <Trigger Property="SortingState" Value="None"
                <Setter TargetName="PART_SortIndicator" Property="Path.Visibility" Value="Hidden" /> 
            </Trigger> 
        </ControlTemplate.Triggers>   
    </ControlTemplate> 
 
    <Style TargetType="telerik:GridViewHeaderCell"
        <Setter Property="Template" Value="{StaticResource GridViewHeaderCellTemplate}" /> 
        <Setter Property="Background" Value="{StaticResource GridViewHeaderBackground}" /> 
        <Setter Property="BorderBrush" Value="{StaticResource GridViewHeaderCellInnerBorderBrush}" /> 
        <Setter Property="BorderThickness" Value="0,0,2,1" /> 
        <Setter Property="Foreground" Value="{StaticResource GridViewHeaderCellForeground}" /> 
        <Setter Property="DropMarkPen" Value="{StaticResource GridViewHeaderCellDropMarkerPen}" /> 
    </Style> 
Mark
Top achievements
Rank 1
 answered on 14 Jun 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
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?