Telerik Forums
UI for WPF Forum
2 answers
111 views
WPF Version: 2012.1.326.40 Framework: 4.0.30319

I have been having an issue ever since I started using the Telerik product suite, it's very rare, but it's absolutely driving me up the wall as I am absolutely dumbfounded as to what the cause is.

Every once in awhile, while navigating to a different page, I get this exception:

System.InvalidOperationException: Exception of type 'System.InvalidOperationException' was thrown.
   at Telerik.Windows.Controls.GridView.GridViewItemContainerGenerator.Remove(GeneratorPosition position, Int32 count, Boolean isRecycling)
   at Telerik.Windows.Controls.GridView.GridViewItemContainerGenerator.System.Windows.Controls.Primitives.IRecyclingItemContainerGenerator.Recycle(GeneratorPosition position, Int32 count)
   at Telerik.Windows.Controls.GridView.BaseItemsControl.ClearRelizedChildren()
   at Telerik.Windows.Controls.GridView.BaseItemsControl.SetItemContainerGenerator(GridViewItemContainerGenerator containerGenerator)
   at Telerik.Windows.Controls.GridView.BaseItemsControl.ResetItemContainerGenerator()
   at Telerik.Windows.Controls.GridView.GridViewDataControl.OnApplyTemplate()
   at System.Windows.FrameworkElement.ApplyTemplate()
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.ContextLayoutManager.UpdateLayout()
   at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
   at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
   at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
   at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
   at System.Windows.Media.MediaContext.AnimatedRenderMessageHandler(Object resizedCompositionTarget)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
   at System.Threading.ExecutionContext.runTryCode(Object userData)
   at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   at System.Windows.Application.RunDispatcher(Object ignore)
   at System.Windows.Application.RunInternal(Window window)
   at System.Windows.Application.Run(Window window)
   at APSSSentinel.App.Main()

This is something I have simply not been able to reproduce on a consistent basis, and something I haven't been able to isolate.  I will try to provide any other information that you need, but I just had to give posting this a shot as it is driving me insane.
intellitechcorporation
Top achievements
Rank 1
 answered on 18 Dec 2012
4 answers
186 views
Hi 
I have a property grid in my window and i want to control the property value change by an event such as ValueEditing.

Is this feature already supported?

Thanks,
Akram
Akram
Top achievements
Rank 1
 answered on 18 Dec 2012
2 answers
69 views
This is a (somewhat) obscure issue that has been driving us nuts for months now, but we finally seem to have narrowed it down. The issue is that when we used the RibbonView as a Prism region and activated RibbonTabs in that region, the RibbonTab would occasionally fail to render. What I mean by "fail to render" is that the RibbonTab would get added, but would be completely empty; just a blank, grey tab.

We fought this for months assuming that we had a bug somewhere in our region management code. The problem even went away for some unknown reason, but came back just this week. After scratching our heads for a while, we figured out that if we set IsAutoSize=False on all our RadRibbon elements and made sure to set Size=<somevalue> then the problem would go away. If we tried to use auto-sizing then the problem would come back and even get worse as we made more and more elements use auto-sizing.

This appears to be a similar issue: http://www.telerik.com/community/forums/wpf/ribbonview/ribbongroups-not-visible-issue.aspx

So the good news is that we figured out a viable work-around. The bad news is that there appears to be an issue with how size is calculated. I'm sure the folks at Telerik can whip up their own sample to see what's happening. Meanwhile, we're just glad to have identified a solution that will let us roll into production.

Greg
Greg
Top achievements
Rank 1
 answered on 18 Dec 2012
1 answer
121 views
Hi,

if I select a Row the Indicator doesn´t change!
The Arrow remains in the first-row any suggestions?

regards
Yoan
Telerik team
 answered on 18 Dec 2012
2 answers
137 views

I made a simple example:

public class TestData  
    {  
        public static IEnumerable<TestData> Generate(int count)  
        {  
            var rnd = new Random();  
 
            for (int i = 0; i < count; ++i)  
            {  
                yield return new TestData()  
                {  
                    SomeDtmProperty = DateTime.Now,  
                    SomeFltProperty = (float)rnd.Next() / (float)rnd.Next(),  
                    SomeIntProperty = rnd.Next(),  
                    SomeStrProperty = new string((char)((rnd.Next() % ((int)'z' - (int)'a')) + (int)'a'), rnd.Next() % 20 + 10)  
                };  
            }  
        }  
 
        public string SomeStrProperty { getset; }  
        public int SomeIntProperty { getset; }  
        public DateTime SomeDtmProperty { getset; }  
        public float SomeFltProperty { getset; }  
    } 
public
 partial class Window1 : Window  
    {  
        ObservableCollection<TestData> m_TestDataCollection = null;  
 
        public Window1()  
        {  
            InitializeComponent();  
            InitData();  
            gvTest.ItemsSource = m_TestDataCollection;  
        }  
 
        void InitData()  
        {  
            m_TestDataCollection = new ObservableCollection<TestData>(TestData.Generate(100));  
            m_TestDataCollection.Add(  
                new TestData()  
                {  
                    SomeStrProperty = "The last row"  
                });  
        }  
    } 
