Telerik Forums
UI for WPF Forum
1 answer
138 views
Hi All

I am using the WPF 2010 Q1 controls and as per the documentation here: http://www.telerik.com/help/wpf/gridview-events-validation.html

I am calling the rowisvalidating event and on a condition setting e.IsValid = false; But even when this is set to false, the rowisvalidated event is still fired. I thought that this would not be the case.

Nick
Nedyalko Nikolov
Telerik team
 answered on 07 Jun 2010
2 answers
343 views

Hi,

I'm using RadControls for WPF 2010 Q1 (V2010.1.528.35). I have to customize the RadGridView according the following points :

  • the grid needs to define a first column that is a checkbox column allowing to select/deselect rows
  • this column is databound (2way) to a boolean property (IsSelected) of an object.
  • the column must be always in edit mode. The user needs to be allowed to check directly the checkboxes without a previous click/double click that put the cells in editmode.

The first 2 points are done without any problem. For the third, I've tried differents ways to achieve this goal but without success :/

Can someone provide me a little help on this point ?

Greets,

Thomas

Thomas
Top achievements
Rank 1
 answered on 07 Jun 2010
1 answer
253 views
I really need some help on this!! :)

I'm unable to get rid of the background of the mouseovervisual. I've followed the example provided in the project here with no luck http://www.telerik.com/community/forums/wpf/panelbar/turn-off-mouse-over-effect-in-item-panel.aspx.

The problem is that when the panels are expanded, the mouseovervisual effect of the default orange background still appears on hover, even when applying the PanelBarItemSecondLevelTemplateStyle to the RadPanelBarItem.

The xaml:

    <Grid x:Name="MainContent" Margin="0,2,2,0">
        <Border BorderBrush="#FF336687" BorderThickness="1" CornerRadius="4" Margin="0" Width="Auto" Height="Auto">

            <telerikNavigation:RadPanelBar x:Name="PresentationPanel" Template="{DynamicResource PresentationPanelBar}" Background="Transparent"
                                           dragDrop:RadDragAndDropManager.AllowDrop="True" Orientation="Vertical" ExpandMode="Multiple">
                <telerikNavigation:RadPanelBarItem Name="DetailsPanel" IsExpanded="{Binding IsDetailsExpanded}" Template="{DynamicResource PanelBarItemSecondLevelTemplateStyle}">
                    <telerikNavigation:RadPanelBarItem.Header>
                        <ContentControl Cursor="Hand">
                            <TextBlock Text="Details" Foreground="#FFFFFF" Margin="5 4 5 5"/>
                        </ContentControl>
                    </telerikNavigation:RadPanelBarItem.Header>
                    <local:DraggableListBox x:Name="DetailDraggableListBox" ItemsSource="{Binding AvailableDetails}"
                                            ItemTemplate="{StaticResource Test}"
                                            ItemsPanel="{StaticResource DefaultWorkspacePanelTemplate}"
                                            Background="Transparent"
                                            BorderThickness="0" ScrollViewer.HorizontalScrollBarVisibility="Disabled">
                    </local:DraggableListBox>
                </telerikNavigation:RadPanelBarItem>

                <telerikNavigation:RadPanelBarItem Name="TopicsPanel" IsExpanded="{Binding IsTopicsExpanded}" Template="{DynamicResource PanelBarItemSecondLevelTemplateStyle}">
                    <telerikNavigation:RadPanelBarItem.Header>
                        <ContentControl Cursor="Hand">
                            <TextBlock Text="Topics" Foreground="#FFFFFF" Name="txtTopicsHeader" Margin="5 4 5 5" />
                        </ContentControl>
                    </telerikNavigation:RadPanelBarItem.Header>
                    <local:DraggableListBox ItemsSource="{Binding TopicsForSelectedDetail}"
                                            ItemTemplate="{StaticResource Test}"
                                            ItemsPanel="{StaticResource DefaultWorkspacePanelTemplate}"
                                            Background="Transparent"
                                            BorderThickness="0" ScrollViewer.HorizontalScrollBarVisibility="Disabled">
                    </local:DraggableListBox>
                </telerikNavigation:RadPanelBarItem>
                <telerikNavigation:RadPanelBarItem Name="ContentPanel" IsExpanded="{Binding IsContentExpanded}" Template="{DynamicResource PanelBarItemSecondLevelTemplateStyle}">
                    <telerikNavigation:RadPanelBarItem.Header>
                        <ContentControl Cursor="Hand">
                            <TextBlock Text="Content" Foreground="#FFFFFF" Margin="5 4 5 5"/>
                        </ContentControl>
                    </telerikNavigation:RadPanelBarItem.Header>
                    <local:DraggableListBox ItemsSource="{Binding ContentForSelectedTopic}"
                                            ItemTemplate="{StaticResource Test}"
                                            ItemsPanel="{StaticResource DefaultWorkspacePanelTemplate}"
                                            Background="Transparent"
                                            BorderThickness="0" ScrollViewer.HorizontalScrollBarVisibility="Disabled">
                    </local:DraggableListBox>

                </telerikNavigation:RadPanelBarItem>
            </telerikNavigation:RadPanelBar>
        </Border>
    </Grid>

