我生成一个带有- name: Assemble from fragments from a directory
assemble:
src: /my/remote/
dest: /my/remote/dst
和Initial:
# ls
file1 file2
# cat file1
this is file1
# cat file2
this is file2
After running playbook:
# cat dst
this is file1
this is file2
的元素列表。
但是我需要参考列表中的绑定项来了解单个控件的ObservableList
。
我需要ItemsControl
来削减我的actualWidth
,以使其不超过Width
我尝试使用Polyline
属性将Canvas
和OneWayToSource
绑定回列表中的项目。始终为NaN或0。
TwoWay
以及绑定对象的类
Width
我希望<ItemsControl x:Name="GraphLB" ItemsSource="{Binding}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Border Padding="5,5,0">
<StackPanel>
<TextBlock Text="{Binding Text}" Foreground="{Binding Foreground}"/>
<Border BorderBrush="{Binding Foreground}" BorderThickness="0.5">
<Canvas MinHeight="40" MinWidth="100"
Height="{Binding Height,Mode = TwoWay }"
Width="{Binding Width,Mode = TwoWay }">
<Polyline Points="{Binding Line}" Stroke="{Binding Foreground}" StrokeThickness="1"/>
</Canvas>
</Border>
</StackPanel>
</Border>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
会将列表元素中的值设置为class GraphListObject : LabelListObject
{
public double Height { get; set; }
public double Width { get; set; }
private getProperty<PointCollection> getLine;
public PointCollection Line { get { return GetLine(); } }
internal getProperty<PointCollection> GetLine { get => getLine; set { getLine = value; } }
}
元素的宽度,但实际输出为0。
可悲的是,Width="{Binding Width,Mode = TwoWay }"
被绘制在边界之外: