Telerik Forums
UI for WPF Forum
2 answers
115 views
When using docking from ActiPro there is a nice feature:
- when you undock a ToolWindow/Pane, you can use MouseDoubleClick to dock the window back in the original place. Nice!

Does Telerik Docking have something alike? Or is it easy to implement?
George
Telerik team
 answered on 24 Nov 2010
1 answer
113 views
Is it possible to apply styling to a tabitem whose isEnabled property is set to False?

Thanks,
Petar Mladenov
Telerik team
 answered on 24 Nov 2010
1 answer
101 views
Hi there,
i am testing the new control SchedulerView and was trying to change the orientation of the views (day, week, etc..) and was trying to do like in your demo that have the Property Orientation in all the ViewDefinitions.
I am using the last versions published for you guys and i still can't get this to work using that property in ViewDefinition in fact for intellisense is like doesn' t exist either..
I will attach an jpeg to show you my xaml file

Thanks for the time,
Pedro Pereira
Pedro
Top achievements
Rank 1
 answered on 24 Nov 2010
3 answers
336 views
Hello,

I am currently implementing a localization in our application. The headers of the columns and all captions of all controls are referenced to dynamic resources like that:

<telerik:GridViewDataColumn DataMemberBinding="{Binding ArtikelNr}" Header="{DynamicResource ArtikelNr}" IsReadOnly="True"/>


I am switching the culture during runtime with this function:

public class ResourceManager
    {
        public static void SetResources(Collection<ResourceDictionary> collection, CultureInfo culture)
        {
            RemoveOld(collection);
 
            try
            {
                Uri resource = new Uri("Resources/Strings_" + culture.Name + ".xaml", System.UriKind.Relative);
                collection.Add(new ResourceDictionary { Source = resource });
            }
            catch
            {
                // TODO: Handle this, is it possible to be here?
            }
        }
 
        private static void RemoveOld(Collection<ResourceDictionary> collection)
        {
            for (int i = 0; i < collection.Count; ++i)
            {
                if (collection[i].Source.ToString().Contains("Strings_"))
                {
                    collection.RemoveAt(i);
                    --i;
                }
            }
        }
 
        public static List<CultureInfo> SupportedCultures
        {
            get
            {
                return new List<CultureInfo>()
                {
                    new CultureInfo("de-DE"), // DEU
                    new CultureInfo("ru-RU"), // ENU
                };
            }
        }
    }


public void SetCulture(CultureInfo culture)
{
    Thread.CurrentThread.CurrentCulture = culture;
    Thread.CurrentThread.CurrentUICulture = culture;
    ResourceManager.SetResources(Resources.MergedDictionaries, culture);
}

The column headers of the gridview are ignoring the dynamic resources. But the resources are correctly added to the MergedDictionaries-Collection. All other controls (RadControls too) are using the dynamic resources fine.

Do have any ideas what's going wrong with the columns?
Maya
Telerik team
 answered on 24 Nov 2010
1 answer
63 views
hi

   i m using kml file to import data to the rad map using StreamResourceInfo , but its throw an exception error like "The invocation of the constructor on type ,that matches the specified binding constraints trew an exception " so i don't know how to handle this, could any one help to get out of this issue.
Andrey
Telerik team
 answered on 24 Nov 2010
1 answer
179 views
After combining the code from multiple examples in the forum, I am really close to getting my search working for my TreeView.  However, as other people have found, it will only work if I expand my whole tree first.  What do I need to modify in my code to make this work correctly?  Obviously, if my users have to expand the whole tree first, the search option is pretty useless.

thanks!
Koren

        private void SearchList(string searchValue)
        {
            ControlTemplate tt = (ControlTemplate)baseFrameworkElement.FindResource("NavigationContentTemplate");
            ContentControl tc = (ContentControl)baseFrameworkElement.FindName("NavigationContent");
            _treeView = tt.FindName("NavigationList", tc) as RadTreeView;
           
            //_treeView.ExpandAll();
            //_treeView.CollapseAll();
            SearchTree(searchValue.ToLower(), _treeView);
        }
        private void SearchTree(string searchValue, ItemsControl item)
        {           
            for (int i = 0; i < item.Items.Count; i++)
            //foreach (var _dataItem in item.Items)
            {
                //RadTreeViewItem _childItem = treeView.ContainerFromItemRecursive(_dataItem);
                RadTreeViewItem _childItem = item.ItemContainerGenerator.ContainerFromIndex(i) as RadTreeViewItem;
                if (_childItem != null)
                {
                    //MessageBox.Show(_childItem.ToString());

                    if (_childItem.Item is Association)
                    {
                        Association _childObject = _childItem.Item as Association;
                        if (_childObject.AssociationName.ToLower().Contains(searchValue))
                        {
                            if (_childItem.ItemContainerGenerator.Status == System.Windows.Controls.Primitives.GeneratorStatus.ContainersGenerated)
                            {
                                _childItem.IsExpanded = true;
                                _childItem.BringIntoView();
                            }
                        }

                    }
                    else if (_childItem.Item is Economist)
                    {
                        Economist _childObject = _childItem.Item as Economist;
                        if (_childObject.EconomistName.ToLower().Contains(searchValue))
                        {
                            if (_childItem.ItemContainerGenerator.Status == System.Windows.Controls.Primitives.GeneratorStatus.ContainersGenerated)
                            {
                                _childItem.IsExpanded = true;
                                _childItem.BringIntoView();
                            }
                        }

                    }
                    else if (_childItem.Item is Farm)
                    {
                        Farm _childObject = _childItem.Item as Farm;
                        if (_childObject.FarmName.ToLower().Contains(searchValue) || _childObject.FarmNbr.Contains(searchValue))
                        {
                            if (_childItem.ItemContainerGenerator.Status == System.Windows.Controls.Primitives.GeneratorStatus.ContainersGenerated)
                            {
                                _childItem.IsExpanded = true;
                                //_childItem.IsSelected = true;
                                _childItem.BringIntoView();
                            }
                        }

                    }
                    SearchTree(searchValue, _childItem);
                }
            }
        }

Viktor Tsvetkov
Telerik team
 answered on 24 Nov 2010
1 answer
172 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
112 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
87 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
145 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
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
FileDialogs
Book
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
SplashScreen
Rating
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
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?