Commit Latest
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user