Telerik Forums
UI for WPF Forum
3 answers
132 views
Hi, 

i have a problem with SplineSeriesDefinitinion.
On my project i have a RadChart with different SeriesDefinition on the same Data. I have buond the seriesDefinition type with the model, therefore i can change the series definition at runtime (without use code behind but only model).

The series definition that i use are:
  • StackedBarSeriesDefinition
  • StackedBar100SeriesDefinition 
  • BarSeriesDefinition
  • SplineSeriesDefinition

I attach code (xaml) and image (1.png, 2.png, 3.png) for example.

<telerik1:RadChart x:Name="PassFailChart" BorderThickness="0" Padding="0,10,0,0" Background="{x:Null}" IsTabStop="False" Grid.Row="1">
            <telerik1:RadChart.DefaultView>
                <telerik1:ChartDefaultView>
                    <telerik1:ChartDefaultView.ChartLegend>
                        <telerik1:ChartLegend x:Name="chartLegend" LegendItemMarkerShape="Circle" Background="{x:Null}" BorderBrush="{x:Null}" UseAutoGeneratedItems="True" />
                    </telerik1:ChartDefaultView.ChartLegend>
                    <telerik1:ChartDefaultView.ChartArea>
                        <telerik1:ChartArea LegendName="chartLegend">
                            <telerik1:ChartArea.AxisY>
                                <telerik1:AxisY StripLinesVisibility="Hidden" MinorTicksVisibility="Hidden" ExtendDirection="Up" />
                            </telerik1:ChartArea.AxisY>
                        </telerik1:ChartArea>
                    </telerik1:ChartDefaultView.ChartArea>
                </telerik1:ChartDefaultView>
            </telerik1:RadChart.DefaultView>
            <telerik1:RadChart.AnimationSettings>
                <telerik1:AnimationSettings ItemDelay="00:00:00" DefaultSeriesDelay="00:00:01" />
            </telerik1:RadChart.AnimationSettings>
             
            <telerik1:RadChart.SeriesMappings>
                <telerik1:SeriesMapping LegendLabel="{Binding ElementName=cbPass, Path=Content}" ItemsSource="{Binding Path=GraphRuntime[Pass], Mode=TwoWay}" SeriesDefinition="{Binding Path=PassDefinition, Mode=TwoWay}">
                    <telerik1:SeriesMapping.ItemMappings>
                        <telerik1:ItemMapping DataPointMember="YValue" FieldName="Value"/>
                        <telerik1:ItemMapping DataPointMember="XCategory" FieldName="Label" />
                    </telerik1:SeriesMapping.ItemMappings>
                </telerik1:SeriesMapping>
                <telerik1:SeriesMapping LegendLabel="{Binding ElementName=cbFail, Path=Content}" ItemsSource="{Binding Path=GraphRuntime[Fail], Mode=TwoWay}" SeriesDefinition="{Binding Path=FailDefinition, Mode=TwoWay}">
                    <telerik1:SeriesMapping.ItemMappings>
                        <telerik1:ItemMapping DataPointMember="YValue" FieldName="Value"/>
                        <telerik1:ItemMapping DataPointMember="XCategory" FieldName="Label"/>
                    </telerik1:SeriesMapping.ItemMappings>
                </telerik1:SeriesMapping>
                <telerik1:SeriesMapping LegendLabel="{Binding ElementName=cbReconstitution, Path=Content}" ItemsSource="{Binding Path=GraphRuntime[Reconstitution], Mode=TwoWay}" SeriesDefinition="{Binding Path=ReconstitutionDefinition, Mode=TwoWay}" >
                    <telerik1:SeriesMapping.ItemMappings>
                        <telerik1:ItemMapping DataPointMember="YValue" FieldName="Value"/>
                        <telerik1:ItemMapping DataPointMember="XCategory" FieldName="Label"/>
                    </telerik1:SeriesMapping.ItemMappings>
                </telerik1:SeriesMapping>               
            </telerik1:RadChart.SeriesMappings>
        </telerik1:RadChart>


When the graph opened, all graph it's ok (view image).

If i select StackedBar100SeriesDefinition the axisY range changed, but when i return to SplineSeriesDefinition the graph is cut (like image problem.png).
This problem occurs and remain only if i select StackedBar100SeriesDefinition. For resolve the problem, software must be restarted.


Another problem with the SplineSeriesDefinition is that on the X-Axis the first label is cut (like problem.png image and 2.png image). Is there a way to resolve this issue?

Thanks in advance.
Francesco.
Nikolay
Telerik team
 answered on 25 Oct 2012
1 answer
413 views
My grid seems to be generating an empty column header before the first column and also after the last. How do I get rid of these? I've attached an image showing my issue. Thanks
Dimitrina
Telerik team
 answered on 25 Oct 2012
0 answers
73 views
no issue. it is working correctly.
Hitesh
Top achievements
Rank 1
 asked on 24 Oct 2012