<Window x:Class="WpfApplication6.Window1"  
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"  
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"  
    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"  
    Title="Window1" Height="300" Width="500">  
    <Grid>  
        <telerik:RadGridView x:Name="gvTest"/>  
    </Grid>  
</Window> 
Steps to reproduse:

1) Run this code

2) Scroll the grid down using right scrollbar

3) last row (marked "The last row") is half-visible (or invisible at all), despite of right scrollbar is bottom down (if you can't reproduce please set some another value in generate method)

4) Now scroll using mouse wheel. Everything is OK.

PS. I use Q3 without SP1 (will migration to SP1 fix this?)

Igor
Top achievements
Rank 2
 answered on 18 Dec 2012
2 answers
76 views
Hi,

I have 4 ScheduleViews on one page to represent a particular concept in my application.
I have created a class that inherits from ScheduleViewDragDropBehavior.

How do I determine which ScheduleView is being subjected to the drop (the "sender") within Drop method?

Thank you,

- Rebecca
Rebecca
Top achievements
Rank 1
 answered on 18 Dec 2012
1 answer
132 views
I used the RadControlsScenario to create a Window just to see how it works and things went well until I tried to Compile and open it.   The first think I found was no RadControlsScenario.Show(), How do you show the window.  The second is The name 'InitializeComponent' does not exist in the current context.  My namespace is the same as the main window that would be calling it.

An object reference is required for the non-static field, method, or property 'System.Windows.Window.ShowDialog()'

Built with RadControl Scenario
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Threading.Tasks;
using Telerik.Windows.Controls;
 
namespace My.Controls
{
    /// <summary>
    /// Interaction logic for RadSalesPersonRCS1.xaml
    /// </summary>
    public partial class RadSalesPersonRCS1 : Window
    {
        public RadSalesPersonRCS1()
        {
            InitializeComponent();
        }
    }
}

Where I try to open it from my main Window
private void MenuItem_ViewSalesPerson(object sender, RoutedEventArgs e)
      {
          RadSalesPersonRCS1 salesperson = new RadSalesPersonRCS1();
          RadSalesPersonRCS1.ShowDialog();
           
      }



Boyan
Telerik team
 answered on 18 Dec 2012
1 answer
162 views
Hi,

I am using both the silverlight timebar and kendo UI datepicker in the same page.
So, my requirement is to use both the controls(Timebar or kendo datepicker).
On changing the date in any one of the control(ex: timebar)  should deflect the same in other control(ex: datepicker).
On changing the kendoUI datepicker, I can trigger the radtimebar code behind and change the selectionstart and selectionend values.
But, the radtimebar is not rendered with the changed date.
Is there anything to refresh the radtimebar to display the changed content?
Greatly Appreciate your help on this.

Thanks in advance,
Nirmal Kumar Boopalan
Tsvetie
Telerik team
 answered on 18 Dec 2012
3 answers
150 views
Hi
I have a problem when using RadContextMenu against the CollectionEditor fields, when it is first time to open the context menu then the collection editor pop up automatically hidden.

Please advice me what to do to keep the pop up open.

Thanks,
Akram
Maya
Telerik team
 answered on 18 Dec 2012
1 answer
279 views
I am coding in WPF C# using MVVM design pattern. We try to adhere strictly to the pattern and put nothing in the code behind unless there is no option or it is completely unreasonable to do so. Having said that, I am working with a Telerik RadTreeView. Here is a snippet of it in my XAML:

<telerik:RadTreeView IsExpandOnSingleClickEnabled="True" IsLineEnabled="True" Margin="5"
                                
ItemsSource="{Binding ItemsView}"
                                
SelectedItem="{Binding SelectedWidget, Mode=TwoWay}"
                                
ItemTemplate="{StaticResource NodeTemplate}" />


Currently the tree is working properly so that if you highlight a tree item and click the OK button on the view, all is good. However, I need to also allow the user to double click on one of the tree items. This means I already have a command and method, protected override void OkAction(), in my view model with the needed logic. Telerik supplies a property called ItemDoubleClick that is supposed to supply functionality for the tree item double click. But I can't find anything to allow me to do this in the view model. In other words, how do I do the binding? We also have a behavior setup in our project for double clicking that I was told I could use, but I have no experience with behaviors. I'm still a little wet with WPF.

 

I would appreciate any help or direction anyone can provide.

XAML for NodeTemplate:

<Grid.Resources>
            <DataTemplate x:Key="WidgetTemplate">
                <StackPanel Orientation="Horizontal">
                    <Image Source="/Resources/gear1.png" Margin="1" Stretch="None" />
                    <TextBlock Text="{Binding Name}" VerticalAlignment="Center" Margin="6,0,0,0" />
                </StackPanel>
            </DataTemplate>

            <HierarchicalDataTemplate x:Key="NodeTemplate" ItemsSource = "{Binding Children}" ItemTemplate="{StaticResource WidgetTemplate}">
                <TextBlock Text="{Binding Name}"/>
            </HierarchicalDataTemplate>

        </Grid.Resources>
Hristo
Telerik team
 answered on 18 Dec 2012
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
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
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
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?