Telerik Forums
UI for WPF Forum
4 answers
168 views
Hello,

I'm programmably creating menu items within the context menu.  I assign one a Tag property, but the MenuItem in the event argument that comes back in the ItemClick event has a null Tag, so I'm not sure why that is the case?  The tag is set in the collection of items in the menu....

Thanks.
Brian Mains
Top achievements
Rank 1
 answered on 03 Apr 2010
1 answer
178 views
Hello,
     I am trying to work with the RadGridView and implement the external filter example in your How To section.  I have been getting this error that I cannot seem to figure out.  It happens when I type in the search to box and it occurs with a column header click event.  At first I thought it had to do with saving and loading the state of the grid, but now I am not so sure.  The error is being thrown in the CustomFilterDescription Class on the property FilterValue() and on the line:
Me.OnPropertyChanged("FilterValue")

Here is the error I am getting with the search for. (any suggestions would be appreciated)

System.ArgumentException was unhandled by user code
  Message=The argument to DbIsNullExpression must refer to a primitive or reference type.
  Source=System.Data.Entity
  StackTrace:
       at System.Data.Common.CommandTrees.ExpressionBuilder.Internal.ArgumentValidation.ValidateIsNull(DbExpression argument, Boolean allowRowType)
       at System.Data.Objects.ELinq.ExpressionConverter.EqualsTranslator.CreateIsNullExpression(ExpressionConverter parent, Expression input)
       at System.Data.Objects.ELinq.ExpressionConverter.EqualsTranslator.TypedTranslate(ExpressionConverter parent, BinaryExpression linq)
       at System.Data.Objects.ELinq.ExpressionConverter.TypedTranslator`1.Translate(ExpressionConverter parent, Expression linq)
       at System.Data.Objects.ELinq.ExpressionConverter.TranslateExpression(Expression linq)
       at System.Data.Objects.ELinq.ExpressionConverter.NotTranslator.TypedTranslate(ExpressionConverter parent, UnaryExpression linq)
       at System.Data.Objects.ELinq.ExpressionConverter.TypedTranslator`1.Translate(ExpressionConverter parent, Expression linq)
       at System.Data.Objects.ELinq.ExpressionConverter.TranslateExpression(Expression linq)
       at System.Data.Objects.ELinq.ExpressionConverter.NotEqualsTranslator.TypedTranslate(ExpressionConverter parent, BinaryExpression linq)
       at System.Data.Objects.ELinq.ExpressionConverter.TypedTranslator`1.Translate(ExpressionConverter parent, Expression linq)
       at System.Data.Objects.ELinq.ExpressionConverter.TranslateExpression(Expression linq)
       at System.Data.Objects.ELinq.ExpressionConverter.ConditionalTranslator.TypedTranslate(ExpressionConverter parent, ConditionalExpression linq)
       at System.Data.Objects.ELinq.ExpressionConverter.TypedTranslator`1.Translate(ExpressionConverter parent, Expression linq)
       at System.Data.Objects.ELinq.ExpressionConverter.TranslateExpression(Expression linq)
       at System.Data.Objects.ELinq.ExpressionConverter.BinaryTranslator.TypedTranslate(ExpressionConverter parent, BinaryExpression linq)
       at System.Data.Objects.ELinq.ExpressionConverter.TypedTranslator`1.Translate(ExpressionConverter parent, Expression linq)
       at System.Data.Objects.ELinq.ExpressionConverter.TranslateExpression(Expression linq)
       at System.Data.Objects.ELinq.ExpressionConverter.TranslateIntoCanonicalFunction(String functionName, Expression Expression, Expression[] linqArguments)
       at System.Data.Objects.ELinq.ExpressionConverter.MethodCallTranslator.CanonicalFunctionDefaultTranslator.Translate(ExpressionConverter parent, MethodCallExpression call)
       at System.Data.Objects.ELinq.ExpressionConverter.MethodCallTranslator.TypedTranslate(ExpressionConverter parent, MethodCallExpression linq)
       at System.Data.Objects.ELinq.ExpressionConverter.TypedTranslator`1.Translate(ExpressionConverter parent, Expression linq)
       at System.Data.Objects.ELinq.ExpressionConverter.TranslateExpression(Expression linq)
       at System.Data.Objects.ELinq.ExpressionConverter.TranslateFunctionIntoLike(MethodCallExpression call, Boolean insertPercentAtStart, Boolean insertPercentAtEnd, Func`5 defaultTranslator)
       at System.Data.Objects.ELinq.ExpressionConverter.MethodCallTranslator.StringContainsTranslator.Translate(ExpressionConverter parent, MethodCallExpression call)
       at System.Data.Objects.ELinq.ExpressionConverter.MethodCallTranslator.TypedTranslate(ExpressionConverter parent, MethodCallExpression linq)
       at System.Data.Objects.ELinq.ExpressionConverter.TypedTranslator`1.Translate(ExpressionConverter parent, Expression linq)
       at System.Data.Objects.ELinq.ExpressionConverter.TranslateExpression(Expression linq)
       at System.Data.Objects.ELinq.ExpressionConverter.EqualsTranslator.TypedTranslate(ExpressionConverter parent, BinaryExpression linq)
       at System.Data.Objects.ELinq.ExpressionConverter.TypedTranslator`1.Translate(ExpressionConverter parent, Expression linq)
       at System.Data.Objects.ELinq.ExpressionConverter.TranslateExpression(Expression linq)
       at System.Data.Objects.ELinq.ExpressionConverter.TranslateLambda(LambdaExpression lambda, DbExpression input)
       at System.Data.Objects.ELinq.ExpressionConverter.TranslateLambda(LambdaExpression lambda, DbExpression input, DbExpressionBinding& binding)
       at System.Data.Objects.ELinq.ExpressionConverter.MethodCallTranslator.OneLambdaTranslator.Translate(ExpressionConverter parent, MethodCallExpression call, DbExpression& source, DbExpressionBinding& sourceBinding, DbExpression& lambda)
       at System.Data.Objects.ELinq.ExpressionConverter.MethodCallTranslator.OneLambdaTranslator.Translate(ExpressionConverter parent, MethodCallExpression call)
       at System.Data.Objects.ELinq.ExpressionConverter.MethodCallTranslator.SequenceMethodTranslator.Translate(ExpressionConverter parent, MethodCallExpression call, SequenceMethod sequenceMethod)
       at System.Data.Objects.ELinq.ExpressionConverter.MethodCallTranslator.TypedTranslate(ExpressionConverter parent, MethodCallExpression linq)
       at System.Data.Objects.ELinq.ExpressionConverter.TypedTranslator`1.Translate(ExpressionConverter parent, Expression linq)
       at System.Data.Objects.ELinq.ExpressionConverter.TranslateExpression(Expression linq)
       at System.Data.Objects.ELinq.ExpressionConverter.MethodCallTranslator.OneLambdaTranslator.Translate(ExpressionConverter parent, MethodCallExpression call, DbExpression& source, DbExpressionBinding& sourceBinding, DbExpression& lambda)
       at System.Data.Objects.ELinq.ExpressionConverter.MethodCallTranslator.OneLambdaTranslator.Translate(ExpressionConverter parent, MethodCallExpression call)
       at System.Data.Objects.ELinq.ExpressionConverter.MethodCallTranslator.SequenceMethodTranslator.Translate(ExpressionConverter parent, MethodCallExpression call, SequenceMethod sequenceMethod)
       at System.Data.Objects.ELinq.ExpressionConverter.MethodCallTranslator.TypedTranslate(ExpressionConverter parent, MethodCallExpression linq)
       at System.Data.Objects.ELinq.ExpressionConverter.TypedTranslator`1.Translate(ExpressionConverter parent, Expression linq)
       at System.Data.Objects.ELinq.ExpressionConverter.TranslateExpression(Expression linq)
       at System.Data.Objects.ELinq.ExpressionConverter.Convert()
       at System.Data.Objects.ELinq.ELinqQueryState.GetExecutionPlan(Nullable`1 forMergeOption)
       at System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
       at System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable<T>.GetEnumerator()
       at System.Data.Objects.ObjectQuery`1.GetEnumeratorInternal()
       at System.Data.Objects.ObjectQuery.System.Collections.IEnumerable.GetEnumerator()
       at Telerik.Windows.Data.QueryableCollectionView.PopulateInternalList(IQueryable view)
       at Telerik.Windows.Data.QueryableCollectionView.CreateInternalList()
       at Telerik.Windows.Data.QueryableCollectionView.EnsureInternalList()
       at Telerik.Windows.Data.QueryableCollectionView.get_InternalList()
       at Telerik.Windows.Data.QueryableCollectionView.get_IsEmpty()
       at Telerik.Windows.Controls.GridView.BaseItemsControl.OnItemCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
       at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
       at Telerik.Windows.Data.DataItemCollection.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
       at Telerik.Windows.Data.DataItemCollection.Telerik.Windows.Data.IWeakEventListener<System.Collections.Specialized.NotifyCollectionChangedEventArgs>.ReceiveWeakEvent(Object sender, NotifyCollectionChangedEventArgs e)
       at Telerik.Windows.Data.WeakEvent.WeakListener`1.Handler(Object sender, TArgs args)
       at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
       at Telerik.Windows.Data.QueryableCollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
       at Telerik.Windows.Data.QueryableCollectionView.RefreshAndRaiseCollectionChanged(NotifyCollectionChangedEventArgs args)
       at Telerik.Windows.Data.QueryableCollectionView.Refresh()
       at Telerik.Windows.Data.QueryableCollectionView.RefreshOrDefer()
       at Telerik.Windows.Data.QueryableCollectionView.OnFilterDescriptorsItemChanged(Object sender, ItemChangedEventArgs`1 e)
       at Telerik.Windows.Data.ObservableItemCollection`1.OnItemChanged(ItemChangedEventArgs`1 e)
       at Telerik.Windows.Data.ObservableItemCollection`1.OnItemPropertyChanged(Object sender, PropertyChangedEventArgs e)
       at System.ComponentModel.PropertyChangedEventHandler.Invoke(Object sender, PropertyChangedEventArgs e)
       at Telerik.Windows.Data.FilterDescriptorBase.OnPropertyChanged(PropertyChangedEventArgs args)
       at Telerik.Windows.Data.FilterDescriptorBase.OnPropertyChanged(String propertyName)
       at FRPilot.Core.CustomFilterDescriptor.set_FilterValue(String value) in C:\Development\FRPilot\Core\FRPilot.Core\CustomFilterDescriptor.vb:line 25
       at FRPilot.View.GroupView.SearchForTextBox_TextChanged(Object sender, TextChangedEventArgs e) in C:\Development\FRPilot\Presentation\FRPilot.View\Views\GroupView.xaml.vb:line 104
       at System.Windows.Controls.TextChangedEventArgs.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 e)
       at System.Windows.Controls.Primitives.TextBoxBase.OnTextChanged(TextChangedEventArgs e)
       at System.Windows.Controls.Primitives.TextBoxBase.OnTextContainerChanged(Object sender, TextContainerChangedEventArgs e)
       at System.Windows.Controls.TextBox.OnTextContainerChanged(Object sender, TextContainerChangedEventArgs e)
       at System.Windows.Documents.TextContainerChangedEventHandler.Invoke(Object sender, TextContainerChangedEventArgs e)
       at System.Windows.Documents.TextContainer.EndChange(Boolean skipEvents)
       at System.Windows.Documents.TextContainer.System.Windows.Documents.ITextContainer.EndChange(Boolean skipEvents)
       at System.Windows.Documents.TextRangeBase.EndChange(ITextRange thisRange, Boolean disableScroll, Boolean skipEvents)
       at System.Windows.Documents.TextRange.System.Windows.Documents.ITextRange.EndChange(Boolean disableScroll, Boolean skipEvents)
       at System.Windows.Documents.TextRange.ChangeBlock.System.IDisposable.Dispose()
       at System.Windows.Documents.TextEditorTyping.DoTextInput(TextEditor This, String textData, Boolean isInsertKeyToggled, Boolean acceptControlCharacters)
       at System.Windows.Documents.TextEditorTyping.TextInputItem.Do()
       at System.Windows.Documents.TextEditorTyping.ScheduleInput(TextEditor This, InputItem item)
       at System.Windows.Documents.TextEditorTyping.OnTextInput(Object sender, TextCompositionEventArgs e)
       at System.Windows.Controls.Primitives.TextBoxBase.OnTextInput(TextCompositionEventArgs e)
       at System.Windows.UIElement.OnTextInputThunk(Object sender, TextCompositionEventArgs e)
       at System.Windows.Input.TextCompositionEventArgs.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.RaiseTrustedEvent(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.TextCompositionManager.UnsafeCompleteComposition(TextComposition composition)
       at System.Windows.Input.TextCompositionManager.PostProcessInput(Object sender, ProcessInputEventArgs e)
       at System.Windows.Input.InputManager.RaiseProcessInputEventHandlers(ProcessInputEventHandler postProcessInput, ProcessInputEventArgs processInputEventArgs)
       at System.Windows.Input.InputManager.ProcessStagingArea()
       at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
       at System.Windows.Input.TextCompositionManager.UnsafeStartComposition(TextComposition composition)
       at System.Windows.Input.TextCompositionManager.PostProcessInput(Object sender, ProcessInputEventArgs e)
       at System.Windows.Input.InputManager.RaiseProcessInputEventHandlers(ProcessInputEventHandler postProcessInput, ProcessInputEventArgs processInputEventArgs)
       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.ProcessTextInputAction(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at System.Windows.Interop.HwndSource.OnPreprocessMessage(Object param)
       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)
  InnerException:
shawn slatunas
Top achievements
Rank 1
 answered on 02 Apr 2010
1 answer
92 views
Hi Team,

I have the problem about horizontal scrolling.
In the following case, a horizontal scroll does not move.

AutoGenerateColumns = False
(when binding data to a column manually)
EnableColumnVirtualization = True
column width is specified on the Code.

Version: Telerik RadControls for WPF 2010 Q1 Trial

Is there any method of avoiding this problem?

Please help me.

Regards,
athasian.
Rossen Hristov
Telerik team
 answered on 02 Apr 2010
1 answer
78 views
Just wondering if there was something like BringItemIntoView(), but that could bring the item exactly to a desired position?

Something like 

radTreeView.BringItemIntoView(radTreeView.SelectedItem, new Point(0, 100)); 

Let me know.

Thanks!
Kiril Stanoev
Telerik team
 answered on 02 Apr 2010
5 answers
279 views
I followed the instructions in another forum post for changing the colors of my pie chart and that worked fine, but the legend colors continued to show the original theme colours.

 

 

My XAML inside the grid resources (I only set the first two colors).

 

 
            <SolidColorBrush x:Key="RadialItemStroke" Color="#FF000000"/>  
 
            <telerikStyling:StylesPalette x:Key="{telerikStyling:ThemeResourceKey   
                    ThemeType={x:Type telerikStyling:Office_BlackTheme},   
                    ElementType={x:Type telerikStyling:ChartArea},   
                    ResourceId={x:Static telerikStyling:ResourceHelper.ResourceKeyRadialStyle}}"> 
                <Style TargetType="{x:Type Shape}">  
                    <Setter Property="Stroke" Value="{StaticResource RadialItemStroke}" /> 
                    <Setter Property="StrokeThickness" Value="2" /> 
                    <Setter Property="Fill" Value="{StaticResource WidgetLightGreen}" /> 
                </Style> 
                <Style TargetType="{x:Type Shape}">  
                    <Setter Property="Stroke" Value="{StaticResource RadialItemStroke}" /> 
                    <Setter Property="StrokeThickness" Value="2" /> 
                    <Setter Property="Fill" Value="{StaticResource WidgetOrange}" /> 
                </Style> 
            </telerikStyling:StylesPalette> 

My chart.
            <telerik:RadChart x:Name="ProgressChart"   
                              Margin="4,8,4,4" 
                              VerticalAlignment="Stretch"   
                              HorizontalAlignment="Stretch">  
                <telerik:RadChart.Background> 
                    <SolidColorBrush Color="Transparent"/>  
                </telerik:RadChart.Background> 
            </telerik:RadChart> 
 

Nothing fancy, but the legend doesn't color correctly.  I saw another post that mentionned the data series naming & legend items naming have been decoupled in the latest release - so I am assuming that also the colors were seperated as well, but I can't figure out how to change them.

Greg

Ves
Telerik team
 answered on 02 Apr 2010
2 answers
207 views
I have this event handler:

 
 
        private void theTree_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e) 
        { 
            // do something 
        } 

