Telerik Forums
UI for WPF Forum
3 answers
187 views
Hi,

i try to render WPF content with telerik chart-controls in VB6. This is possible if you are using the Microsoft Interop Forms Toolkit (http://msdn.microsoft.com/en-us/vbasic/bb419144.aspx). If i'm using the 2D controls everiting is fine. But if I switch to 3D I get a OutOfMemoryException or NullReferenceException.

Here is my XAML:
<UserControl x:Class="UserControl1" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:charts="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Charting">  
    <Grid> 
        <charts:RadChart x:Name="MyChart"/>  
    </Grid> 
</UserControl> 
 

This is the code-behind from the 2D version:
    Public Sub New()  
 
        ' This call is required by the Windows Form Designer.  
        InitializeComponent()  
 
        ' Add any initialization after the InitializeComponent() call.  
        MyChart.DefaultSeriesDefinition = New BarSeriesDefinition  
 
        Dim itemSource As Double() = {5, 9, 17, 10, 11, 3, 12}  
        MyChart.ItemsSource = itemSource  
 
    End Sub 
 

And here is the code-behind from the 3D version:
    Public Sub New()  
 
        ' This call is required by the Windows Form Designer.  
        InitializeComponent()  
 
        ' Add any initialization after the InitializeComponent() call.  
        MyChart.DefaultSeriesDefinition = New Bar3DSeriesDefinition  
 
        Dim itemSource As Double() = {5, 9, 17, 10, 11, 3, 12}  
        MyChart.ItemsSource = itemSource  
 
        AddHandler MyChart.DefaultView.ChartArea.Loaded, AddressOf Me.RadChart_Loaded  
 
    End Sub 
 
    Private Sub RadChart_Loaded(ByVal sender As ObjectByVal e As RoutedEventArgs)  
 
        Dim camera As New CameraExtension  
        camera.SpinAxis = SpinAxis.XY  
        camera.ZoomEnabled = True 
 
        MyChart.DefaultView.ChartArea.Extensions.Add(camera)  
 
    End Sub 

The same code works in a normal .NET-project and also in a WinForms-project on the ElementHost.

Best regards,
Dimi
Dimi
Top achievements
Rank 1
 answered on 04 Feb 2010
3 answers
648 views
Good Morning,

I have been working with the WPF demo/code.  It uses 

Telerik.Windows.QuickStart.dll extensively and I cannot track what is being done.  It hides many aspects, such as page transfers and returns.  Is there a place where I can see what is going on?

Take Care,
Dave

Hristo
Telerik team
 answered on 04 Feb 2010
2 answers
135 views
Hi all. I was wondering if it's possible to show the list of items in a RadComboBox by using a RadGridView. In other words, that when the user expands the RadComboBox, the items inside get shown in a RadGridView (with headers). I need this because I got a lot of info to show for each element (item) of the RadComboBox.

Thanks.

Hugo Aristizabal.
Hugo Aristizabal
Top achievements
Rank 2
 answered on 04 Feb 2010
1 answer
127 views
Hello

I have the setup as described below. I use the trial version binaries 2009.3.1314.35.
If you run this example and try to insert a new row by pressing the 'insert'-Key, then you result in an ArgumentException:
{"Property with specified name:  cannot be found on type: WpfApplication1.SimpleObject\r\nParameter name: propertyName"}.

The problem seems to be the 'SimpleObject'-Class. If you remove, or comment out, the ICustomTypeDescriptor interface from the class declaration then everything works ok.

Do you know this problem? Is there a solution or a work around?

Best regards,
Franziska

xaml:
<telerik:RadGridView x:Name="gridView"  
                                     ShowGroupPanel="False" IsFilteringAllowed="False" AutoGenerateColumns="False" 
                                     ItemsSource="{Binding PmodCollection}"  
                                     AddingNewDataItem="gridView_AddingNewDataItem" > 
            <telerik:RadGridView.Columns> 
                <telerik:GridViewDataColumn Header="Test" DataMemberBinding="{Binding Test}" /> 
                <telerik:GridViewComboBoxColumn UniqueName="columnDescriptor" Header="Descriptor" 
                                                        DataMemberBinding="{Binding SimpleObject}" DisplayMemberPath="Descriptor" 
                                                        ItemsSource="{Binding SimpleObjChoiceList}"/> 
            </telerik:RadGridView.Columns> 
</telerik:RadGridView> 
Code behind:
public partial class Window1 : Window 
        public Window1() 
        { 
            InitializeComponent(); 
 
            this.DataContext = new DataContext(); 
        } 
 
        private void gridView_AddingNewDataItem(object sender, GridViewAddingNewEventArgs e) 
        { 
            e.NewObject = new SimpleObjectPMod(); 
        } 
DataContext:
class DataContext 
        private List<SimpleObject> simpleObjs; 
        private ObservableCollection<SimpleObjectPMod> pmodCollection; 
 
        public DataContext() 
        { 
            simpleObjs = new List<SimpleObject>(); 
            simpleObjs.Add(new SimpleObject() { Descriptor = "bla" }); 
            simpleObjs.Add(new SimpleObject() { Descriptor = "fasel" }); 
 
            pmodCollection = new ObservableCollection<SimpleObjectPMod>(); 
        } 
 
        public List<SimpleObject> SimpleObjChoiceList 
        { 
            get { return simpleObjs; } 
        } 
 
        public ObservableCollection<SimpleObjectPMod> PmodCollection 
        { 
            get { return pmodCollection; } 
        } 
PMod:
class SimpleObjectPMod 
        public string Test 
        { 
            get; set; 
        } 
 
        public SimpleObject SimpleObject 
        { 
            get; set; 
        } 
Simple Object:
class SimpleObject : ICustomTypeDescriptor
{
        public string Descriptor
        {
            get; set;
        }

        #region Implementation of ICustomTypeDescriptor
        public AttributeCollection GetAttributes()
        {
            return TypeDescriptor.GetAttributes(this, true);
        }
        public string GetClassName()
        {
            return TypeDescriptor.GetClassName(this, true);
        }
        public string GetComponentName()
        {
            return TypeDescriptor.GetComponentName(this, true);
        }
        public TypeConverter GetConverter()
        {
            return TypeDescriptor.GetConverter(this, true);
        }
        public EventDescriptor GetDefaultEvent()
        {
            return TypeDescriptor.GetDefaultEvent(this, true);
        }
        public PropertyDescriptor GetDefaultProperty()
        {
            return TypeDescriptor.GetDefaultProperty(this, true);
        }
        public object GetEditor(Type editorBaseType)
        {
            return TypeDescriptor.GetEditor(this, editorBaseType, true);
        }
        public EventDescriptorCollection GetEvents()
        {
            return TypeDescriptor.GetEvents(this, true);
        }
        public EventDescriptorCollection GetEvents(Attribute[] attributes)
        {
            return TypeDescriptor.GetEvents(this, attributes, true);
        }
        public PropertyDescriptorCollection GetProperties()
        {
            return GetProperties(null);
        }
        public PropertyDescriptorCollection GetProperties(Attribute[] attributes)
        {
            return TypeDescriptor.GetProperties(this, attributes, true);
        }
        public object GetPropertyOwner(PropertyDescriptor pd)
        {
            return this;
        }
        #endregion
}
Nedyalko Nikolov
Telerik team
 answered on 04 Feb 2010
1 answer
116 views
Hi,

I am using the DatePicker as an usercontrol and in the Constructor of the Cntrol I am setting the following dates.

dateCtrl.DisplayDateStart = Convert.ToDateTime("01/01/2003", System.Globalization.CultureInfo.CurrentCulture);                        dateCtrl.DisplayDateEnd = Convert.ToDateTime("18/01/2010", System.Globalization.CultureInfo.CurrentCulture); 
dateCtrl.SelectableDateEnd = Convert.ToDateTime("18/01/2010", System.Globalization.CultureInfo.CurrentCulture);                        
dateCtrl.SelectedDate = Convert.ToDateTime("18/01/2010", System.Globalization.CultureInfo.CurrentCulture);

and while loading the control it throws the following exception:

System.ArgumentOutOfRangeException was unhandled
  Message="Invalid DisplayDateEnd value.\r\nParameter name: sender"
  Source="Telerik.Windows.Controls.Input"
  ParamName="sender"
  StackTrace:
       at Telerik.Windows.Controls.RadCalendar.OnDisplayDateEndChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
       at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
       at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
       at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
       at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, OperationType operationType)
       at System.Windows.StyleHelper.ApplyTemplatedParentValue(DependencyObject container, FrameworkObject child, Int32 childIndex, FrugalStructList`1& childRecordFromChildIndex, DependencyProperty dp, FrameworkElementFactory templateRoot)
       at System.Windows.StyleHelper.InvalidatePropertiesOnTemplateNode(DependencyObject container, FrameworkObject child, Int32 childIndex, FrugalStructList`1& childRecordFromChildIndex, Boolean isDetach, FrameworkElementFactory templateRoot)
       at System.Windows.StyleHelper.LoadOptimizedTemplateContent(DependencyObject container, ParserContext parserContext, OptimizedTemplateContent optimizedTemplateContent, FrameworkTemplate frameworkTemplate, IComponentConnector componentConnector, IStyleConnector styleConnector, List`1 affectedChildren, UncommonField`1 templatedNonFeChildrenField)
       at System.Windows.FrameworkTemplate.LoadContent(DependencyObject container, List`1 affectedChildren, UncommonField`1 templatedNonFeChildrenField)
       at System.Windows.StyleHelper.ApplyTemplateContent(UncommonField`1 dataField, DependencyObject container, FrameworkElementFactory templateRoot, Int32 lastChildIndex, HybridDictionary childIndexFromChildID, FrameworkTemplate frameworkTemplate)
       at System.Windows.FrameworkTemplate.ApplyTemplateContent(UncommonField`1 templateDataField, FrameworkElement container)
       at System.Windows.FrameworkElement.ApplyTemplate()
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
       at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Border.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Control.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.DockPanel.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.StackPanel.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
       at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Border.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Control.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.StackPanel.MeasureOverride(Size constraint)
       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.RenderMessageHandler(Object resizedCompositionTarget)
       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)
       at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, 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)
       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, Boolean isSingleParameter)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter)
       at System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg)
       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.Threading.Dispatcher.Run()
       at System.Windows.Application.RunDispatcher(Object ignore)
       at System.Windows.Application.RunInternal(Window window)
       at System.Windows.Application.Run(Window window)
       at System.Windows.Application.Run()
       at ITV.MSS.Shell.App.Main() in E:\MediaSales\MediaSalesSuite\Dev\Shell\ITV.MSS.Shell.Shell\obj\Debug\App.g.cs:line 0
       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
       at System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel)
       at System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly()
       at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData)
       at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext)
       at System.Activator.CreateInstance(ActivationContext activationContext)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException:



