feat: add a border to template.
This commit is contained in:
@@ -7,12 +7,19 @@
|
||||
<ControlTheme x:Key="{x:Type u:Marquee}" TargetType="u:Marquee">
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate>
|
||||
<Canvas Background="{TemplateBinding Background}">
|
||||
<ContentPresenter
|
||||
Name="{x:Static iri:PartNames.PART_ContentPresenter}"
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}" />
|
||||
</Canvas>
|
||||
<Border
|
||||
Background="{TemplateBinding Background}"
|
||||
BackgroundSizing="{TemplateBinding BackgroundSizing}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}">
|
||||
<Canvas>
|
||||
<ContentPresenter
|
||||
Name="{x:Static iri:PartNames.PART_ContentPresenter}"
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}" />
|
||||
</Canvas>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
</ControlTheme>
|
||||
|
||||
@@ -114,7 +114,7 @@ public class Marquee : ContentControl
|
||||
{
|
||||
Canvas.SetTop(Presenter, location.Value.top);
|
||||
Canvas.SetLeft(Presenter, location.Value.left);
|
||||
}, DispatcherPriority.Background);
|
||||
}, DispatcherPriority.Render);
|
||||
}
|
||||
|
||||
private void InvalidatePresenterPosition()
|
||||
|
||||
Reference in New Issue
Block a user