And it fires all right when I move the scroll bar by dragging it, but when I move around with the mouse wheel, it doesn't fire. Any workaround for this?

Thanks!
Lauren Nickerson
Top achievements
Rank 1
 answered on 01 Apr 2010
5 answers
166 views
With Q1 2010 themes no longer render correctly no matter which one is specified.
More info

Telerik.Windows.Controls.GridView
Telerik.Windows.Controls.Input
Telerik.Windows.Controls.Navigation
Telerik.Windows.Controls
Telerik.Windows.Data

 

 

 

 

<

 

Window x:Class="Telerick2010.Window1"

 

 

 

xmlns

 

="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

 

 

xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"

 

 

xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

 

 

Title="Window1" Height="300" Width="300">

 

 

 

<telerik:RadExpander telerik:StyleManager.Theme="Summer" Header="BOB" Grid.Column="0" Grid.Row="0" >

 

 

 

 

</telerik:RadExpander>

 

</

 

Window>

 


Error 1 '/Microsoft.Windows.Design.Developer;component/themes/GridAdorners.xaml' value cannot be assigned to property 'Source' of object 'System.Windows.ResourceDictionary'. Cannot create instance of 'GenericTheme' defined in assembly 'Microsoft.Windows.Design.Interaction, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Exception has been thrown by the target of an invocation.    Error at object 'ResourceDictionary_4'. C:\Users\bmitchell\Documents\Visual Studio 2008\Projects\Telerick2010\Telerick2010\Window1.xaml 6 9 Telerick2010
Ivan
Telerik team
 answered on 01 Apr 2010
