RadDragAndDropManager.SetAllowDrag(treeview,true);RadDragAndDropManager.AddDragInfoHandler(treeview, new EventHandler<DragDropEventArgs>(OnDrag)); RadDragAndDropManager.AddDragQueryHandler(treeview,new EventHandler<DragDropQueryEventArgs>(OnDragQuery)); RadDragAndDropManager.AddDropQueryHandler(scheduleView, new EventHandler<DragDropQueryEventArgs>(OnDropQuery)); RadDragAndDropManager.AddDropInfoHandler(scheduleView, new EventHandler<DragDropEventArgs>(OnDropInfo)); RadDragAndDropManager.SetAllowDrop(scheduleView,true);<telerik:RadChartName="radChart1"ItemsSource="{Binding ChartData}"Visibility="{Binding CandlestickVisibility}"><telerik:ChartDefaultView><telerik:ChartDefaultView.ChartLegend><telerik:ChartLegendIsEnabled="True"Visibility="Collapsed"/></telerik:ChartDefaultView.ChartLegend></telerik:ChartDefaultView><telerik:RadChart.SeriesMappings><telerik:SeriesMapping><telerik:SeriesMapping.SeriesDefinition><telerik:CandleStickSeriesDefinition/></telerik:SeriesMapping.SeriesDefinition><telerik:SeriesMapping.ItemMappings><telerik:ItemMappingDataPointMember="Open"FieldName="OpenPrice"/><telerik:ItemMappingDataPointMember="High"FieldName="HighPrice"/><telerik:ItemMappingDataPointMember="Low"FieldName="LowPrice"/><telerik:ItemMappingDataPointMember="Close"FieldName="ClosePrice"/></telerik:SeriesMapping.ItemMappings></telerik:SeriesMapping></telerik:RadChart.SeriesMappings></telerik:RadChart>
When I go into the designer and click the IsDateTime for the X Axis, I get a Microsoft .NET Framework exception: "Specified cast is not valid" with this callstack System.Windows.Markup.XamlParseException: Specified cast is not valid. ---> System.InvalidCastException: Specified cast is not valid.
at MS.Internal.Designer.PropertyEditing.Resources.ResourceUtilities.GetDouble(FrameworkElement element, String key, Double fallbackValue)
at MS.Internal.Designer.PropertyEditing.Resources.ResourceUtilities.GetDesiredTypeIconSize(FrameworkElement queryRoot)
at MS.Internal.Designer.PropertyEditing.Editors.SubPropertyEditor.RefreshQuickTypes()
at MS.Internal.Designer.PropertyEditing.Editors.SubPropertyEditor.RefreshVisuals()
at MS.Internal.Designer.PropertyEditing.Editors.SubPropertyEditor.OnPropertyEntryChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)
at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
at MS.Internal.Designer.PropertyEditing.Editors.SubPropertyEditor.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, Boolean coerceWithCurrentValue, 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.FrameworkTemplate.InvalidatePropertiesOnTemplate(DependencyObject container, Object currentObject)
at System.Windows.FrameworkTemplate.HandleBeforeProperties(Object createdObject, DependencyObject& rootObject, DependencyObject container, FrameworkElement feContainer, INameScope nameScope)
at System.Windows.FrameworkTemplate.<>c__DisplayClass6.<LoadOptimizedTemplateContent>b__3(Object sender, XamlObjectEventArgs args)
at System.Xaml.XamlObjectWriter.OnBeforeProperties(Object value)
at System.Xaml.XamlObjectWriter.Logic_CreateAndAssignToParentStart(ObjectWriterContext ctx)
at System.Xaml.XamlObjectWriter.WriteStartMember(XamlMember property)
at System.Xaml.XamlWriter.WriteNode(XamlReader reader)
at System.Windows.FrameworkTemplate.LoadTemplateXaml(XamlReader templateReader, XamlObjectWriter currentWriter)
--- End of inner exception stack trace ---
at System.Windows.Markup.XamlReader.RewrapException(Exception e, Uri baseUri)
at System.Windows.FrameworkTemplate.LoadTemplateXaml(XamlReader templateReader, XamlObjectWriter currentWriter)
at System.Windows.FrameworkTemplate.LoadTemplateXaml(XamlObjectWriter objectWriter)
at System.Windows.FrameworkTemplate.LoadOptimizedTemplateContent(DependencyObject container, IComponentConnector componentConnector, IStyleConnector styleConnector, List`1 affectedChildren, UncommonField`1 templatedNonFeChildrenField)
at System.Windows.FrameworkTemplate.LoadContent(DependencyObject container, List`1 affectedChildren)
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 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.UIElement.UpdateLayout()
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.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
How do I make the X Axis a datetime without blowing out the designer?
| <UserControl x:Class="WMITest.PercentUtilizationGauge" |
| xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
| xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" |
| xmlns:local="clr-namespace:WMITest" |
| Height="300" Width="300"> |
| <UserControl.Resources> |
| <local:GaugeSettings x:Key="DataSource"/> |
| </UserControl.Resources> |
| <telerik:RadGauge DataContext="{Binding Source={StaticResource DataSource}}"> |
| <Grid> |
| <telerik:RadialGauge HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> |
| <telerik:RadialScale LabelRotationMode="None" Name="radialScale" Min="0" Max="100"> |
| <telerik:RangeList> |
| <telerik:RadialRange Name="Green" Min="0" Max="{Binding GreenZoneEnd}" StartWidth="0.1" EndWidth="0.1" |
| Location="OverCenter" Background="Green" BorderBrush="Green" Opacity="0.8"/> |
| <telerik:RadialRange Name="Yellow" Min="{Binding GreenZoneEnd}" Max="{Binding YellowZoneEnd}" StartWidth="0.1" EndWidth="0.1" |
| Location="OverCenter" Background="Yellow" BorderBrush="Yellow" Opacity="0.8"/> |
| <telerik:RadialRange Name="Red" Min="{Binding YellowZoneEnd}" Max="100" StartWidth="0.1" EndWidth="0.1" |
| Location="OverCenter" Background="Red" BorderBrush="Red" Opacity="0.8"/> |
| </telerik:RangeList> |
| <telerik:IndicatorList> |
| <telerik:Needle Opacity="0.8" Name="needle"/> |
| </telerik:IndicatorList> |
| </telerik:RadialScale> |
| </telerik:RadialGauge> |
| </Grid> |
| </telerik:RadGauge> |
| </UserControl> |
| namespace WMITest |
| { |
| /// <summary> |
| /// Interaction logic for PercentUtilizationGauge.xaml |
| /// </summary> |
| public partial class PercentUtilizationGauge : UserControl |
| { |
| public uint Value { get; set; } |
| public GaugeSettings Settings; |
| public PercentUtilizationGauge() |
| { |
| if (Settings == null) |
| { |
| Settings = new GaugeSettings(); |
| } |
| InitializeComponent(); |
| Settings.GreenZoneEnd = 60; |
| } |
| } |
| public class GaugeSettings : INotifyPropertyChanged |
| { |
| private uint greenZoneEnd = 40; |
| public uint GreenZoneEnd |
| { |
| get |
| { |
| return greenZoneEnd; |
| } |
| set |
| { |
| greenZoneEnd = value; |
| OnPropertyChanged("GreenZoneEnd"); |
| } |
| } |
| private uint yellowZoneEnd = 80; |
| public uint YellowZoneEnd |
| { |
| get |
| { |
| return yellowZoneEnd; |
| } |
| set |
| { |
| yellowZoneEnd = value; |
| OnPropertyChanged("YellowZoneEnd"); |
| } |
| } |
| #region INotifyCollectionChanged Members |
| public event PropertyChangedEventHandler PropertyChanged; |
| protected void OnPropertyChanged(string name) |
| { |
| PropertyChangedEventHandler handler = PropertyChanged; |
| if (handler != null) |
| { |
| handler(this, new PropertyChangedEventArgs(name)); |
| } |
| } |
| #endregion |
| } |
| } |
A first chance exception of type 'System.InvalidOperationException' occurred in System.Core.dll
Additional information: Sequence contains no matching element

<telerik:RadTransitionControl x:Name="transitionRight" Grid.RowSpan="3" Grid.Column ="1" >
<telerik:RadTransitionControl.Transition >
<effects:SlideAndZoomTransition SlideDirection ="RightToLeft"/>
</telerik:RadTransitionControl.Transition >
</telerik:RadTransitionControl >
Format Code Block(
<
UserControl x:Class="AOS.UI.Windows.Controls.Widget.acWidgets"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:VMCommanding="clr-namespace:VMCommanding"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
xmlns:vm="clr-namespace:AOS.UI.Windows.Controls.Widget.ViewModel"
Height="300" Width="300"
xmlns:Core="clr-namespace:AOS.UI.Windows.Controls.Core;assembly=AOS.UI.Windows.Controls.Core"
VMCommanding:CommandSinkBinding.CommandSink="{Binding}">
<UserControl.CommandBindings>
<VMCommanding:CommandSinkBinding Command="vm:WidgetViewModel.NavigateItemCommand" />
</UserControl.CommandBindings>
<UserControl.Resources>
<HierarchicalDataTemplate x:Key="NavigationTemplate"
ItemsSource="{Binding Path=WidgetList}">
<Grid Margin="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="16" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Image Grid.Column="0" Source="{Binding Path=Icon_Name}"></Image>
<Core:CommandTextBlock Grid.Column="1" Margin="1"
Text="{Binding Path=Description}"
Command="vm:WidgetViewModel.NavigateItemCommand"
CommandParameter="{Binding}"/>
</Grid>
</HierarchicalDataTemplate>
</UserControl.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="55" />
<RowDefinition Height="*" />
<RowDefinition Height="30" />
</Grid.RowDefinitions>
<telerik:RadTreeView Grid.Row="2" ItemsSource="{Binding WidgetList}" ItemTemplate="{StaticResource NavigationTemplate}" />
</Grid>
</
UserControl>
)