폴리 라인을 사용자 정의 객체의 컬렉션에 바인딩 할 수 있는지 여부를 아는 사람이 있습니까?wpf - 폴리 라인을 사용자 정의 클래스에 바인딩
예를 들어, 나는 수업과 같이 있습니다
public class MyDataClass{
public double Value { get; set; } //I'd like to map this to a polyline point's x value
public double Position { get; set; } //I'd like to map this to a polyline point's y value
}
그리고 나는 그 개체의 컬렉션에 폴리 라인을 결합하여 X에 Value 속성와 Y에 위치 속성을 번역하고 싶습니다
감사합니다. 컨버터가과 같이 구현됩니다 XAML
<Polyline Stretch="Fill" Grid.Column="0"
Name="Polyline" Stroke="Red"
Points="{Binding Points,Converter={StaticResource ToPointConverter}}">
</Polyline>
:
감사합니다. 전체 컬렉션에서 변환기를 사용할 수 있다는 것을 알지 못했습니다. – user2424495