Telerik Forums
UI for WPF Forum
1 answer
161 views

I am trying to use the Telerik reporting inside a System.Addin control. My control has a separate appdomain and thread then the main form. This is done to isolate the main control from any addins that could cause issues. The RadSlider is grabbing a reference to the mainwindow which is outside of my appdomain and is on a different thread. Is there a way to remove the reference to the main window or set it to the addin control?

System.Windows.Markup.XamlParseException occurred
 
Message=Cannot create instance of 'RadSlider' defined in assembly 'Telerik.Windows.Controls, Version=2010.3.1110.35, Culture=neutral, PublicKeyToken=5803cfa389c90ce7'. Exception has been thrown by the target of an invocation.  Error at object 'System.Windows.Controls.StackPanel' in markup file 'Telerik.ReportViewer.Wpf;component/Themes/Default/ReportViewer.xaml'.
 
Source=PresentationFramework
 
LineNumber=0
 
LinePosition=0
 
NameContext=87_T
 
StackTrace:
       at
System.Windows.Markup.XamlParseException.ThrowException(String message, Exception innerException, Int32 lineNumber, Int32 linePosition, Uri baseUri, XamlObjectIds currentXamlObjectIds, XamlObjectIds contextXamlObjectIds, Type objectType)
       at
System.Windows.Markup.XamlParseException.ThrowException(ParserContext parserContext, Int32 lineNumber, Int32 linePosition, String message, Exception innerException)
       at
System.Windows.Markup.BamlRecordReader.ThrowExceptionWithLine(String message, Exception innerException)
       at
System.Windows.Markup.BamlRecordReader.CreateInstanceFromType(Type type, Int16 typeId, Boolean throwOnFail)
       at
System.Windows.Markup.BamlRecordReader.GetElementAndFlags(BamlElementStartRecord bamlElementStartRecord, Object& element, ReaderFlags& flags, Type& delayCreatedType, Int16& delayCreatedTypeId)
       at
System.Windows.Markup.BamlRecordReader.BaseReadElementStartRecord(BamlElementStartRecord bamlElementRecord)
       at
System.Windows.Markup.BamlRecordReader.ReadElementStartRecord(BamlElementStartRecord bamlElementRecord)
       at
System.Windows.Markup.BamlRecordReader.ReadRecord(BamlRecord bamlRecord)
       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.Decorator.MeasureOverride(Size constraint)
       at
System.Windows.Documents.AdornerDecorator.MeasureOverride(Size constraint)
       at
System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at
System.Windows.UIElement.Measure(Size availableSize)
       at
System.Windows.Interop.HwndSource.SetLayoutSize()
       at
System.Windows.Interop.HwndSource.set_RootVisualInternal(Visual value)
       at
System.Windows.Interop.HwndSource.set_RootVisual(Visual value)
       at
System.Windows.Forms.Integration.ElementHost.OnHandleCreated(EventArgs e)
       at
System.Windows.Forms.Control.WmCreate(Message& m)
       at
System.Windows.Forms.Control.WndProc(Message& m)
       at
System.Windows.Forms.Integration.ElementHost.WndProc(Message& m)
       at
System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at
System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at
System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at
System.Windows.Forms.UnsafeNativeMethods.IntCreateWindowEx(Int32 dwExStyle, String lpszClassName, String lpszWindowName, Int32 style, Int32 x, Int32 y, Int32 width, Int32 height, HandleRef hWndParent, HandleRef hMenu, HandleRef hInst, Object pvParam)
       at
System.Windows.Forms.UnsafeNativeMethods.CreateWindowEx(Int32 dwExStyle, String lpszClassName, String lpszWindowName, Int32 style, Int32 x, Int32 y, Int32 width, Int32 height, HandleRef hWndParent, HandleRef hMenu, HandleRef hInst, Object pvParam)
       at
System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp)
       at
System.Windows.Forms.Control.CreateHandle()
       at
System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
       at
System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
       at
System.Windows.Forms.Control.CreateControl()
       at
System.Windows.Forms.Control.WmShowWindow(Message& m)
       at
System.Windows.Forms.Control.WndProc(Message& m)
       at
