I have created a new category: Button login which increases the button class I attached a new property, called ange . I have created a style for this, but I have this error: Fixed 11 type 'buttonignin' can not get a static member 'ImmageProperty'
class ButtonLogin : Button {Dependency for public static readability property image = Dependency property. Setup value (Image Properties, Value): Registered ("Aparivase", TypeV (Choiceroot), Typef (Buttonlogin), New FrameworkProperty Data (ImageSource Faucet); Public ImageSource Immage {Received {Fetch (ImageSource) GetValue (ImageProperty);} ;}}
XML:
style x: key = "buttonlogin" target type = "{x: type local: button login}" & gt; ; & Lt; Setter Estates = "Template"> TargetType = "{x: Type Local: Button Login}" & gt; & gt; Grid & gt; & lt; LT; Ellipse & gt; & lt; E Llipse.fil> ImageBrush ImageSource = "/ LogIq; Components / Images / circ.fw.png" /> & lt; /Ellipse.Fill> & lt; / Ellipse & gt; & lt; Image Margin = "21,17,19,18" source = "{TemplateBinding Immage}" stretch = "uniform" /> gt; & gt; ControlTemplate.Triggers & gt; & lt; trigger property = "IFococled" value = "true" /> & lt; trigger property = "isdefaulted" value = "true" /> gt; trigger property = "ismouth over" value = "true" /> & Lt; Trigger Property = "Ezopress" Value = "True" /> & Lt; Trigger Property = "EzineABl" value = "False" /> & Lt; /ControlTemplate.Triggers> & Lt; / ControlTemplate & gt; & Lt; /Setter.Value> & Lt; / Setter & gt; & Lt; / Style & gt;
I think the problem is here: source = "{TemplateBinding Immage}, but I do not understand, because I have created another button in the same way.
Dependency property identifier name is incorrect .
This Instead of ImmageProperty
, ImageProperty
. . The rapper CLR property and the constant DP identifier name should always be in sync because XAML uses the DP identifier internally and uses CLA And does not use wrapper properties.
Comments
Post a Comment