If I Comment the following lines Or Set the DisplayDateEnd to DateTime.Now() then it works fine.

dateCtrl.DisplayDateStart = Convert.ToDateTime("01/01/2003", System.Globalization.CultureInfo.CurrentCulture);                       
//dateCtrl.DisplayDateEnd = Convert.ToDateTime("18/01/2010", System.Globalization.CultureInfo.CurrentCulture); 
dateCtrl.SelectableDateEnd = Convert.ToDateTime("18/01/2010", System.Globalization.CultureInfo.CurrentCulture);                        
dateCtrl.SelectedDate = Convert.ToDateTime("18/01/2010", System.Globalization.CultureInfo.CurrentCulture);

Please let me know what can be the possible cause of this exception.

Thanks,
Anjan
Konstantina
Telerik team
 answered on 04 Feb 2010
1 answer
122 views
HI,

I'm trying to style my RadGridView row based upon a style as detailed in the example at the following address:-

http://blogs.telerik.com/blogs/posts/09-02-03/how_to_use_custom_row_layouts_in_radgridview_for_wpf.aspx

However, my application refuses to compile as it does not recognize the ColumnName property used in the GridViewCell tag.

I've looked at the GridViewCell object in the object browser and cannot see the property there either. Has this been replaced with some other method of referencing the column from within a style?

