Telerik Forums
UI for WPF Forum
4 answers
807 views
Hi, is there any workaround on preventing the user from  typing beyond the maximum value? 

Please help we are still evaluating a trial copy and this demo will help my boss to decide if she will buy telerik or not.(I know this is not necessary, but lately no one has been replying on questions I post here LOL)

So please... help?
Haegen
Top achievements
Rank 1
 answered on 15 Nov 2012
1 answer
256 views
I have a RadMap, with an InformationLayer, in which I am drawing a MapPolygon and a MapPinPoint.

The MapLayer.Location of the PinPoint is bound to a Location property in the viewmodel, that raises PropertyChanged when modified.

When I change the location, in code, the MapPinPoint is drawn in the new location, so I'm pretty sure that I have the binding and the notification working right.

Now here's the thing - I want the map to center on that same location. So I've bound RadMap.Center to that same property. And that's not working - the center of the map does not change, even though the location of the MapPinPoint does, when both are bound to the same property.

Since the MapPinPoint is working, I have to assume that the property is working right, and that the RadMap is ignoring PropertyChanged events on Center.

So how, then, do I change the center of the map, through bound properties?
Jeff
Top achievements
Rank 1
 answered on 14 Nov 2012
0 answers
115 views
Hi guys,

I am working on a piece of code written by some other person that uses Telerik. An issue I am trying to resolve right now involves GUI formatting.

In this picture, you can see that the "Country" column has been highlighted and is active (i.e. has Distinct Filter). But in this case, that little wine-glass-like icon on the left is grey instead of orange. Do you know how I can make that icon change colour when the column is active?

The classes that are involved are RadGridView, a class that overrides IFilteringControl, and a set of GridViewColumns.

Thanks.
New
Top achievements
Rank 1
 asked on 14 Nov 2012
1 answer
315 views
We are attempting to use a RadDiagram that is nested inside two usercontrols. Our solution follows something like this:
- controls project
  -usercontrol
    -diagram
-app project
  -usercontrol
    -usercontrol (from controls project)

In the usercontrol the diagram is hosted in, the xaml designer can display the usercontrol and diagram without any errors. When viewing the parent usercontrol (in the app project) in the xaml designer, we intermittently receive one of three errors:

1.
Error 51 [A]Telerik.Windows.Controls.RadListBox cannot be cast to [B]Telerik.Windows.Controls.RadListBox. Type A originates from 'Telerik.Windows.Controls, Version=2012.3.1017.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7' in the context 'LoadNeither' at location 'users\...\AppData\Local\Microsoft\VisualStudio\11.0\Designer\ShadowCache\uaf4o2b1.tgx\m5d3emjg.5ms\Telerik.Windows.Controls.dll'. Type B originates from 'Telerik.Windows.Controls, Version=2012.3.1017.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7' in the context 'LoadFrom' at location 'C:\Program Files (x86)\Telerik\RadControls for WPF Q3 2012\Binaries\WPF45\Telerik.Windows.Controls.dll'.

