Telerik Forums
UI for WPF Forum
2 answers
307 views
Hi everybody,

I ask for a specific cuestion about RadTileView. I would like to display the tile items in "read-only" mode (IsEnable = false no valid xD). What I mean is that I present each item without the button for maximize/minimize. For that I took some piece of code I saw in one of your examples. It works properly but a problem raises when a tile item is selected because it is not highlighted. The code appears in the following snippet:

<
telerik:RadTileView Name="RadTileViewUsers"
                                             ContentTemplate="{StaticResource ContentTemplate}"
                                             ItemTemplate="{StaticResource ItemTemplate}"
                                             MinimizedColumnWidth="150" MinimizedRowHeight="150"
                                             RowHeight="120"
                                             ColumnWidth="147"
                                             MaximizeMode="Zero"
                                             PreviewTileDragStarted="RadTileViewUsers_PreviewTileDragStarted"  
                                             ItemContainerStyle="{StaticResource RadTileViewItemStyle}"
                                             PreservePositionWhenMaximized="True" IsVirtualizing="True" IsSelectionEnabled="True" />

And the style (ignoring the colors):

<Style x:Key="RadTileViewItemStyle" TargetType="telerik:RadTileViewItem">
            <Setter Property="telerik:RadDragAndDropManager.AllowDrag" Value="True" />
            <Setter Property="HorizontalContentAlignment" Value="Stretch" />
            <Setter Property="VerticalContentAlignment" Value="Stretch" />
            <Setter Property="Background" Value="{StaticResource TileView_Background}" />
            <Setter Property="BorderBrush" Value="{StaticResource TileView_OuterBorder}" />
            <Setter Property="BorderThickness" Value="1" />
            <Setter Property="Padding" Value="7" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="telerik:RadTileViewItem">
                        <Grid>
                            <Border x:Name="outerBorder"
                                    Margin="{TemplateBinding Padding}"
                                    Background="{TemplateBinding Background}"
                                    BorderBrush="{TemplateBinding BorderBrush}"
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    CornerRadius="{StaticResource TileView_OuterBorder_CornerRadius}">
                                <Border x:Name="outerContainer"
                                        Background="Transparent"
                                        BorderBrush="{StaticResource TileView_InneBorder}"
                                        BorderThickness="{StaticResource TileView_InneBorder_Thickness}"
                                        CornerRadius="{StaticResource TileView_InneBorder_CornerRadius}">
                                    <Grid>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="Auto" />
                                            <RowDefinition Height="*" />
                                        </Grid.RowDefinitions>
                                        <StackPanel>
                                            <Border Background="{StaticResource TileView_HeaderBackground}"
                                                    BorderBrush="{StaticResource TileView_HeaderBorder}"
                                                    BorderThickness="{StaticResource TileView_HeaderBorder_Thickness}"
                                                    CornerRadius="{StaticResource TileView_HeaderBorder_CornerRadius}"
                                                    Padding="10 0 7 0">
                                                <Grid MinHeight="28">
                                                    <Border x:Name="GripBarElement" Background="Transparent">
                                                        <ContentPresenter x:Name="HeaderElement"
                                                                          Margin="0,0,10,0"
                                                                          HorizontalAlignment="Left"
                                                                          VerticalAlignment="Center"
                                                                          ContentTemplate="{TemplateBinding HeaderTemplate}" />
                                                    </Border>
                                                    <!--  This is the default Minimize/Maximize button  -->
                                                    <!--
                                                        <telerik:RadToggleButton x:Name="MaximizeToggleButton"
                                                        Command="tileView:TileViewCommands.ToggleTileState"
                                                        Style="{StaticResource maximizeToggleStyle}" />
                                                    -->
                                                    <!--<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
                                                        <telerik:RadButton >Refresh</telerik:RadButton>
                                                        <telerik:RadButton >Minimize</telerik:RadButton>
                                                        <telerik:RadButton >Maximize</telerik:RadButton>
                                                    </StackPanel>-->
                                                </Grid>
                                            </Border>
                                            <Border x:Name="Splitter"
                                                    Height="4"
                                                    Background="{StaticResource TileView_HeaderBorder_HorizontalSplitterBackground}"
                                                    BorderThickness="0"
                                                    OpacityMask="{StaticResource TileView_HeaderBorder_HorizontalSplitterOpacityMask}" />
                                        </StackPanel>
                                        <Grid Grid.Row="1" Background="Transparent">
                                            <ContentPresenter x:Name="ContentElement"
                                                              Grid.Row="1"
                                                              HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                                              VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                                              Content="{TemplateBinding Content}"
                                                              ContentTemplate="{TemplateBinding ContentTemplate}" />
                                        </Grid>
                                        <Rectangle x:Name="DisabledVisual"
                                                   Grid.RowSpan="2"
                                                   Fill="{StaticResource DisabledBrush}"
                                                   RadiusX="4"
                                                   RadiusY="4"
                                                   Visibility="Collapsed" />
                                    </Grid>
                                </Border>
                            </Border>
                            <Grid x:Name="SelectedItem"
                                  Margin="-1"
                                  Visibility="Collapsed">
                                <Border Margin="{TemplateBinding Padding}"
                                        BorderBrush="{StaticResource ControlOuterBorder_Selected}"
                                        BorderThickness="2"
                                        CornerRadius="{StaticResource TileView_OuterBorder_CornerRadius}" />
                            </Grid>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