4 answers
199 views
I'm in the process of testing out the telerik rad controls for WPF and trying to decide if these controls best fit my needs.
Currently I'm testing the RadDocking and what I'm looking to accomplish is, have any panel I put in have the ability to fill the container and then the next panel would split depending on where I dock it.

Example:
If I have two floating panels and if I drag and dock the first left, it will dock left and fill the whole RadDock, then if I take the second panel and dock bottom, it will split the first panel and appear to be on the bottom. then I'll continue to dock like this until the interface is built(with additional panels.
Also I'd like to not have any DocumentPanes, I don't want to see tabs unless I fill one panel inside another.

Hopefully this makes sensem I'd appreciate any example someone can provide to accomplish this.

thanks steve
steve white
Top achievements
Rank 1
 answered on 01 Apr 2010
3 answers
92 views
It seems like there are a 2 problems if you try to validate your data by using IDataErrorInfo.

- The UI doesn't get updated properly. I set the background to red for a test and added a breakpoint at the validation part of the code. The code gets validated properly but the background stays red once the error is resolved.
- If you enter a wrong value the text gets moved to the top left corner of the cell and you aren't able to edit the cell until you press escape.
Nedyalko Nikolov
Telerik team
 answered on 01 Apr 2010
1 answer
45 views
Hi Telerik,

When I set tick line styles as follows:

<Style x:Key="AxisTickStyle" TargetType="Line">  
        <Setter Property="Stroke">  
            <Setter.Value> 
                <SolidColorBrush Color="{DynamicResource ColorDarkGray}" />               
            </Setter.Value>           
        </Setter> 
    </Style> 
chart.DefaultView.ChartArea.AxisX.AxisStyles.TickLineStyle = Application.Current.Resources["AxisTickStyle"as Style;  
chart.DefaultView.ChartArea.AxisX.AxisStyles.MinorTickLineStyle = Application.Current.Resources["AxisTickStyle"as Style; 

They dissappear completely, looks like the actually width of them decreases to 0 because the ItemLabels come to the edge of the axis

Any help would be appreciated

Rav
Vladimir Milev
Telerik team
 answered on 01 Apr 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?