feat: optimize.
This commit is contained in:
@@ -8,19 +8,11 @@ namespace Ursa.Controls;
|
||||
|
||||
[PseudoClasses(PC_Selected)]
|
||||
[TemplatePart(PART_IconGlyph, typeof(PathIcon))]
|
||||
public class RatingCharacter : ContentControl
|
||||
public class RatingCharacter : TemplatedControl
|
||||
{
|
||||
public const string PART_IconGlyph = "PART_IconGlyph";
|
||||
protected const string PC_Selected = ":selected";
|
||||
|
||||
private PathIcon? _icon;
|
||||
|
||||
protected override void OnApplyTemplate(TemplateAppliedEventArgs e)
|
||||
{
|
||||
base.OnApplyTemplate(e);
|
||||
_icon = e.NameScope.Find<PathIcon>(PART_IconGlyph);
|
||||
}
|
||||
|
||||
protected override void OnPointerEntered(PointerEventArgs e)
|
||||
{
|
||||
var parent = this.GetLogicalAncestors().OfType<Rating>().FirstOrDefault();
|
||||
|
||||
Reference in New Issue
Block a user