Note: If I change Visibility value to Visible in Grid "SelectedItem" all the item appear as selected.

Do you have any suggestion for solving my problem?

Thanks in advance.

Eduardo.
Eduardo
Top achievements
Rank 1
 answered on 01 Sep 2011
1 answer
129 views
Hi,

I am applying two group filters in code-behind to a RadGridView. Code : -


Dim trackGroupDescriptor As New Telerik.Windows.Data.GroupDescriptor  
  
trackGroupDescriptor.Member = "TrackName"  
  
trackGroupDescriptor.DisplayContent = "Track"  
  
trackGroupDescriptor.SortDirection = ComponentModel.ListSortDirection.Ascending  
  
AllTrackGrid.GroupDescriptors.Add(trackGroupDescriptor)
  
  
  
Dim FeatureGroupDescriptor As New Telerik.Windows.Data.GroupDescriptor  
  
FeatureGroupDescriptor.Member = "FeatureName"  
  
FeatureGroupDescriptor.DisplayContent = "Feature"  
  
FeatureGroupDescriptor.SortDirection = ComponentModel.ListSortDirection.Ascending 
   
AllTrackGrid.GroupDescriptors.Add(FeatureGroupDescriptor)


The problem I am having is that when the grid loads only one single data row appears inside each of the inner (second) group descriptor, while the actual number of rows which should be present is more. Hoever when I remove the column headers from the 'ShowGroupPanel' while application is running and add them once more, I am able to see all the entries properly. Is there something I am missing in the code?

BTW: Tried adding the descriptor from design-side as well, but having the same issue.  


Thanks
Anish George

Anish
Top achievements
Rank 1
 answered on 01 Sep 2011
4 answers
113 views
Hello,

I've trying to follow all the recommendations, samples, tutorials and how-tos I could find about this, and now I'm kind of lost because I can't make anything work... So I put together a sample application (http://pauloqueiroga.com/wpfapplication2.zip) to illustrate my problem.

All I need to drag and drop with a ListBox to redefine the order of the elements.

