[fixed] MPF element: GradientStopCollection (1 Viewer)

morpheus_xx

Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,070
    7,459
    Home Country
    Germany Germany
    I found that I cannot use the "GradientStopCollection" from xaml code like:

    Code:
           <RadialGradientBrush>         
             [B] <GradientStopCollection>[/B]
                <GradientStop Color="#3FFFFFFF" Offset="0"/>
                <GradientStop Color="#14FFFFFF" Offset="0.344"/>
                <GradientStop Color="#07FFFFFF" Offset="0.442"/>
                <GradientStop Color="#00FFFFFF" Offset="0.549"/>
              [B]</GradientStopCollection>[/B]
            </RadialGradientBrush>

    I think there is a registration entry missing:
    Code:
          _objectClassRegistrations.Add("GradientStop", typeof(SkinEngine.Controls.Brushes.GradientStop));
    [B]      _objectClassRegistrations.Add("GradientStopCollection", typeof(SkinEngine.Controls.Brushes.GradientStopCollection));[/B]

    Doing this requires a parameterless constructor, isn't it?

    Is it enough to add it? Where we get the parent reference in this case?

    Morpheus
     

    Albert

    MP2 Developer
  • Premium Supporter
  • February 18, 2008
    1,297
    1,130
    47
    Freiburg im Breisgau, Germany
    Home Country
    Germany Germany
    AW: MPF element: GradientStopCollection

    I just added that capability to the SkinEngine. You're right, the first necessary thing is the parameterless constructior, the second thing is the registration. The parent reference comes into the GSC in the GradientBrush.AddChild method. I didn't test it but it should work as just implemented.
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,070
    7,459
    Home Country
    Germany Germany
    • Thread starter
    • Moderator
    • #3
    AW: MPF element: GradientStopCollection

    tested and it's working :D
     

    Users who are viewing this thread

    Top Bottom