...and here's what I added to our Style.xaml resources file (per the example in the link above):

<Style TargetType="telerikNavigation:RadPanelBarItem" x:Key="PanelBarItemSecondLevelTemplateStyle">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerikNavigation:RadPanelBarItem">

                    <Grid x:Name="RootElement">

                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="*" />
                        </Grid.RowDefinitions>

                        <Grid x:Name="HeaderRow" Background="Transparent">

                            <!-- Hover -->
                            <!--<Border x:Name="MouseOverVisual" Opacity="0"
           CornerRadius="{StaticResource ControlSubItem_OuterCornerRadius}"
           BorderBrush="{StaticResource ControlSubItem_OuterBorder_MouseOver}"
           BorderThickness="{StaticResource ControlSubItem_OuterBorderThickness}">
          <Border BorderBrush="{StaticResource ControlSubItem_InnerBorder_MouseOver}"
            CornerRadius="{StaticResource ControlSubItem_InnerCornerRadius}"
            BorderThickness="{StaticResource ControlSubItem_InnerBorderThickness}"
            Background="{StaticResource ControlSubItem_Background_MouseOver}" />
         </Border>-->

                            <!-- Select -->
                            <!--<Border x:Name="SelectionVisual" Opacity="0"
           CornerRadius="{StaticResource ControlSubItem_OuterCornerRadius}"
           BorderBrush="{StaticResource ControlSubItem_OuterBorder_Selected}"
           BorderThickness="{StaticResource ControlSubItem_OuterBorderThickness}">
          <Border BorderBrush="{StaticResource ControlSubItem_InnerBorder_Selected}"
            CornerRadius="{StaticResource ControlSubItem_InnerCornerRadius}"
            BorderThickness="{StaticResource ControlSubItem_InnerBorderThickness}"
            Background="{StaticResource ControlSubItem_Background_Selected}" />
         </Border>-->

                            <!-- Disabled -->
                            <Border x:Name="DisabledVisual" Opacity="0"
          BorderBrush="{StaticResource ControlOuterBorder_Disabled}"
          CornerRadius="{StaticResource ControlSubItem_OuterCornerRadius}"
          BorderThickness="{StaticResource ControlSubItem_OuterBorderThickness}">
                                <Border
           BorderBrush="{StaticResource ControlInnerBorder_Disabled}"
           CornerRadius="{StaticResource ControlSubItem_InnerCornerRadius}"
           BorderThickness="{StaticResource ControlSubItem_InnerBorderThickness}"
           Background="{StaticResource ControlBackground_Disabled}" />
                            </Border>

                            <!-- Header -->

                            <ContentControl x:Name="Header" Margin="{TemplateBinding Padding}"
          Content="{TemplateBinding Header}"
          ContentTemplate="{TemplateBinding HeaderTemplate}"
          ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}"
          Foreground="{TemplateBinding Foreground}"
          HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
          VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />

                            <!-- Focus -->
                            <Rectangle x:Name="FocusVisual" Visibility="Collapsed"
          Stroke="{StaticResource FocusBrushBlack}"
          StrokeThickness="1" StrokeDashArray="1 2"
          IsHitTestVisible="False" RadiusX="2" RadiusY="2" />

                        </Grid>

                        <!-- Content -->
                        <Grid Visibility="Collapsed" Grid.Row="1" x:Name="ItemsContainer">
                            <telerikPrimitives:LayoutTransformControl
          x:Name="transformationRoot">
                                <ItemsPresenter />
                            </telerikPrimitives:LayoutTransformControl>
                        </Grid>

                    </Grid>

                    <ControlTemplate.Triggers>
                        <Trigger Property="IsSelected" Value="True">
                            <!--<Setter Property="Opacity" Value="1" TargetName="SelectionVisual" />-->
                        </Trigger>

                        <Trigger Property="IsFocused" Value="True">
                            <Setter Property="Visibility" Value="Visible"
          TargetName="FocusVisual" />
                        </Trigger>

                        <Trigger Property="IsExpanded" Value="True">
                            <Setter Property="Visibility" Value="Visible"
          TargetName="ItemsContainer" />
                        </Trigger>

                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Opacity" Value="1" TargetName="DisabledVisual" />
                        </Trigger>
                        <!--<EventTrigger RoutedEvent="UIElement.MouseEnter" SourceName="HeaderRow">
        <BeginStoryboard>
         <Storyboard>
          <DoubleAnimation Storyboard.TargetProperty="Opacity"
            Storyboard.TargetName="MouseOverVisual" To="1.0"
            Duration="0:0:0.2" />
         </Storyboard>
        </BeginStoryboard>
       </EventTrigger>
       <EventTrigger RoutedEvent="UIElement.MouseLeave" SourceName="HeaderRow">
        <BeginStoryboard>
         <Storyboard>
          <DoubleAnimation Storyboard.TargetProperty="Opacity"
            Storyboard.TargetName="MouseOverVisual" To="0"
            Duration="0:0:0.2" />
         </Storyboard>
        </BeginStoryboard>
       </EventTrigger>-->
                    </ControlTemplate.Triggers>

                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

 

Dimitrina
Telerik team
 answered on 07 Jun 2010
1 answer
90 views
I am currently testing Telerik, and testing for the charting at the moment, however I seem to be unable to render 3d charts.

Assume I have a XAML document, with one RadChart element, named w_Chart. The following works as expected:
public MainWindow () 
        { 
            InitializeComponent (); 
 
            SetupChart (); 
        } 
 
        public void SetupChart () 
        { 
            SeriesMapping sm1 = new SeriesMapping () { SeriesDefinition = new AreaSeriesDefinition () }; 
            ItemMapping im1 = new ItemMapping () { DataPointMember = DataPointMember.YValue }; 
            sm1.ItemMappings.Add (im1); 
 
            w_Chart.SeriesMappings.Add (sm1); 
 
            w_Chart.ItemsSource = Enumerable.Range (20, 5); 
        } 

However, if I change AreaSeriesDefinition to Area3DSeriesDefinition, it crashes (IntelliTrace picks up a lot of null reference exceptions). The same is true of Bar -> Bar3d.

What is required to get 3d charting to work?

[Edit: ] It also crashes when I attach a camera.
Nikolay
Telerik team
 answered on 07 Jun 2010
4 answers
113 views
Hello,

I have been playing around with this all day and have given up.
Based off the level of the treeview, I would like to change the expander line color.   I tried to add a style to my ToggleButton x:Name="Expander" line in the RadTreeViewItem template figuring that would work but has no success.

I so far have only been able to change the expander for the entire treeview in the main treeview control.

