Hi,
After restyling the grid view items control to take out the group panel I get an error when clicking on cells:
My control template is as follows:
Have I done something wrong or is this a bug?
Kind regards,
Will Holley
After restyling the grid view items control to take out the group panel I get an error when clicking on cells:
| {System.ArgumentNullException: Value cannot be null. |
| Parameter name: reference |
| at System.Windows.Media.VisualTreeHelper.GetDescendantBounds(Visual reference) |
| at Telerik.Windows.Controls.UI.DragDropManager.IsMouseOverTarget(Visual target, GetPositionDelegate getPosition) |
| at Telerik.Windows.Controls.UI.GridViewItemsControl.OnPreviewMouseUp(MouseButtonEventArgs e) |
| at System.Windows.UIElement.OnPreviewMouseUpThunk(Object sender, MouseButtonEventArgs e) |
| at System.Windows.Input.MouseButtonEventArgs.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) |
My control template is as follows:
| <ControlTemplate x:Key="GridViewItemsControlTableTemplate" TargetType="{x:Type UI:GridViewItemsControl}"> |
| <Grid Background="{TemplateBinding Background}"> |
| <Grid.Resources> |
| <UI:DoubleToGridLengthConverter x:Key="DoubleToGridLengthConverter" /> |
| </Grid.Resources> |
| <Grid.RowDefinitions> |
| <RowDefinition Height="Auto" /> |
| <RowDefinition /> |
| <RowDefinition x:Name="ScrollBarRow" MinHeight="10" |
| Height="{Binding Source={StaticResource {x:Static SystemParameters.HorizontalScrollBarHeightKey}}, |
| Converter={StaticResource DoubleToGridLengthConverter}}"/> |
| </Grid.RowDefinitions> |
| <Grid.ColumnDefinitions> |
| <ColumnDefinition /> |
| <ColumnDefinition x:Name="ScrollBarColumn" MinWidth="10" Width="{Binding Source={StaticResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}, Converter={StaticResource DoubleToGridLengthConverter}}"/> |
| </Grid.ColumnDefinitions> |
| <UI:GridViewBackground x:Name="PART_GridViewBackground" Margin="10,0,0,0" Grid.Row="0" |
| Grid.ColumnSpan="1" Grid.RowSpan="2" |
| HorizontalAlignment="Stretch" VerticalAlignment="Stretch" IsHitTestVisible="False"/> |
| <StackPanel Grid.Row="0"> |
| <Border Margin="0,0,0,0" BorderThickness="0" ClipToBounds="True" |
| Background="{StaticResource {x:Static Resources:FunctionalBrushes.EntityTabBackgroundBrushKey}}"> |
| <UI:GridViewHeaderRow Name="PART_HeaderRow" VerticalAlignment="Top"/> |
| </Border> |
| <UI:GridViewNewRow Name="PART_AddNewRow" Margin="10,0,0,0" |
| VerticalAlignment="Bottom" HorizontalAlignment="Stretch" |
| Visibility="Collapsed" /> |
| </StackPanel> |
| <ScrollViewer Name="PART_ItemsScrollViewer" Focusable="False" VerticalScrollBarVisibility="Auto" |
| HorizontalScrollBarVisibility="Auto" |
| CanContentScroll="True" Grid.Row="1" Grid.RowSpan="2" Grid.ColumnSpan="2"> |
| <ItemsPresenter Margin="10, 0, 0, 0"/> |
| </ScrollViewer> |
| </Grid> |
| <ControlTemplate.Triggers> |
| <Trigger Property="ComputedVerticalScrollBarVisibility" SourceName="PART_ItemsScrollViewer" Value="Collapsed"> |
| <Setter Property="Width" TargetName="ScrollBarColumn" Value="10" /> |
| </Trigger> |
| <Trigger Property="ComputedHorizontalScrollBarVisibility" SourceName="PART_ItemsScrollViewer" Value="Collapsed"> |
| <Setter Property="Height" TargetName="ScrollBarRow" Value="10" /> |
| </Trigger> |
| </ControlTemplate.Triggers> |
| </ControlTemplate> |
Have I done something wrong or is this a bug?
Kind regards,
Will Holley