Commit Latest

This commit is contained in:
2025-06-25 16:19:50 -04:00
parent 0fbded94d5
commit 81d12d2a8b
5 changed files with 332 additions and 259 deletions

View File

@@ -61,10 +61,10 @@
</ComboBox>
<Label Content="Day Count" HorizontalAlignment="Left" ></Label>
<ComboBox ItemsSource="{Binding Path=DayCounts, Mode=OneWay}" SelectedItem="{Binding Path=SelectedDayCount}"/>
<!-- <Button Content="Refresh" HorizontalAlignment="Stretch" Command="{Binding Path=Refresh}"></Button>
<Button Content="Refresh" HorizontalAlignment="Stretch" Command="{Binding Path=Refresh}"></Button>
<CheckBox Content="Sync Trade To Band" IsChecked="{Binding Mode=TwoWay,Path=SyncTradeToBand}" HorizontalAlignment="Stretch" />
<CheckBox Content="Show Trade Labels" IsChecked="{Binding Mode=TwoWay,Path=ShowTradeLabels}" HorizontalAlignment="Stretch" />
<CheckBox Content="Show Insider Transactions" IsChecked="{Binding Mode=TwoWay,Path=CheckBoxShowInsiderTransactions}" HorizontalAlignment="Stretch" /> -->
<CheckBox Content="Show Insider Transactions" IsChecked="{Binding Mode=TwoWay,Path=CheckBoxShowInsiderTransactions}" HorizontalAlignment="Stretch" />
</StackPanel>
</Grid>

View File

@@ -10,23 +10,23 @@ namespace PortfolioManager.Views;
public partial class ScottPlotView : UserControl
{
// private AvaPlot avaPlot = default;
public ScottPlotView()
{
InitializeComponent();
}
public ScottPlotView()
{
this.DataContextChanged += OnDataContextChanged;
InitializeComponent();
}
private void AvaPlot_Loaded(object sender, RoutedEventArgs e)
private void OnDataContextChanged(object sender, EventArgs e)
{
if (default != (sender as ScottPlotView))
{
// This code will execute when the AvaPlot is loaded
// if (sender is ScottPlot.Avalonia.AvaPlot)
// {
// if (default == avaPlot)
// {
// PlotterWorkspaceViewModel viewModel = (DataContext as PlotterWorkspaceViewModel);
// avaPlot = this.Find<AvaPlot>("AvaPlot");
// viewModel.OnPlotterLoaded(avaPlot);
// }
// }
ScottPlotView view = (sender as ScottPlotView);
PlotterWorkspaceViewModel viewModel = (DataContext as PlotterWorkspaceViewModel);
if (default == viewModel.Plotter)
{
viewModel.Plotter = new AvaPlot();
viewModel.OnPlotterLoaded(viewModel.Plotter);
}
}
}
}