Thanks for the help
Ryan



Bobi
Telerik team
 answered on 07 Jun 2010
2 answers
113 views
I've just updated to the latest release 2010_1_0422_DEV using the instructions in the Support section (manual update, no msi).

The VS2008 help content is now out of date. How do I update it?

I have downloaded the Documentation folder but don't know what to do with it.

Thanks.
Ryan
Top achievements
Rank 1
 answered on 07 Jun 2010
3 answers
146 views
Hello,

I'm trying to wrap the Telerik (Q1 2010) GridViewRow class within my own CustomGridViewRow implementation. However the items that are generated if I set the ItemsSource are not created correctly if I use a CustomGridView class that extends RadGridView and overrides the IsItemItsOwnContainerOverride and GetContainerFromItem methods.

public class CustomGridView : RadGridView 
    protected override bool IsItemItsOwnContainerOverride(object item) 
    { 
        return (item is CustomGridViewRow); 
    } 
 
    protected override DependencyObject GetContainerFromItemOverride(object item) 
    { 
        return new CustomGridViewRow(); 
    } 
 
public class CustomGridViewRow : GridViewRow 
}

I suppose the problem is my implementation of the GetContainerFromItem method simply returning a new CustomGridViewRow instance which works fine on the RadTabControl to extend the TabItems with Closable support, but there the method signature has no item parameter so I guess I'm missing something here.

I hope someone can point me into the right direction.
Best regards,
Peter
Milan
Telerik team
 answered on 07 Jun 2010
2 answers
180 views
The RadComboBox doesn't seem to use the EmptySelectionBoxTemplate when IsEditable = true.  Is it supposed to, or is there another template to use?

<telerik:RadComboBox EmptyText="Select an answer"
                 IsEditable="True"
                 ItemsSource="{Binding Answers}">
    <telerik:RadComboBox.EmptySelectionBoxTemplate>
        <DataTemplate>
            <TextBlock Text="{Binding}" FontStyle="Italic" Foreground="Red" Opacity="0.4"/>
        </DataTemplate>
    </telerik:RadComboBox.EmptySelectionBoxTemplate>
</telerik:RadComboBox>

Thanks
Valeri Hristov
Telerik team
 answered on 07 Jun 2010
1 answer
73 views
Hello,

I have a problem with the drag and drop, my scenario is the following:
I have a RadDropDownButton that has a ListBox as it DropDownContent and I have another ListBox at the same level as the RadDropDownButton. This works like this: the user press the RadDropDownButton, the ListBox associated with the pressed RadDropDownButton appears and the user can drag and drop an item from the ListBox to another ListBox. The problem is that when I drag an item, the ListBox(DropDownContent) closes and the position of the arrowCue is set to the top left corner of the main window. 
I think that the ListBox(DropDownContent) should not close until the item is dropped into the target.

I hope you can help me, maybe I'm doing something wrong.

Best regards.
Valentin.Stoychev
Telerik team
 answered on 07 Jun 2010
2 answers
88 views
First off, congratulations on a great set of controls.

I'm using the TileView for a settings page, and I don't want users to be able to minimise all the tiles - ie. I always want one of the items to be maximised. I was able to do this from the TileStateChanged event handler with the following code on each TileViewItem:

private void RadTileViewItem_TileStateChanged(object sender, Telerik.Windows.RadRoutedEventArgs e)  
        {  
            Telerik.Windows.Controls.RadTileViewItem it = (Telerik.Windows.Controls.RadTileViewItem)e.OriginalSource;  
 
            if (it.TileState == Telerik.Windows.Controls.TileViewItemState.Restored)  
            {  
                e.Handled = true;  
            }  
        } 

This seems to work great, although it flips the minimised / maximised icon at the top right of the maximised window, which can look a little strange, although quite acceptable.

Is there a more elegant way of achieving the same?

Thanks.
jwhitley
Top achievements
Rank 1
 answered on 04 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
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
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
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?