System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       at
System.Windows.Forms.ContainerControl.WndProc(Message& m)
       at
System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at
System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at
System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at
System.Windows.Forms.UnsafeNativeMethods.IntCreateWindowEx(Int32 dwExStyle, String lpszClassName, String lpszWindowName, Int32 style, Int32 x, Int32 y, Int32 width, Int32 height, HandleRef hWndParent, HandleRef hMenu, HandleRef hInst, Object pvParam)
       at
System.Windows.Forms.UnsafeNativeMethods.CreateWindowEx(Int32 dwExStyle, String lpszClassName, String lpszWindowName, Int32 style, Int32 x, Int32 y, Int32 width, Int32 height, HandleRef hWndParent, HandleRef hMenu, HandleRef hInst, Object pvParam)
       at
System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp)
       at
System.Windows.Forms.Control.CreateHandle()
       at
System.Windows.Forms.Control.get_Handle()
       at
System.Windows.Forms.Integration.WindowsFormsHost.BuildWindowCore(HandleRef hwndParent)
       at
System.Windows.Interop.HwndHost.BuildWindow(HandleRef hwndParent)
       at
System.Windows.Interop.HwndHost.BuildOrReparentWindow()
       at
System.Windows.Interop.HwndHost.OnSourceChanged(Object sender, SourceChangedEventArgs e)
       at
System.Windows.SourceChangedEventArgs.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.PresentationSource.UpdateSourceOfElement(DependencyObject doTarget, DependencyObject doAncestor, DependencyObject doOldParent)
       at
System.Windows.PresentationSource.RootChanged(Visual oldRoot, Visual newRoot)
       at
System.Windows.Interop.HwndSource.set_RootVisualInternal(Visual value)
       at
System.Windows.Interop.HwndSource.set_RootVisual(Visual value)
       at
System.AddIn.Pipeline.FrameworkElementAdapters.ViewToContractAdapter(FrameworkElement root)
       at DRIP
.AddIn.Adapter.DRIPAddInViewToContractAdapter.UrlHandler(String uri)
 
InnerException: System.Reflection.TargetInvocationException
       
Message=Exception has been thrown by the target of an invocation.
       
Source=mscorlib
       
StackTrace:
            at
System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck)
            at
System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache)
            at
System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache)
            at
System.Activator.CreateInstance(Type type, Boolean nonPublic)
            at
System.Windows.Markup.BamlRecordReader.CreateInstanceFromType(Type type, Int16 typeId, Boolean throwOnFail)
       
InnerException: System.InvalidOperationException
           
Message=The calling thread cannot access this object because a different thread owns it.
           
Source=WindowsBase
           
StackTrace:
                 at
System.Windows.Threading.Dispatcher.VerifyAccess()
                 at
System.Windows.Threading.DispatcherObject.VerifyAccess()
                 at
System.Windows.Application.get_MainWindow()
                 at
Telerik.Windows.Controls.RadSlider..ctor() in c:\Builds\WPF_Scrum\Release_WPF_2010_Q3\Sources\Development\Core\Controls\Slider\RadSlider.cs:line 217
           
InnerException:

Kiril Stanoev
Telerik team
 answered on 24 Nov 2010
3 answers
101 views
Can you let me know if you use the REST API or SOAP when you use Bing as your Map Provider?
Giuseppe
Telerik team
 answered on 24 Nov 2010
3 answers
77 views
I want to edit the RadPaneGroup Windows7 template.

When I use the "Edit Template... -> Edit a Copy" method in Expression Blend, I always get a copy of the "Office_BlackTheme" template, even If I use StyleManager.Theme="Windows7" for the RadPaneGroup in XAML.

How do I get the Windows7 template?
Pana
Telerik team
 answered on 24 Nov 2010
1 answer
132 views
Hi,

I've tried to use ScheduleView in Winforms application placing it into ElementHost instance. I always get the following exception on new appointment add. It occures in both cases: add through UI and via code.

