本文整理汇总了C#中System.Windows.Controls.ItemCollection.GetItemAt方法的典型用法代码示例。如果您正苦于以下问题:C# ItemCollection.GetItemAt方法的具体用法?C# ItemCollection.GetItemAt怎么用?C# ItemCollection.GetItemAt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Controls.ItemCollection
的用法示例。
在下文中一共展示了ItemCollection.GetItemAt方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: resize
//Function used to resize all the tab items
private void resize(ItemCollection items)
{
//Iterates through each tab item and changes the size according to the number of tab items available
for (int index = 0; index < items.Count; index++)
{
TabItem tab = (TabItem) items.GetItemAt(index);
tab.Width = (tabControl.ActualWidth - 6) / items.Count;
}
}
示例2: GenBatFile
public static void GenBatFile(ItemCollection history)
{
using (System.IO.StreamWriter file = new System.IO.StreamWriter("SKUNoDOS.bat", false))
{
file.WriteLine("AMIDEDOS/ SK " + "\"" + DEFAULT_SM_SKU + "\"");
}
using (System.IO.StreamWriter file = new System.IO.StreamWriter("SKUNoEFI.nsh", false))
{
file.WriteLine("AMIDEEFIx64/ SK " + "\"" + DEFAULT_SM_SKU + "\"");
}
using (System.IO.StreamWriter file = new System.IO.StreamWriter("SKUNoWin.bat", false))
{
file.WriteLine("AMIDEWINx64/ SK " + "\"" + DEFAULT_SM_SKU + "\"");
}
using (System.IO.StreamWriter file = new System.IO.StreamWriter("Config.txt", false))
{
for (int i = 0; i < history.Count; i += 2)
file.WriteLine(history.GetItemAt(i).ToString().Replace("Q" + (i / 2 + 1).ToString() + ":", "").Replace("?", "") + history.GetItemAt(i + 1).ToString().Replace("A:", ": "));
}
}