Commit Latest
This commit is contained in:
@@ -39,6 +39,9 @@
|
||||
<DataTemplate DataType="vm:BollingerBandViewModel">
|
||||
<vw:BollingerBandView />
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="vm:ScottPlotViewModel">
|
||||
<vw:ScottPlotView />
|
||||
</DataTemplate>
|
||||
</Window.DataTemplates>
|
||||
|
||||
<Window.Styles>
|
||||
|
||||
15
PortfolioManager/Views/ScottPlotView.axaml
Normal file
15
PortfolioManager/Views/ScottPlotView.axaml
Normal file
@@ -0,0 +1,15 @@
|
||||
<UserControl xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:ScottPlot="clr-namespace:ScottPlot.Avalonia;assembly=ScottPlot.Avalonia"
|
||||
xmlns:vm="using:PortfolioManager.ViewModels"
|
||||
xmlns:vw="using:PortfolioManager.Views"
|
||||
xmlns:md="using:PortfolioManager.Models"
|
||||
xmlns:local="using:PortfolioManager.UIUtils"
|
||||
xmlns:li="using:LoadingIndicators.Avalonia"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:DataType="vm:ScottPlotViewModel"
|
||||
x:Class="PortfolioManager.Views.ScottPlotView">
|
||||
<ScottPlot:AvaPlot Name="AvaPlot"/>
|
||||
</UserControl>
|
||||
25
PortfolioManager/Views/ScottPlotView.axaml.cs
Normal file
25
PortfolioManager/Views/ScottPlotView.axaml.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Interactivity;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using PortfolioManager.ViewModels;
|
||||
using ScottPlot.Avalonia;
|
||||
|
||||
namespace PortfolioManager.Views;
|
||||
|
||||
public partial class ScottPlotView : UserControl
|
||||
{
|
||||
public ScottPlotView()
|
||||
{
|
||||
InitializeComponent();
|
||||
AvaPlot avaPlot = this.Find<AvaPlot>("AvaPlot");
|
||||
avaPlot.Loaded += OnLoadedEvent(this, null);
|
||||
}
|
||||
|
||||
protected void OnLoadedEvent(object sender, EventArgs args)
|
||||
{
|
||||
// if (null == tabControl) return;
|
||||
// tabControl.SelectedIndex = args.Index;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user