Telerik Forums
UI for WPF Forum
1 answer
333 views
Hi,

I'm working on a project where we have a RadTreeView and 3rd party CAD viewer control working off the same business objects (in this case the individual CAD entities). However the difference between the way the CAD viewer does selection and how the TreeView does selection will end up being confusing to customers, and the architect wants the treeview selection method to match the CAD's. For instance, in the CAD clicking on an entity, or drag-selection of multiple entities, without any key modifiers does not de-select already selected items. a key-modified-click or key-modified-drag-selection are what deselect the specific entities. This is the same as other CAD tools.

So I have the task to override RadTreeView's selection methods to mimic these same selection behaviors - so that when you click on a treeviewitem it will select it, but not deselect other items, and a key-modified click will de-select only the items specifically indicated by the user (either individually, or under multiselect). To make things a bit more challenging, we need our treeview to be virtualized, and the RadTreeViewItem's IsSelected property is bound to a "Selected" property of the business objects (each cad entity), following an MVVM design pattern.

So what I'm having trouble finding out is what methods I need to override on RadTreeView (or even RadTreeViewItem?) to change the selection behavior with the mouse/keyboard, but still allow the the RadTreeView to fire the events it does on selection change (we've found these are still important regardless of our databinding due to ui virtualization).

Thanks!
Robert
Top achievements
Rank 1
 answered on 12 Apr 2013
1 answer
154 views
Hi,
How to bind a string property to the Richtexbox control using MVVM? 

Any help would be appreciated!.

Thanks
Raj
Petya
Telerik team
 answered on 12 Apr 2013
5 answers
255 views
I use sample from demo:

<telerik:RadCartesianChart Palette="Windows8" Height="Auto" Width="500">
    <telerik:RadCartesianChart.Behaviors>
        <telerik:ChartTrackBallBehavior ShowIntersectionPoints="True" />
    </telerik:RadCartesianChart.Behaviors>
    <telerik:AreaSeries CategoryBinding="Category" Fill="#7F8EC448" Stroke="#FF8EC442" StrokeThickness="2" ValueBinding="Value" ItemsSource="{Binding Chart1}">
        <telerik:AreaSeries.TrackBallInfoTemplate>
            <DataTemplate>
                <StackPanel Margin="3" Orientation="Horizontal">
                    <TextBlock Text="{Binding DataPoint.Category, StringFormat='Spread at {0:HH:mm:ss.f}:'}" Margin="0,0,3,0" />
                    <TextBlock Text="{Binding DataPoint.Value}" FontWeight="Bold" />
                </StackPanel>
            </DataTemplate>
        </telerik:AreaSeries.TrackBallInfoTemplate>
    </telerik:AreaSeries>
    <telerik:RadCartesianChart.HorizontalAxis>
        <telerik:DateTimeContinuousAxis MajorStepUnit="Second"
                            LabelInterval="10"
                            LabelFormat="HH:mm:ss.f" FontFamily="Segoe UI"
                            PlotMode="OnTicks" />
    </telerik:RadCartesianChart.HorizontalAxis>
    <telerik:RadCartesianChart.VerticalAxis>
        <telerik:LinearAxis FontFamily="Segoe UI">
        </telerik:LinearAxis>
    </telerik:RadCartesianChart.VerticalAxis>
    <telerik:RadCartesianChart.Grid>
        <telerik:CartesianChartGrid MajorLinesVisibility="Y" MajorYLineDashArray="3,4" />
    </telerik:RadCartesianChart.Grid>
</telerik:RadCartesianChart>

I use DataContext  binding:

DataContext = _viewModelMain;

 But i cant change color here: Fill="#7F8EC448" Stroke="#FF8EC442". Output window:
System.Windows.Data Error: 2 : Cannot find governing FrameworkElement or FrameworkContentElement for target element. BindingExpression:Path=Color; DataItem=null; target element is 'SolidColorBrush' (HashCode=1226006); target property is 'Color' (type 'Color')

How fix it?
JackSH
Top achievements
Rank 1
 answered on 12 Apr 2013
3 answers
802 views
Hi,

Is there a way to change the Up/Down arrow used by  the RadExpander to different images/icons.  I would like to use different .png files for Expand and Collapse state.

Thanks,

Mike
Pavel R. Pavlov
Telerik team
 answered on 12 Apr 2013
6 answers
539 views
Hi guys,
is there a way to prevent the selection change of nodes? I saw there is only a selectionchanged event which is not much of a help here since the selected node was already changed..
Thanks

Pavel R. Pavlov
Telerik team
 answered on 12 Apr 2013
1 answer
135 views
Hi,
I'm new to the Telerik family and I'm in the process of developing a prototype to allow the user to drag and drop user controls from one list to another. Each user control in turn has several lists that need to be drag enabled to allow the user to create a team of employees. The functionality is not dissimilar from you DND demo with the countries. I«,ve created the basics but I'm a long way from where I need to be and I'm struggling to figure out what is going on.  I'm looking for a few functional examples in VB that will allow me to work out where I am going wrong.  Any help would be appreciated.

Thanks
George
Telerik team
 answered on 12 Apr 2013
1 answer
170 views
Hi,

I've upgraded to library version 2013.1.403.40.
For some reason I am unable to set the SelectedIndex value in code.

