本文整理匯總了C#中Windows.UI.Xaml.Controls.Canvas.blankTile方法的典型用法代碼示例。如果您正苦於以下問題:C# Canvas.blankTile方法的具體用法?C# Canvas.blankTile怎麽用?C# Canvas.blankTile使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Windows.UI.Xaml.Controls.Canvas
的用法示例。
在下文中一共展示了Canvas.blankTile方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: gridFullfill
private void gridFullfill()
{
//vyplneni gridu bunkami v podobe canvasu
for (int i = 0; i < 66; i++)
{
if (i == 24)
{
Canvas tile = new Canvas();
tile.Background = new SolidColorBrush(Colors.Red);
Windows.UI.Xaml.Controls.Grid.SetColumn(tile, i % 11);
Windows.UI.Xaml.Controls.Grid.SetColumnSpan(tile, 2);
Windows.UI.Xaml.Controls.Grid.SetRow(tile, i / 11);
Windows.UI.Xaml.Controls.Grid.SetRowSpan(tile, 2);
tileCollection.Add(tile);
tile.Tapped += mainTile_Tapped;
LayoutGrid.Children.Add(tile);
}
else
{
if (i == 25 || i == 35 || i == 36)
{
}
else
{
Canvas tile = new Canvas();
tile.Background = new SolidColorBrush(Colors.White);
Windows.UI.Xaml.Controls.Grid.SetColumn(tile, i % 11);
Windows.UI.Xaml.Controls.Grid.SetRow(tile, i / 11);
tile.blankTile(new SolidColorBrush(Colors.Gray));
tileCollection.Add(tile);
LayoutGrid.Children.Add(tile);
}
}
}
//prvotni zbarveni gridu
moodizeGrid(Pollution.StatusColor.Status.Suitable, "Lothlórien");
//nastaveni testovaciho tilu
tileCollection.ElementAt(13).testTile();
}