or
void OnClose(object sender, Telerik.Windows.Controls.Docking.StateChangeEventArgs e){ e.Handled = true;}void OnClose(object sender, Telerik.Windows.Controls.Docking.StateChangeEventArgs e){ RadPane pane = e.Panes.ToList()[0]; RadPaneGroup group = pane.PaneGroup; if (closeAll) { group.Items.Clear(); e.Handled = true; }}
<telerik:GridViewCheckBoxColumn.Header> from the code then it is fine. I don't get any exception when dynamically setting the theme for the gridview.
<telerik:RadGridView Name="radGridView" SelectionMode="Extended" EnableRowVirtualization="True" FrozenColumnCount="1" AlternationCount="2" AutoGenerateColumns="False" telerik:StyleManager.Theme="{Binding SelectedTheme}"> <telerik:RadGridView.Columns> <telerik:GridViewCheckBoxColumn DataMemberBinding="{Binding IsSelected, Mode=TwoWay}" EditTriggers="CellClick" AutoSelectOnEdit="True"> <telerik:GridViewCheckBoxColumn.Header><!--this part throws exception if gridview is bound to the vm's theme property--> <StackPanel Orientation="Horizontal"> <CheckBox Name="chkAllSelect" VerticalAlignment="Center" Click="chkAllSelect_Click" IsChecked="{Binding AreAllSelected, Mode=TwoWay}" /> <!--this binding seems not possible--> <TextBlock Text="Select" VerticalAlignment="Center" Margin="5,0,3,0" /> </StackPanel> </telerik:GridViewCheckBoxColumn.Header> </telerik:GridViewCheckBoxColumn> </telerik:RadGridView.Columns> </telerik:RadGridView>
DataTable dt = new DataTable();SqlConnection connection = new SqlConnection("Data Source=.;Initial Catalog=OptimisationDataBase;Integrated Security=True"); string str2 = "SELECT * FROM [OptimisationDataBase].[dbo].[CDRMaxCI] WHERE [OptimisationDataBase].[dbo].[CDRMaxCI].[Cell ID] = 57042 OR [OptimisationDataBase].[dbo].[CDRMaxCI].[Cell ID] = 57312"; connection.Open(); SqlDataAdapter sqlda = new SqlDataAdapter(str2, connection); sqlda.Fill(dt); connection.Close(); this.GridViewKPI.ItemsSource = dt;In my usage of the ChartCiew I have three line series drawn on a chart per date, all of which share the same colour which are distinguished by using the DashArray property of the LineSeries class to make one solid, one dotted (1,1) and one dashed (3,3). Each different date shown on the chart uses a different colour.
I can't seem to figure out how to make a legend that replicates the line drawn on the chart using the dash array property, do you have any advice?
I have looked at your examples and can't see one that does what I want.
I can't really attach the code but I have attached an image showing a chart containing two LineSeries (one solid and one dashed) and my desired legend to indicate my requirements.
Thanks,
lderBrowserDialog dialog = new FolderBrowserDialog(); dialog.SelectedPath = programFiles; dialog.ShowDialog(); <telerik:RadRibbonButton BorderBrush="Gray" CommandParameter="pdf" CornerRadius="3" Height="80" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=SaveCommand}" telerik:RadRichTextBoxRibbonUI.ShouldCloseBackstage="True" Width="90"> <StackPanel Width="90"> <Image HorizontalAlignment="Center" Source="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/ApplicationMenu/Pdf.png" Stretch="None" /> </StackPanel></telerik:RadRibbonButton>public class EnterKeyTraversal{ public static bool GetIsEnabled(DependencyObject obj) { return (bool)obj.GetValue(IsEnabledProperty); } public static void SetIsEnabled(DependencyObject obj, bool value) { obj.SetValue(IsEnabledProperty, value); } static void ue_PreviewKeyDown(object sender, System.Windows.Input.KeyEventArgs e) { var ue = e.OriginalSource as FrameworkElement; if (ue != null && (e.Key == Key.Enter && ue.GetType() != typeof(Button))) { e.Handled = true; ue.MoveFocus(new TraversalRequest(FocusNavigationDirection.Next)); } } private static void ue_Unloaded(object sender, RoutedEventArgs e) { var ue = sender as FrameworkElement; if (ue == null) return; ue.Unloaded -= ue_Unloaded; ue.PreviewKeyDown -= ue_PreviewKeyDown; } public static readonly DependencyProperty IsEnabledProperty = DependencyProperty.RegisterAttached("IsEnabled", typeof(bool), typeof(EnterKeyTraversal), new UIPropertyMetadata(false, IsEnabledChanged)); static void IsEnabledChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { var ue = d as FrameworkElement; if (ue == null) return; if ((bool)e.NewValue) { ue.Unloaded += ue_Unloaded; ue.PreviewKeyDown += ue_PreviewKeyDown; } else { ue.PreviewKeyDown -= ue_PreviewKeyDown; } }}