Example:
if (radListBox.SelectedIndex <= -1)
{
    radListBox.SelectedIndex = 0;
}
else
{
    radListBox.SelectedIndex++;
}


When the SelectedIndex = -1 and I try to set a value of 0, then the SelectedIndex value still remains as -1.
The same applies if I try SelectedIndex++.

Does anyone have suggestions? It used to work before upgrading.

Thanks,

Rob

Ventzi
Telerik team
 answered on 12 Apr 2013
3 answers
107 views
Hello,
I have a grid where I am programatically setting focus on a control when I add a new row and show details. When I tab to go to the next control in those details, the row selection changes from the row that was selected prior to adding a new record to the record after. If I select the first control with my mouse and hit tab, the focus goes to the next control as is expected. Is there something I should be doing other than setting focus on the control?

Thanks
Dimitrina
Telerik team
 answered on 12 Apr 2013
11 answers
203 views
Hello

When I expand a row for its rowdetails by clicking the plus-sign in the GridViewToggleRowDetailsColumn the row is expanded but it does not seem to be "officially" selected. The fonts don't get fat for example. Now when I enter into a textbox with my mouse and then press TAB-Key I get an Exception. If I first click on the row and then expand it with the plus-sign I don't have this error. Any suggestions?

Here the Stacktrace:
 System.NullReferenceException  
   bei Telerik.Windows.Controls.GridView.GridViewDataControl.Move(FocusNavigationDirection navigationDirection) 
   bei Telerik.Windows.Controls.GridView.GridViewDataControl.ExecuteMoveCommands(FocusNavigationDirection direction) 
   bei Telerik.Windows.Controls.GridView.GridViewDataControl.MoveNext() 
   bei Telerik.Windows.Controls.GridView.GridViewDataControl.OnMoveNextCommand(Object sender, ExecutedRoutedEventArgs e) 
   bei System.Windows.Input.CommandBinding.OnExecuted(Object sender, ExecutedRoutedEventArgs e) 

Oh and in the case that the exception does not occur, Tab still doesn't really work - it jumps to the next row instead of jumping to the next TextBox in rowdetails. I already played around with the TabIndex property but didn't find anything. Any idea for that too?

Thanks
Dimitrina
Telerik team
 answered on 12 Apr 2013
0 answers
192 views
Hi, thanks ins advance for reading this

I've been able to reproduce the Drag&Drop and Grouping examples separately. No luck making them work together.

My 2 collections and filling the source list.
Property ProductosTotal As New CollectionViewSource
Property ProductosPedido As New ObservableCollection(Of Productos)
 
'Called when initializing view
Private Sub LoadProductosTotal()
        Dim prods = operacionesProductos.GetAllProductos()
        If prods IsNot Nothing Then
            ProductosTotal = New CollectionViewSource
            ProductosTotal.Source = prods
        End If
    End Sub

On the Xaml side:
<!--Style-->
<Style x:Key="DraggableListBoxItem" TargetType="telerik:RadListBoxItem">
            <Setter Property="telerik:DragDropManager.AllowCapturedDrag" Value="True" />
        </Style>
 
<!--SOURCE RADLISTBOX-->
<telerik:RadListBox Grid.Column="0" ItemContainerStyle="{StaticResource DraggableListBoxItem}"
                            ItemsSource="{Binding ProductosTotal.View}" ItemTemplate="{StaticResource ListBoxItemTemplate}">
                            <telerik:RadListBox.GroupStyle >
                                <GroupStyle>
                                    <GroupStyle.HeaderTemplate>
                                        <DataTemplate>
                                            <StackPanel Height="Auto" Background="{telerik:Windows8Resource ResourceKey=AccentBrush}" Margin="0 5 0 5">
                                                <TextBlock Text="{Binding Name}" FontFamily="Segoe UI Light" FontWeight="Bold" FontSize="16"
                                           Margin="10 3 0 0" Foreground="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
                                            </StackPanel>
                                        </DataTemplate>
                                    </GroupStyle.HeaderTemplate>
                                </GroupStyle>
                            </telerik:RadListBox.GroupStyle>
 
                            <telerik:RadListBox.DragDropBehavior>
                                <Behaviors:ListBoxDragDropBehaviorCopy />
                            </telerik:RadListBox.DragDropBehavior>
                            <telerik:RadListBox.DragVisualProvider>
                                <telerik:ScreenshotDragVisualProvider />
                            </telerik:RadListBox.DragVisualProvider>
                        </telerik:RadListBox>
 
<!--DESTINATION RADLISTBOX-->
 <telerik:RadListBox  Grid.Row="1" ItemsSource="{Binding ProductosPedido}" AllowDrop="True"
                            ItemTemplate="{StaticResource ListBoxItemTemplate}">
                        <telerik:RadListBox.DragDropBehavior >
                            <telerik:ListBoxDragDropBehavior />
                        </telerik:RadListBox.DragDropBehavior>
                    </telerik:RadListBox>

Notice the ListBoxDragDropBehaviorCopy I inherited the ListBoxDragDropBehavior to supress the remove operation because it threw an exception.

I need to copy from the source list, not move, I've tried the DragDropManager but I cant understand completely the documentation.
Could someone point me in the right direction, i feel like is something small what im missing

Thanks again

Vedha
Top achievements
Rank 1
 asked on 12 Apr 2013
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
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?