You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I have a problem after OxyPlot update from 2.0.0 to 2.1.0. Currently I cannot display a manually created (in code-behind) PlotView within the tooltip of the canvas. I tried to reproduce it on simpler example and it seems to behave the same.
In the following example tooltip is always empty. It contains proper size control, but there is no chart on the view. Within the comments you can find some code that works, but without tooltip.
When I'm trying to do this implementing PlotView in xaml code via VM - it works.
MainWindow.xaml.cs:
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
var plotModel = new PlotModel
{
Title = "Long axis titles (clipped at 100%)",
Series = { new FunctionSeries(Math.Cos, 0, 10, 400) },
};
var plotView = new PlotView
{
Model = plotModel,
Width = 400,
Height = 400,
};
var tooltip = new ToolTip { Content = plotView };
// It works
//var grid = new Grid()
//{
// Children = { plotView }
//};
//Main.Content = grid;
// It doesn't work
var grid = new Grid
{
Width = 400,
Height = 500,
Background = Brushes.Red,
ToolTip = tooltip,
};
grid.ToolTipOpening += (s, args) => plotView.InvalidatePlot();
Main.Content = grid;
plotView.InvalidatePlot();
}
}
Hi! I have a problem after OxyPlot update from
2.0.0
to2.1.0
. Currently I cannot display a manually created (in code-behind) PlotView within the tooltip of the canvas. I tried to reproduce it on simpler example and it seems to behave the same.In the following example tooltip is always empty. It contains proper size control, but there is no chart on the view. Within the comments you can find some code that works, but without tooltip.
When I'm trying to do this implementing
PlotView
in xaml code via VM - it works.MainWindow.xaml.cs:
MainWindow.xaml:
Platform:
.NET version: 4.8/6.0
Oxyplot version: 2.1.0
Thank you for your help!
The text was updated successfully, but these errors were encountered: