private void InitializeComponent() { AvaloniaXamlLoader.Load(this); _diagramRenderer = new Webprofusion.Scalex.Rendering.ChordDiagramRenderer(ViewModels.MainViewModel.GuitarModel); _customDrawingOp = new DigramRenderingDrawOp(new Rect(0, 0, Bounds.Width, Bounds.Height), _diagramRenderer, 1.5f); }
public ChordsPage() { InitializeComponent(); chordDiagramRenderer = new Webprofusion.Scalex.Rendering.ChordDiagramRenderer(); SkiaDrawingSurface.ApplyThemeColours(chordDiagramRenderer); var guitarModel = chordDiagramRenderer.GuitarModel; // tuning list this.tuningPicker.ItemsSource = guitarModel.AllTunings; this.tuningPicker.SelectedIndex = 0; // chord types List <ChordDefinition> chordGroups = new List <ChordDefinition>(); chordGroups.Add(new ChordDefinition(ChordGroup.Common, "Common Guitar Chords", "popular", "popular", null)); chordGroups.AddRange(chordDiagramRenderer.GuitarModel.GetAllChordDefinitions()); typePicker.ItemsSource = chordGroups; this.typePicker.SelectedIndex = 0; SetPageTitle(); }