Более гибкое решение для создания элементов и связывания событий ( source )
// creating a dynamic element (container div)
var $div = $("", {id: 'myid1', class: 'myclass'});
//creating a dynamic button
var $btn = $("
0
задан old_timer 28 March 2019 в 13:49
поделиться
Наконец, я нашел, где проблема (причина была обновлена в вопросе), и нашел новый способ решить эту проблему.
<ControlTemplate>
<Path Fill="{TemplateBinding Background}">
<Path.Data>
<PathGeometry>
<PathFigure StartPoint="0 0">
<LineSegment>
<LineSegment.Point>
<MultiBinding Converter="{StaticResource thumb2PointConverter}" ConverterParameter="rightBottom">
<Binding Path="Width" RelativeSource="{RelativeSource Mode=FindAncestor, AncestorType=Thumb}" />
<Binding Path="Height" RelativeSource="{RelativeSource Mode=FindAncestor, AncestorType=Thumb}" />
</MultiBinding>
</LineSegment.Point>
</LineSegment>
<LineSegment>
<LineSegment.Point>
<MultiBinding Converter="{StaticResource thumb2PointConverter}" ConverterParameter="leftBottom">
<Binding Path="Width" RelativeSource="{RelativeSource Mode=FindAncestor, AncestorType=Thumb}" />
<Binding Path="Height" RelativeSource="{RelativeSource Mode=FindAncestor, AncestorType=Thumb}" />
</MultiBinding>
</LineSegment.Point>
</LineSegment>
</PathFigure>
</PathGeometry>
</Path.Data>
</Path>
</ControlTemplate>