Telerik.Windows.Controls.ScheduleView.dll!Telerik.Windows.Controls.ScheduleViewBase.PrepareAppointment(System.Windows.UIElement container, Telerik.Windows.Controls.OccurrenceInfo occurrenceInfo) Line 3615 + 0x1f bytes   C#
Telerik.Windows.Controls.ScheduleView.dll!Telerik.Windows.Controls.ScheduleViewBase.GetContainerForItem(object item, int level, Telerik.Windows.Controls.GroupHeader parentGroup) Line 2208 C#
Telerik.Windows.Controls.ScheduleView.dll!Telerik.Windows.Controls.ScheduleViewBase.GetAppointmentContainer(Telerik.Windows.Controls.OccurrenceInfo occurrenceInfo) Line 3785 + 0x10 bytes  C#
Telerik.Windows.Controls.ScheduleView.dll!Telerik.Windows.Controls.ScheduleViewBase.GetAppointmentContainers(Telerik.Windows.Controls.ScheduleView.DateSpan visibleDateSpan, double availableLength) Line 1713 + 0x12 bytes C#
Telerik.Windows.Controls.ScheduleView.dll!Telerik.Windows.Controls.AppointmentsPanel.MeasureOverride(System.Windows.Size availableSize) Line 172 + 0x41 bytes   C#
[External Code]
Telerik.Windows.Controls.Navigation.dll!Telerik.Windows.Controls.RadWindowPopup.WindowPopupWindowFactory.WindowPopupWindowImpl.OpenPopup() Line 185 + 0x10 bytes    C#
Telerik.Windows.Controls.Navigation.dll!Telerik.Windows.Controls.RadWindowPopup.WindowPopup.Open(bool isModal) Line 68  C#
Telerik.Windows.Controls.Navigation.dll!Telerik.Windows.Controls.RadWindow.ShowWindow(bool modal) Line 2462 C#
Telerik.Windows.Controls.Navigation.dll!Telerik.Windows.Controls.RadWindow.ShowDialog() Line 1010   C#
Telerik.Windows.Controls.ScheduleView.dll!Telerik.Windows.Controls.SchedulerWindow.Show(bool isModal) Line 22 + 0x9 bytes   C#
Telerik.Windows.Controls.ScheduleView.dll!Telerik.Windows.Controls.ScheduleViewBase.OpenAppointmentDialog(Telerik.Windows.Controls.ScheduleView.Occurrence occurrence, Telerik.Windows.Controls.AppointmentViewMode viewMode) Line 287  C#
Telerik.Windows.Controls.ScheduleView.dll!Telerik.Windows.Controls.ScheduleViewBase.CreateAppointmentWithDialog() Line 28   C#
Telerik.Windows.Controls.ScheduleView.dll!Telerik.Windows.Controls.ScheduleViewBase.OnCreateAppointmentExecuted(object sender, System.Windows.Input.ExecutedRoutedEventArgs e) Line 121 C#

The same ScheduleView in WPF host works fine.

I've comminted new issue 368561 in Telereik bug tracking system.

Thank you,
Anatoly
George
Telerik team
 answered on 24 Nov 2010
1 answer
80 views
Hi,

When a RadPane is in autohide state and we take mouse pointer over the autohide area, it slides out and overlaps other windows.
It happens even when our application is not active, and some other application is active. I think it is heppening just because RadPane is hosted inside FakePopupWindow and when it slides out and it remains always on Top.

I want that when application is inactive and I take mouse over the autohide area, it should not slides out the RadPane.
Please look into the problem and suggest me some effective solution.

I have attached the screenshot of the scenario.
Nitin
Top achievements
Rank 1
 answered on 24 Nov 2010
2 answers
81 views
Hi,

Is it possible to alter default timeline direction in case of vertical TimelineView orientation? I need to display later dates higher than earlier.

Thanks,
Anatoly
anatoly
Top achievements
Rank 1
 answered on 24 Nov 2010
5 answers
365 views

 I have a GridView with a Nullable(DateTime) column (Inactive Date).  I want the grid to open with a default filter of records where the InactiveDate has no value.  How can I do this?  I have tried something like below but keep getting an error that String cannot be converted to a DateTime value.  I've tried Value="", Value=" ", Value="Nothing"....can't get it to work.