I started following the steps in this article (http://www.telerik.com/help/wpf/raddraganddrop-within-listbox.html), then I also applied the recommendations of this other one (http://www.telerik.com/help/wpf/raddraganddrop-child-window-non-telerik-popups.html) because my original app had the listbox in a popup window, and I tried a few different tweaks, like the ones recommended here (http://www.telerik.com/community/forums/wpf/draganddrop/drag-drop-mvvm.aspx) but I'm only getting lost.

Do you think you can help me?

Thank you,

PQ.
Maya
Telerik team
 answered on 01 Sep 2011
0 answers
122 views
Is there some sort of GetAllNodes method for the TreeListView, like in the TreeView.  

I am trying to do a custom filter on the nodes and need to get all the TreeListView nodes back to set their visibility depending on  a value in a TreeListView Column.
Thanks,
Jessica
Top achievements
Rank 1
 asked on 31 Aug 2011
1 answer
486 views
Hi,

I have a very small program with a radmenu and radrichtextbox to demonstrate the use of applicationCommands.

 

 

 <Grid>

 <Grid.RowDefinitions>

 <RowDefinition Height="Auto" />

 <RowDefinition />

 </Grid.RowDefinitions>

 <telerik:RadMenu>

 <telerik:RadMenuItem Header="Edit">

 <telerik:RadMenuItem Header="Cut" Command="ApplicationCommands.Cut"/>

 <telerik:RadMenuItem Header="Paste" Command="ApplicationCommands.Paste"/>

 </telerik:RadMenuItem>

 </telerik:RadMenu>

 <telerik:RadRichTextBox Grid.Row="1"/>

 </Grid>

 


Paste commands work very nice, but i'm not able to use Cut or copy commands when i make a selection in the richtextbox. What's is wrong ?
Iva Toteva
Telerik team
 answered on 31 Aug 2011
2 answers
104 views
I have a GridView that always needs to be alphabetically sorted by name, no matter what happens the grid (filtered, sorted by other columns, grouped, new rows added, etc)

Is there any way to do this? I'm guessing it will be in code behind, but I'm not sure where to put what.
Rayne
Top achievements
Rank 1
 answered on 31 Aug 2011
2 answers
198 views
Hello! 

I am getting the following exception when I delete all items from a grid with the delete key and then press the insert key:

An unhandled exception of type 'System.ArgumentOutOfRangeException' occurred in Telerik.Windows.Data.dll

   at Telerik.Windows.Data.QueryableCollectionView.MoveCurrentToPosition(Int32 position) in c:\TB\101\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\QueryableCollectionView.Currency.cs:line 82
   at Telerik.Windows.Data.QueryableCollectionView.MoveCurrentTo(Object item) in c:\TB\101\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\QueryableCollectionView.Currency.cs:line 46
   at Telerik.Windows.Data.QueryableCollectionView.AddNewInternal(Object newItem) in c:\TB\101\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\QueryableCollectionView.Editing.cs:line 430
   at Telerik.Windows.Data.QueryableCollectionView.AddNew(Object newItem) in c:\TB\101\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\QueryableCollectionView.Editing.cs:line 251
   at Telerik.Windows.Data.DataItemCollection.AddNew(Object newItem) in c:\TB\101\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\DataItemCollection.Editing.cs:line 33
   at Telerik.Windows.Controls.GridView.GridViewDataControl.CreateNewItem() in c:\TB\101\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.cs:line 5421
   at Telerik.Windows.Controls.GridView.GridViewDataControl.ShowInsertRowIfNeeded() in c:\TB\101\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.cs:line 5368
   at Telerik.Windows.Controls.GridView.GridViewDataControl.BeginInsert() in c:\TB\101\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.cs:line 4997
   at Telerik.Windows.Controls.GridView.GridViewDataControl.OnBeginInsertCommand(Object sender, ExecutedRoutedEventArgs e) in c:\TB\101\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.Commands.cs:line 342
   at System.Windows.Input.CommandBinding.OnExecuted(Object sender, ExecutedRoutedEventArgs e)
   at System.Windows.Input.CommandManager.ExecuteCommandBinding(Object sender, ExecutedRoutedEventArgs e, CommandBinding commandBinding)
   at System.Windows.Input.CommandManager.FindCommandBinding(CommandBindingCollection commandBindings, Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
   at System.Windows.Input.CommandManager.FindCommandBinding(Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
   at System.Windows.Input.CommandManager.OnExecuted(Object sender, ExecutedRoutedEventArgs e)
   at System.Windows.UIElement.OnExecutedThunk(Object sender, ExecutedRoutedEventArgs e)
   at System.Windows.Input.ExecutedRoutedEventArgs.InvokeEventHandler(Delegate genericHandler, Object target)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
   at System.Windows.Input.RoutedCommand.ExecuteImpl(Object parameter, IInputElement target, Boolean userInitiated)
   at System.Windows.Input.RoutedCommand.Execute(Object parameter, IInputElement target)
   at Telerik.Windows.Controls.GridView.GridViewDataControl.ExecutePendingCommand() in c:\TB\101\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.Commands.cs:line 65
   at Telerik.Windows.Controls.GridView.GridViewDataControl.OnKeyDown(KeyEventArgs e) in c:\TB\101\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.cs:line 3926
   at System.Windows.UIElement.OnKeyDownThunk(Object sender, KeyEventArgs e)
   at System.Windows.Input.KeyEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   at System.Windows.Interop.HwndKeyboardInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawKeyboardActions actions, Int32 scanCode, Boolean isExtendedKey, Boolean isSystemKey, Int32 virtualKey)
   at System.Windows.Interop.HwndKeyboardInputProvider.ProcessKeyAction(MSG& msg, Boolean& handled)
   at System.Windows.Interop.HwndSource.CriticalTranslateAccelerator(MSG& msg, ModifierKeys modifiers)
   at System.Windows.Interop.HwndSource.OnPreprocessMessage(Object param)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)


Just to let you know!

Franziska
Top achievements
Rank 1
 answered on 31 Aug 2011
1 answer
232 views
Hi.
In evaluating the Panebar i want to make the panel bar not selectable, i.e. when the user click on the group or on the item only is pusched but not remain selected.

How can do i this?
thanks.
Petar Mladenov
Telerik team
 answered on 31 Aug 2011
1 answer
207 views
Hello,

I am having a little issue with the Live Data Chart Example. I'm using the same source code as the "Live Data WPF example". Except changed my queue object with my own.

Every time my timer ticks. The Chart redraws itself completely and for a few milliseconds the chart is blank. 

I could provide more information but my code is exactly the example. Except I am loading the UserControl in a Stack Panel. 

Has anyone come across this?

Luc



Evgenia
Telerik team
 answered on 31 Aug 2011
6 answers
158 views
Hello,
I need to create a project planning tool which allows to manage project lenght (in days) and responsibility with drag and drop functionality;
I thought that the timeline view may be what I'm looking for but there are always times (hour, minute, second) in between which are not interesting for me.
Substantially I would need the timeline view with 4 employees as rows and the days as columns; the user should then be able to create a new project which can be 1 to n days and drag and drop it between the employees.

Could You please give me some advise or small sample project on how I could do this?

Regards
Yana
Telerik team
 answered on 31 Aug 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
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
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
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?