Я не думаю, что Вы могли сделать это с помощью встроенных утилит, с тех пор при пересечении иерархии каталогов, Вы почти всегда хотите поиск в глубину, или сверху вниз или вверх дном. Вот сценарий Python, который даст Вам поиск в ширину:
import os, sys
rootdir = sys.argv[1]
queue = [rootdir]
while queue:
file = queue.pop(0)
print(file)
if os.path.isdir(file):
queue.extend(os.path.join(file,x) for x in os.listdir(file))
Редактирование:
os.path
- модуль вместо os.stat
- функционируют и stat
- модуль. list.pop
и list.extend
вместо del
и +=
операторы. For setting Height = "Auto"
on most controls, you want to assign the value with double.NaN
.
Example:
element.Height = double.NaN;
Setting Width/Height = "*"
( is a slightly different matter, since it only applies to a select few elements (ColumnDefinition
and RowDefinition
for example). The type of the Width
/Height
value is GridLength
, rather than double
.
Example (more are given on this MSDN page:
column1.Width = new GridLength(1, GridUnitType.Auto); // Auto
column2.Width = new GridLength(1, GridUnitType.Star); // *