<telerik:RadGridView ItemsSource="{Binding Items}" AutoGenerateColumns="False" Name="datagrid" DataLoaded="datagrid_DataLoaded" >
  <telerik:RadGridView.FilterDescriptors>
    <telerik:FilterDescriptor Member="InActiveDate" Operator="IsEqualTo" Value=" " />
  </telerik:RadGridView.FilterDescriptors>
  <telerik:RadGridView.Columns>
    <telerik:GridViewDataColumn Header="Device Number" DataMemberBinding="{Binding DeviceNumber}" ShowDistinctFilters="False" />
    <telerik:GridViewDataColumn Header="Active Date" DataMemberBinding="{Binding ActiveDate}" DataFormatString="{}{0:d}" Width="90" />
    <telerik:GridViewDataColumn Header="InActive Date" DataMemberBinding="{Binding InActiveDate}" ShowDistinctFilters="False"  DataFormatString="{}{0:d}" Width="90"/>
    <telerik:GridViewDataColumn Header="Service Account" DataMemberBinding="{Binding IssuingAccountName}" />
    <telerik:GridViewDataColumn Header="License Plate" DataMemberBinding="{Binding VehicleLicensePlate,TargetNullValue=Not Assigned}" ShowDistinctFilters="False" />
    <telerik:GridViewDataColumn Header="Truck Number" DataMemberBinding="{Binding VehicleDisplayName}" ShowDistinctFilters="False"  />
  </telerik:RadGridView.Columns>
</telerik:RadGridView>
Veselin Vasilev
Telerik team
 answered on 24 Nov 2010
1 answer
107 views
Hi,

I am trying to create my own NumericUpDown by extending the RADNumericUpDown. I am trying to set the Windows7 theme on the user control. But it doesn't work.

Regards
Sanket
Pana
Telerik team
 answered on 24 Nov 2010
3 answers
106 views
[Note to Telerik: I messed the title up! Could you change it to "Enable/Disable editing of cell for individual rows"]

I have a GridView where some of the columns are editable and some are readonly. But now I also have some columns that should be editable for some rows but not for others.

The GridView is bound to a list of items. These items are of a custom type/class that has properties for each column of the GridView. The class also has a property which tells if those columns (that are sometimes editable) should be editable or not.

How can I make this work?

I specify the columns of the grid manually with XAML. The columns have a CellTemplate (usually with a TextBlock), and those that can be edited also has a CellEditTemplate (usually with a TextBox). The switching between those works fine, but sometimes I don't want that switch to happen. That is, even if the user clicks the cell to edit it, the cell shouldn't switch over to edit mode (using CellEditTemplate) if that cell is not editable for that particular row.

Some code to illustrate my situation
<telerikGridView:GridViewDataColumn Header="Age" DataMemberBinding="{Binding Path=Age}">
    <telerikGridView:GridViewDataColumn.CellTemplate>
        <DataTemplate>
            <TextBlock Text="{Binding Path=Age, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}" />
        </DataTemplate>
    </telerikGridView:GridViewDataColumn.CellTemplate>
    <telerikGridView:GridViewDataColumn.CellEditTemplate>
        <DataTemplate>
            <TextBox Text="{Binding Path=Age, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
        </DataTemplate>
    </telerikGridView:GridViewDataColumn.CellEditTemplate>
</telerikGridView:GridViewDataColumn>

public class Person
{
    public int Age { get; set; }
    public bool ThisRowIsFullyEditable { get; set; }
}

So.. can I by using the "ThisRowIsFullyEditable" property make the column Age editable or not for each row individually?

Thanks // David
Maya
Telerik team
 answered on 24 Nov 2010
2 answers
102 views
Hello,
I am trying to create a sample of docking prototype described in here:
http://www.telerik.com/help/wpf/raddocking-getting-started2.html
However, I cannot do much without adding Telerik.Windows.Controls.RadPaneGroup class. I am working with RadControls for WPF Q2 2010 SP2. Where do I get Telerik.Windows.Controls.RadPaneGroup. I don't have RadPaneGroup binaries in WPF Q2 2010 SP2. As a result, I cannot have any RadDocking UI. Pleasse let me know what can be done.

Thank you in advance.
Vlad
Top achievements
Rank 1
 answered on 23 Nov 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?