2 answers
134 views
Hi, I have just started with using your components and I am very impressed with them.
The scheduleview in particular matches and upcoming project well.

I have one question now.
I have added some in xaml and found this to be working for<Canvas x:Name="canvas" MouseDown="Canvas_MouseDown" MouseUp="Canvas_MouseUp" MouseMove="Canvas_MouseMove">
<
telerik:RadScheduleView HorizontalAlignment="Left" Margin="12,12,0,0" Name="radScheduleView1" VerticalAlignment="Top" Height="469" Width="208" MouseRightButtonDown="rect1_MouseLeftButtonDown" NavigationHeaderVisibility="Collapsed" MinAppointmentHeight="100" VerticalScrollBarVisibility="Hidden" MinTimeRulerExtent="2800" MaxTimeRulerExtent="2800">

<telerik:RadScheduleView.ViewDefinitions>

<telerik:DayViewDefinition MinorTickLength="30min" MajorTickLength="1h"/>

</telerik:RadScheduleView.ViewDefinitions>

<telerik:RadScheduleView.RenderTransform>

<TranslateTransform></TranslateTransform>

</telerik:RadScheduleView.RenderTransform>

<telerik:RadScheduleView.DragDropBehavior>

<local:ScheduleViewDragDropBehavior/>

</telerik:RadScheduleView.DragDropBehavior>

</telerik:RadScheduleView>
</Canvas>

Besides normal config and drag'n drop I have added MouseRightButtonDown and RenderTransform as I am moving it arround on a canvas.

Now I would like to be able to add more schedulers at runtime and load them up with the same config. But I am having problem doing so.
Using this code I can create one
this.x = new Telerik.Windows.Controls.RadScheduleView(); this.x.Height = 469;
this.x.Width = 533;
this.x.CurrentDate = DateTime.Today;
var appointments3 = new ObservableCollection<Appointment>();
this.x.AppointmentsSource = appointments3;
RadScheduleViewCommands.SetDayViewMode.Execute(null, this.x);

canvas.Children.Add(

 

this.x);


I am using RadScheduleViewCommands to set dayview, but it is not working. So what I am doing wrong here?

Any help will be appreciated.

Secondly the bonus question.
Ideally I would like to instantiate new schedulers based on xaml template, I tried following a few example I could find on other web resources but non of them really worked well for me. Main problem here was that I could not set the drag'n drop behavior. But of cause that could be done after creating if needed.
If you happen to have any examples of this that would also be appreciated.

Best regards
Lasse
Lasse
Top achievements
Rank 1
 answered on 24 Oct 2012
5 answers
540 views
Hello,

I have noticed two separate issues when loading html documents into the WPF RadRichTextBox

The first issue is that loading a document with capitalized <STYLE> tags will not render at all, even if there are no styles specified.

The second issue is that the CSS style for "a:link, span.MsoHyperlink" that Microsoft Outlook adds to emails is being applied to the body tag of the resulting document.  This causes all text within the RadRichTextBox to be underlined, not just hyperlinks.

I have created a sample application to reproduce these issues.

<Window x:Class="RadRichTextBoxTestApp.MainWindow"
        Title="MainWindow" Height="350" Width="525"
        SizeToContent="WidthAndHeight">
    <Window.Resources>
      <Style TargetType="{x:Type telerik:RadRichTextBox}">
        <Style.Setters>
          <Setter Property="Height" Value="100" />
          <Setter Property="Width" Value="300" />
        </Style.Setters>
      </Style>
    </Window.Resources>
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
      </Grid.RowDefinitions>
      <telerik:HtmlDataProvider RichTextBox="{Binding ElementName=box0}" Html="{Binding DocumentWithCapitalizedStyleTags}" />
      <telerik:RadRichTextBox Grid.Row="0" x:Name="box0" Margin="10"/>
      <telerik:HtmlDataProvider RichTextBox="{Binding ElementName=box1}" Html="{Binding DocumentWithLowerCaseStyleTags}" />
      <telerik:RadRichTextBox Grid.Row="1" x:Name="box1" Margin="10"/>
      <telerik:HtmlDataProvider RichTextBox="{Binding ElementName=box2}" Html="{Binding DocumentWithMsoHyperlinkStyles}" />
      <telerik:RadRichTextBox Grid.Row="2" x:Name="box2" Margin="10"/>
      <telerik:HtmlDataProvider RichTextBox="{Binding ElementName=box3}" Html="{Binding DocumentWithInlineHyperlinkStyles}" />
      <telerik:RadRichTextBox Grid.Row="3" x:Name="box3" Margin="10"/>
    </Grid>
</Window>

using System.Windows;
 
