mirror of
https://github.com/jwetzell/QControlKit.git
synced 2026-08-14 11:53:47 +00:00
Fix missized grid rows
This commit is contained in:
@@ -5,6 +5,7 @@ using System.Threading.Tasks;
|
|||||||
using QSharp;
|
using QSharp;
|
||||||
using QSharpXamDemo.ViewModels;
|
using QSharpXamDemo.ViewModels;
|
||||||
using Serilog;
|
using Serilog;
|
||||||
|
using Xamarin.Essentials;
|
||||||
using Xamarin.Forms;
|
using Xamarin.Forms;
|
||||||
|
|
||||||
namespace QSharpXamDemo
|
namespace QSharpXamDemo
|
||||||
@@ -49,11 +50,11 @@ namespace QSharpXamDemo
|
|||||||
{
|
{
|
||||||
Grid cueGrid = cueToGrid(aCue);
|
Grid cueGrid = cueToGrid(aCue);
|
||||||
cueGridDict.Add(aCue.uid, cueGrid);
|
cueGridDict.Add(aCue.uid, cueGrid);
|
||||||
Device.BeginInvokeOnMainThread(() =>
|
MainThread.InvokeOnMainThreadAsync(() =>
|
||||||
{
|
{
|
||||||
cueListsGrid.RowDefinitions.Add(new RowDefinition { Height = GridLength.Auto });
|
cueListsGrid.RowDefinitions.Add(new RowDefinition { Height = GridLength.Auto });
|
||||||
cueListsGrid.Children.Add(cueGrid, 0, aCue.sortIndex);
|
cueListsGrid.Children.Add(cueGrid, 0, aCue.sortIndex);
|
||||||
});
|
}).Wait();
|
||||||
});
|
});
|
||||||
|
|
||||||
cueAddTask.Start();
|
cueAddTask.Start();
|
||||||
@@ -106,25 +107,26 @@ namespace QSharpXamDemo
|
|||||||
int rows = 1;
|
int rows = 1;
|
||||||
if (cue.cues.Count > 0)
|
if (cue.cues.Count > 0)
|
||||||
{
|
{
|
||||||
foreach (var aCue in cue.cues)
|
foreach (var aCue in cue.cues)
|
||||||
{
|
{
|
||||||
cueGrid.RowDefinitions.Add(new RowDefinition { Height = GridLength.Auto });
|
cueGrid.RowDefinitions.Add(new RowDefinition { Height = GridLength.Auto });
|
||||||
var aCueGrid = cueToGrid(aCue);
|
var aCueGrid = cueToGrid(aCue);
|
||||||
cueGridDict.Add(aCue.uid, aCueGrid);
|
cueGridDict.Add(aCue.uid, aCueGrid);
|
||||||
|
|
||||||
aCueGrid.Margin = new Thickness(10, 0, 0, 0);
|
aCueGrid.Margin = new Thickness(10, 0, 0, 0);
|
||||||
cueGrid.Children.Add(aCueGrid, 0, aCue.sortIndex + 1);
|
cueGrid.Children.Add(aCueGrid, 0, aCue.sortIndex + 1);
|
||||||
rows++;
|
rows++;
|
||||||
}
|
}
|
||||||
|
|
||||||
var cueFrame = new Frame
|
//this doesn't work to outline group?
|
||||||
{
|
/*var cueFrame = new Frame
|
||||||
BackgroundColor = Color.Transparent,
|
{
|
||||||
BorderColor = Color.Black
|
BackgroundColor = Color.Transparent,
|
||||||
};
|
BorderColor = Color.Black
|
||||||
|
};
|
||||||
|
|
||||||
cueGrid.Children.Add(cueFrame);
|
cueGrid.Children.Add(cueFrame);
|
||||||
Grid.SetRowSpan(cueFrame, rows);
|
Grid.SetRowSpan(cueFrame, rows);*/
|
||||||
|
|
||||||
}
|
}
|
||||||
return cueGrid;
|
return cueGrid;
|
||||||
|
|||||||
Reference in New Issue
Block a user