2.
Telerik.Windows.DragDrop.Behaviors.DragDropState', on 'Telerik.Windows.DragDrop.Behaviors.DragDropBehavior`1[TState]' violates the constraint of type parameter 'TState'

3.
Cannot find resource file 'themes/genericwindows8touch.xaml'


The project builds and runs fine, but this issue causes problems for our designers who use the xaml designer and Blend (which reports the same errors in the designer). The first situation seems odd as we do not reference telerik controls from the install directory (C:\Program Files (x86)\Telerik\RadControls...) anywhere.

Are there any known issues with the diagram control, or possibly the listbox control and the 2012 xaml designer?

Thanks,
James
George
Telerik team
 answered on 14 Nov 2012
1 answer
159 views
When add a RadPane to a RadPane group as IsPinned = false, I get the following error.

public MainWindow(){
InitializeComponent();
RadPane rp = new RadePane();
rp.CanUserClose = false;
rp.CanFloat = false;
rp.CanUserPin = false;
rp.CanDockInDocumentHost = false;
rp.IsSelected = false;
rp.IsPinned = false;
rpgRight.Items.Add(rp);
}

My applications logs:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<entries>
    <entry entryData="11/9/2012 2:35:49 PM" componentName="Maestro" machineName="WCOR3V9XVL1" category="Error" memory="167206912" version="1.1.3.26256" specialBuild="">
        <message>
            Element already has a logical parent. It must be detached from the old parent before it is attached to a new one.
        </message>
        <stackTrace>
               at MS.Internal.Controls.InnerItemCollectionView.AssertPristineModelChild(Object item)
   at MS.Internal.Controls.InnerItemCollectionView.Insert(Int32 index, Object item)
   at System.Windows.Controls.ItemCollection.Insert(Int32 insertIndex, Object insertItem)
   at Telerik.Windows.Controls.Docking.AutoHideArea.Add(RadPane pane, Boolean suppressAnimations)
   at Telerik.Windows.Controls.Docking.AutoHideArea.UnpinPane(RadPane pane, Boolean suppressAnimations)
   at Telerik.Windows.Controls.RadDocking.UnpinPane(RadPane radPane, AutoHideArea area, Boolean stopEvents)
   at Telerik.Windows.Controls.RadDocking.OnRadPanePinChange(Object sender, PinChangeEventArgs args)
 
Exception Type: System.InvalidOperationException
        </stackTrace>
    </entry>
    <entry entryData="11/9/2012 2:35:49 PM" componentName="Maestro" machineName="WCOR3V9XVL1" category="Error" memory="167829504" version="1.1.3.26256" specialBuild="">
        <message>
            Exception has been thrown by the target of an invocation.
        </message>
        <stackTrace>
               at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
   at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at System.Windows.RoutedEventArgs.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 Telerik.Windows.Controls.RadPane.<>c__DisplayClass7.<RaiseEventInternal>b__5()
   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)
 
Exception Type: System.Reflection.TargetInvocationException
        </stackTrace>
    </entry>
    <entry entryData="11/9/2012 2:35:49 PM" componentName="Maestro" machineName="WCOR3V9XVL1" category="Error" memory="168116224" version="1.1.3.26256" specialBuild="">
        <message>
            Element already has a logical parent. It must be detached from the old parent before it is attached to a new one.
        </message>
        <stackTrace>
               at MS.Internal.Controls.InnerItemCollectionView.AssertPristineModelChild(Object item)
   at MS.Internal.Controls.InnerItemCollectionView.Insert(Int32 index, Object item)
   at System.Windows.Controls.ItemCollection.Insert(Int32 insertIndex, Object insertItem)
   at Telerik.Windows.Controls.Docking.AutoHideArea.Add(RadPane pane, Boolean suppressAnimations)
   at Telerik.Windows.Controls.Docking.AutoHideArea.UnpinPane(RadPane pane, Boolean suppressAnimations)
   at Telerik.Windows.Controls.RadDocking.UnpinPane(RadPane radPane, AutoHideArea area, Boolean stopEvents)
   at Telerik.Windows.Controls.RadDocking.OnRadPanePinChange(Object sender, PinChangeEventArgs args)
 
Exception Type: System.InvalidOperationException
        </stackTrace>
    </entry>
    <entry entryData="11/9/2012 2:35:49 PM" componentName="Maestro" machineName="WCOR3V9XVL1" category="Error" memory="168665088" version="1.1.3.26256" specialBuild="">
        <message>
            Exception has been thrown by the target of an invocation.
        </message>
        <stackTrace>
               at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
   at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at System.Windows.RoutedEventArgs.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 Telerik.Windows.Controls.RadPane.<>c__DisplayClass7.<RaiseEventInternal>b__5()
   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 System.Windows.Application.Run()
   at Suddenlink.CustomerCare.Maestro.App.Main() in C:\Users\michael.sullivan\Development\CSR Desktop\Customer Care Desktop\Suddenlink.CustomerCare.Desktop\obj\x86\Debug\App.g.cs:line 0
 
Exception Type: System.Reflection.TargetInvocationException
        </stackTrace>
    </entry>
</entries>
Alek
Telerik team
 answered on 14 Nov 2012
1 answer
131 views
Hi,

How do I prevent the user from dragging content such as text and images and relocating it to a different location in the document?

Thanks,

Rob
Petya
Telerik team
 answered on 14 Nov 2012
1 answer
118 views
I have to show multiple calendars based on resources. I am able to show multiple calendars, however i need to have expander control over each individual calender and also needs to display some text above each individual calendar.

Let me know if this is possible.

Note: The changes are required in Month View definition and the orientation of calendar is horizontal.

Please refer the attachment for more details.
Yana
Telerik team
 answered on 14 Nov 2012
1 answer
204 views
Hi,

I realize this may be a newbie question but I've never worked with themes before.  The examples I've found on the Internet haven't worked for me when trying to get Telerik themes to work.  Is there a step-by-step document that covers what xaml files to import to get the themes to work?  I have a pretty simple demo I'm creating that uses the Carousel control and I want to apply a Windows 8 WPF Touch theme.  Here is the code from App.xaml:  I also added a reference to Telerik.Windows.Controls.Navigation.xaml in my project but I'm getting a ton of errors when I build the project.
<Application.Resources>
    <ResourceDictionary Source="/Themes/Telerik.Windows.Controls.Navigation.xaml"/>
</Application.Resources>
Vlad
Telerik team
 answered on 14 Nov 2012
1 answer
204 views
Hi,

I'm evaluating telerik diagrams for a WPF app that will allow users to model a network comms room. I think so far it looks great and fits the bill, but I have a couple of specific things I'm trying to do that because I'm new to WPF and Telerik, I'm struggling with.

1) In the toolbox, I want to be able to drag racks into the canvas area, a rack could just be a rectangle with special attributes. Is is possible to allow for a shape to map to a domain model like a rack? And could I use the properties dialog thing to collect all the details, for example rack name, rack size etc.. ? Sorry I don't know what the name is for that properties dialog thing that I've seen on the demos, but I can't work out how to make one appear

2) Once I 've got a rack on the canvas, I then want to be able to drag multiple "switches" or "patch panels" into the rack, and again set properties. Is is possible to make the rack act as a container for these other objects? 

Any pointers or snippets would be grateful - getting to grips with this whilst learning WPF and MVVM is quite tricky!

Thanks!

Matt
Tina Stancheva
Telerik team
 answered on 13 Nov 2012
2 answers
151 views
Dear Telerik Team!

I have successfuly implemented drag and drop operation between ListBox and ScheduleView. I use custom appointment. Everything works fine when my custom appointment inherits from Appointment class. Unfortunately I need to use a class which inherits from EntityObject class so my custom appointment class must implement IAppointment interface instead of inheriting Appointment base class. After that drag and drop stopped working. Could you please provide me with some samples of correct IAppointment interface implementation. You can find a class I use for now down below:
public class WMSAppointment : IAppointment
    {
        public string Body { get; set; }
        public ICategory Category { get; set; }
        public Importance Importance { get; set; }
        public DateTime End { get; set; }
        public DateTime Start { get; set; }
        public string Subject { get; set; }
        public IList Resources { get; set; }
        public int JobId { get; set; }
        public bool IsAllDayEvent { get; set; }
        public IRecurrenceRule RecurrenceRule { get; set; }
        public ITimeMarker TimeMarker { get; set; }
        public TimeZoneInfo TimeZone { get; set; }
 
        public event EventHandler RecurrenceRuleChanged;
        public event PropertyChangedEventHandler PropertyChanged;
 
        public bool Equals(IAppointment other)
        {
            var otherAppointment = other as WMSAppointment;
            return otherAppointment != null &&
                other.Start == this.Start &&
                other.End == this.End &&
                other.Subject == this.Subject &&
                this.JobId == otherAppointment.JobId &&
                this.TimeMarker == otherAppointment.TimeMarker &&
                this.TimeZone == otherAppointment.TimeZone &&
                this.IsAllDayEvent == other.IsAllDayEvent &&
                this.RecurrenceRule == other.RecurrenceRule;
        }
 
        public void BeginEdit()
        {
            throw new NotImplementedException();
        }
 
        public void CancelEdit()
        {
            throw new NotImplementedException();
        }
 
        public void EndEdit()
        {
            throw new NotImplementedException();
        }
 
        public IAppointment Copy()
        {
            IAppointment appointment = new WMSAppointment();
            appointment.CopyFrom(this);
 
            return appointment;
        }
 
        public void CopyFrom(IAppointment other)
        {
            this.IsAllDayEvent = other.IsAllDayEvent;
            this.Start = other.Start;
            this.End = other.End;
            this.Subject = other.Subject;
 
            var otherAppointment = other as WMSAppointment;
            if (otherAppointment == null)
                return;
 
            this.JobId = otherAppointment.JobId;
            this.TimeMarker = otherAppointment.TimeMarker;
 
            this.Resources.Clear();
            this.Resources.AddRange(otherAppointment.Resources);
 
            this.Body = otherAppointment.Body;
        }
    }


Thank you very much and best regards
Krzysztof Kaźmierczak
Krzysztof
Top achievements
Rank 1
 answered on 13 Nov 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
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
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
Callout
Rating
Accessibility
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?