namespace RadRichTextBoxTestApp
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            DataContext = new MainWindowViewModel();
            InitializeComponent();
        }
    }
 
    public class MainWindowViewModel
    {
        public string DocumentWithCapitalizedStyleTags
        {
            get { return "<html><head><STYLE></STYLE></head><body>HELLO WORLD!</body></html>"; }
        }
 
        public string DocumentWithLowerCaseStyleTags
        {
            get { return DocumentWithCapitalizedStyleTags.Replace("<STYLE", "<style").Replace("</STYLE","</style"); }
        }
 
        public string DocumentWithMsoHyperlinkStyles
        {
            get
            {
                return
@"
<html><head><style>
a:link, span.MsoHyperlink
    {mso-style-priority:99; color:blue; text-decoration:underline;}
</style></head><body>HELLO WORLD! <a href=""http://telerik.com"">Telerik</a></body></html>
";
            }
        }
 
        public string DocumentWithInlineHyperlinkStyles
        {
            get { return DocumentWithMsoHyperlinkStyles.Replace(", span.MsoHyperlink", ""); }
        }
    }
}

Boby
Telerik team
 answered on 24 Oct 2012
1 answer
171 views
Hello,

we currently have the following problem:

There is a table named ST_Classification and one named ST_Address, which have the following relationship:
ST_classification.PK_classification -> ST_Address.FK_classification

In a WPF-Application there is a DataFormComboBoxField which is populated with data from the ST_Classification table.
The moment the value is set to a new one an exception is thrown:
System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException was unhandled by user code
Message=Operation is not valid due to the current state of the object.


This is code in the xxx.designer.cs where the exception is thrown:
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FK_classification", DbType="BigInt", UpdateCheck=UpdateCheck.Never)]
        public System.Nullable<long> FK_classification
        {
            get
            {
                return this._FK_classification;
            }
            set
            {
                if ((this._FK_classification != value))
                {
                    if (this._ST_classification.HasLoadedOrAssignedValue)
                    {
                        throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
                    }
                    this.OnFK_classificationChanging(value);
                    this.SendPropertyChanging(); // <--- Exception is thrown!
                    this._FK_classification = value;
                    this.SendPropertyChanged("FK_classification");
                    this.OnFK_classificationChanged();
                }
            }
        }


This is the XAML-code for the DataFormComboBoxField:
<telerik:RadDataForm x:Name="RDF_ST_Addresse" ItemsSource="{Binding Items, ElementName=RG_ST_Partner}"
 AutoGenerateFields="False"
 EditEnding="RDF_ST_Addresse_EditEnding"
EditEnded="RDF_ST_Addresse_EditEnded"
DeletingItem="RDF_ST_Addresse_DeletingItem"
ValidatingItem="RDF_ST_Addresse_ValidatingItem"
AddingNewItem="RDF_ST_Addresse_AddingNewItem"
AddedNewItem="RDF_ST_Addresse_AddedNewItem" >
.
.
.
<telerik:DataFormComboBoxField DataMemberBinding="{Binding FK_classification, Mode=TwoWay}"  Name="DFCMB_classification"
Label="Klassifikation" IsReadOnly="False"
SelectedValuePath="PK_classification"
DisplayMemberPath="classification" Initialized="DFCMB_classification_Initialized" />

Here is the codeBehind for DataFormComboBoxField:
private void DFCMB_classification_Initialized(object sender, EventArgs e)
            {
                ((DataFormComboBoxField)sender).ItemsSource = from p in goDCAddach.ST_classifications orderby p.classification     select p ;
            }

 Thanks for any help in advance.

Greetings
Gerrit

Ivan Ivanov
Telerik team
 answered on 24 Oct 2012
2 answers
202 views
Hello Telerik team,

i followed some of the topics in this forum regarding the localization of the radComponents. But i didn´t find a solution how to change the language at runtime without having to reload all components. Is there any solution how to achieve this ?
Thanks in advance
Vladi
Telerik team
 answered on 24 Oct 2012
5 answers
1.1K+ views
Hi,

Is there a way to set a document width to A4? or any standard paper width for that matter (A1, A2, A3, A4... etc).

Thanks,

Rob
Petya
Telerik team
 answered on 23 Oct 2012
2 answers
180 views
Trying to get a RadDataPager with a RadGridView to update the list of items when the underlying bound collection changes. I have RadDataPager.Source bound to a property in the viewmodel, and RadGridView bound to PagedSource of the pager. The collection doesn't actually implement any events for changing, so what I'm doing is replacing the value of the bound property with a new collection. I have verified it is a new instance, and that INotifyPropertyChanged is being raised. However the gridview isn't updating until I move to another page, and then move back. I'd expect the datapager to detect the underlying collection has changed, and instruct the gridview that the current page's contents have changed. It doesn't.

What might I be missing?
Almond
Top achievements
Rank 1
 answered on 23 Oct 2012
1 answer
51 views

I have many windows. I want to change in the Mainwindow from a window (window3). Make a label visible in

MainWindow on a button click in window3.

I don't want to create an instance of MainWindow, because that doesn't keep changes in the parent Mainwindow.

How can I do it, kindly?

Thanks in advanced.

Asmaa
Top achievements
Rank 1
 answered on 23 Oct 2012
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?