Many thanks,
Peter.
Vlad
Telerik team
 answered on 04 Feb 2010
4 answers
107 views
Hi there,

Has anyone attempted to use the Telerik Radcontrols with the techniques and patterns presented in the Microsoft Composite Application Library? I'm interested in using the docking manager, ribbon control and chart controls from Radcontrols in a dual-deployed WPF/Silverlight app, but am very interested in employing the techniques presented in CAL to give a nicely decoupled, super maintainable distributed system. 

Any thoughts on this?
Thanks,
Andrew
Valentin.Stoychev
Telerik team
 answered on 04 Feb 2010
1 answer
77 views
We would like to use the GridView control in our application to display and edit the information for Tasks associated with Projects for a Customer. Each task may have subtasks that are associated with it (for example, "Task A" has subtasks "Task A1" and "Task A2". There are fields to be loaded into the GridView that would need to be maintained at the Main Task level ("Task A") and there are fields that need to be maintained at the Sub Task Level ("Task A1" or "Task A2"). However, when we group the data in the GridView by Main Task, the Sub Tab rows are expandable but the Main Task level doesn't display any of the data associated with the Data record. It shows as a seperate line in the Sub Task area. Is it possible to have the Main Task level retain the columns and the ability to edit it while also having the Sub Task rows be expandable beneath it?

Any information would be greatly appreciated.

Thanks.

TWBS
Pavel Pavlov
Telerik team
 answered on 04 Feb 2010
8 answers
335 views
I have the following problem:

I open big window with a radgrid. and when i resize the window (reduce the width) the grid's margins is outside the window.
It happens with all grids. I tried to "play" with width, max width etc but it doesn't help

See attached file.

This is the code for opening the window

        private int resolutionWidth = 1920;
        private int resolutionHeight = 1200;

            var mainWindow = new TaskbarRadWindow
            {
                Content = contect,
                Header = title,
                WindowState = WindowState.Normal,
                Width = resolutionWidth,
                Height = resolutionHeight,
                MaxWidth = resolutionWidth,
                MaxHeight = resolutionHeight,
            };

Thanks,
Ofer
ofer alper
Top achievements
Rank 1
 answered on 04 Feb 2010
1 answer
221 views
My intention is to use the 'DisplayValueHolder.DisplayValue' for the filter list user interface and 'DisplayHolder.ID' for creating a query which will return the filtered data.

        public class DisplayValueHolder
        {
             public string ID{get;set;}
             public string Value{get;set;}
        }

Is it possible to use the GridView's 'DistinctValuesLoading' event to return a collection of objects like DisplayValueHolder  which contains different values for display and the data?

Nikhil

Rossen Hristov
Telerik team
 answered on 04 Feb 2010
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
SyntaxEditor
MultiColumnComboBox
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
Iron
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
Iron
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?