|
GridTextColumn col1 = new GridTextColumn() { MappingName = "OrderID", RecordFont = UIFont.FromName("Amontillados", 20f),HeaderFont=UIFont.FromName("Amontillados", 20f) };
dataGrid.Columns.Add(col1);
var col2 = new GridTextColumn() { MappingName = "Customer", RecordFont = UIFont.FromName("Amontillados", 20f) };
dataGrid.Columns.Add(col2);
GridTextColumn col3 = new GridTextColumn() { MappingName="ShipCountry", RecordFont = UIFont.FromName("Amontillados", 20f)};
dataGrid.Columns.Add(col3);
GridTextColumn col4 = new GridTextColumn() { MappingName="ShipCity",RecordFont = UIFont.FromName("Amontillados", 20f),HeaderFont=UIFont.FromName("Amontillados", 20f)};
dataGrid.Columns.Add(col4); |
|
GridTextColumn col1 = new GridTextColumn() { MappingName = "OrderID", HeaderFont = Typeface.CreateFromAsset(this.Assets, "Amontillados.ttf") , RecordFont = Typeface.CreateFromAsset(this.Assets, "Amontillados.ttf") };
dataGrid.Columns.Add(col1);
GridTextColumn col2 = new GridTextColumn() { MappingName= "CustomerID", HeaderFont = Typeface.CreateFromAsset(this.Assets, "Amontillados.ttf"), RecordFont = Typeface.CreateFromAsset(this.Assets, "Amontillados.ttf") };
dataGrid.Columns.Add(col2);
GridTextColumn col3 = new GridTextColumn() { MappingName = "ShipCountry", HeaderFont = Typeface.CreateFromAsset(this.Assets, "Amontillados.ttf"), RecordFont = Typeface.CreateFromAsset(this.Assets, "Amontillados.ttf") };
dataGrid.Columns.Add(col3);
GridTextColumn col4 = new GridTextColumn() {MappingName= "Customer", HeaderFont = Typeface.CreateFromAsset(this.Assets, "Amontillados.ttf"), RecordFont = Typeface.CreateFromAsset(this.Assets, "Amontillados.ttf") };
dataGrid.Columns.Add(col4);
GridTextColumn col5 = new GridTextColumn() { MappingName= "ShipCity", HeaderFont = Typeface.CreateFromAsset(this.Assets, "Amontillados.ttf"), RecordFont = Typeface.CreateFromAsset(this.Assets, "Amontillados.ttf") };
dataGrid.Columns.Add(col5); |
|
GridTextColumn orderIDColumn = new GridTextColumn();
if (Device.RuntimePlatform == Device.iOS)
{
col1.MappingName = "OrderID";
col1.RecordFont = "Amontillados";
col1.HeaderFont = "Amontillados";
}
else if (Device.RuntimePlatform == Device.Android)
{
col1.MappingName = "OrderID";
col1.RecordFont = "Amontillados.ttf#Amontillados";
col1.HeaderFont = "Amontillados.ttf#Amontillados";
col1.LoadUIView = true;
}
else if (Device.RuntimePlatform == Device.UWP)
{
col1.MappingName = "OrderID";
col1.RecordFont = "Assets/Fonts/Amontillados.ttf#Amontillados";
col1.HeaderFont = "Assets/Fonts/Amontillados.ttf#Amontillados";
}
dataGrid.Columns.Add(orderIDColumn); |