Hi,
I have a SciChartGroup with 2 SciChartSurfaces…
It seems the SciChartGroup is adding the surface Title on its own somewhere.
What do I have to do to not display the 2nd surfaces title in white in the top-left corner?
Thanks!
(I’d attach the project, but the buttons on the ask page aren’t attaching anything – in chrome anyway…)
Here is the codebehind:
using System;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Windows;
using System.Windows.Input;
using Abt.Controls.SciChart;
namespace nameOn2ndSurface
{
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
}
public class datamodel : INotifyPropertyChanged
{
#region PropertyChanged
public event PropertyChangedEventHandler PropertyChanged;
protected void OnPropertyChanged(PropertyChangedEventArgs e)
{
if (PropertyChanged != null)
PropertyChanged(this, e);
}
protected void notifyPropertyChanged(string propertyName)
{
PropertyChangedEventArgs e = new PropertyChangedEventArgs(propertyName);
OnPropertyChanged(e);
}
#endregion
ObservableCollection<DataModelGraph> graphs;
public datamodel()
{
graphs = new ObservableCollection<DataModelGraph>();
graphs.Add(new DataModelGraph() { Title = "graph1" });
graphs.Add(new DataModelGraph() { Title = "graph2" });
}
public ObservableCollection<DataModelGraph> Graphs
{
get
{
return graphs;
}
}
}
public class DataModelGraph : IChildPane, INotifyPropertyChanged
{
#region PropertyChanged
public event PropertyChangedEventHandler PropertyChanged;
protected void OnPropertyChanged(PropertyChangedEventArgs e)
{
if (PropertyChanged != null)
PropertyChanged(this, e);
}
protected void notifyPropertyChanged(string propertyName)
{
PropertyChangedEventArgs e = new PropertyChangedEventArgs(propertyName);
OnPropertyChanged(e);
}
#endregion
string title;
public DataModelGraph()
{
title = "graph";
}
public string Title
{
get
{
return title;
}
set
{
if (title != value)
{
title = value;
notifyPropertyChanged("Title");
}
}
}
public ICommand ClosePaneCommand { get; set; }
public void ZoomExtents()
{
}
}
}
Here is the xaml:
<Window x:Class="nameOn2ndSurface.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:s="http://schemas.abtsoftware.co.uk/scichart"
xmlns:local="clr-namespace:nameOn2ndSurface"
Title="MainWindow" Height="350" Width="525">
<Window.Resources>
<local:datamodel x:Key="data" />
<Style TargetType="s:SciChartSurface">
<Setter Property="Foreground" Value="Red"/>
<Setter Property="ChartTitle" Value="{Binding Title}"/>
</Style>
</Window.Resources>
<Grid DataContext="{DynamicResource data}">
<s:SciChartGroup x:Name="group"
ItemsSource="{Binding Graphs}"
>
<s:SciChartGroup.ItemTemplate>
<DataTemplate>
<s:SciChartSurface />
</DataTemplate>
</s:SciChartGroup.ItemTemplate>
</s:SciChartGroup>
</Grid>
- dwoerner asked 9 years ago
- last active 9 months ago