WPF repeatbutton in scrollbar only triggers IsPressed from the template, not the style -
I have a minor issue to simplify the theming, we have more stylish items in styles and styles of control templates Want to lay out. Therefore, for the repeating button of the scrollbar, I can get it to do all this work but the issue only works from the template.
Then the template (originally) is:
& amp; ControlTemplate x: key = "ScrollBarButtonCT" TargetType = "{x: Type RepeatButton}" & gt; & Lt; Border x: name = "border repertory button" margin = "1" cornerreadia = "2" background = "{template binding background}" & gt; & Lt; Path x: name = "pathway" horizontal alignment = "center" vertical alignment = "center" Fill = "{DynamicResource ThumbBrush}" data = "{binding content, relative source = {relative serus templated pent}}" /> & Lt; / Border & gt; & Lt; ControlTemplate.Triggers & gt; & Lt; Trigger Property = "Issued" value = "True" & gt; & Lt; Setter TargetName = "Boundary Change" property = "background" value = "{DynamicResource ThumbPressedBrush}" /> & lt; / Catalyst & gt; & Lt; /ControlTemplate.Triggers> & Lt; / ControlTemplate & gt;
More styles
& lt; Style x: key = "scrollbarbuttonstyle" targettype = "{x: type repeat button}" & gt; & Lt; Setter Property = "Override Default Style" Value = "Correct" /> & Lt; Setter Property = "Focusable" value = "False" /> & Lt; Setter Property = "iTabTap" value = "False" /> & Lt; Setter property = "background" value = "{DynamicResource ScrollBarBGBrush}" /> & Lt ;! - Border reparte button - & gt; & Lt; Setter Property = "Opacity Mask" value = "{DynamicResource ThumbBrush}" /> & Lt ;! - Path-Arrow - & gt; & Lt; Setter property = "Template" value = "{static resource scrollbar button ct}" /> & Lt; Style.Triggers & gt; & Lt ;! - & lt; Trigger Property = "Ezopress" value = "True" & gt; .... Coming from this style does not work & lt; Setter Property = "Background" Value = "{DynamicResource ThumbPressedBrush}" /> & Lt; / Catalyst & gt; - & gt; & Lt; Trigger Property = "Iceded" value = "wrong" & gt; & Lt; Setter property = "foreground" value = "{dynamic resource scrollbar disabled bugrush}" /> & Lt; / Catalyst & gt; & Lt; Trigger Property = "Ismaas Over" Value = "True" & gt; & Lt; Setter Property = "Background" Value = "{DynamicResource ThumbHoverBrush}" /> & Lt; / Catalyst & gt; & Lt; /Style.Triggers> & Lt; / Style & gt;
I can not issue style to work. While using the control, the snoop is properly raised when seen in the isopressa. What am I doing wrong? Thanks!
No idea why it works, maybe it requires stable processing? You can try to get all the styles in one place.
& lt; Style x: key = "xxxtile" targetType = "{x: type button}" & gt; & Lt; Setter Estates = "Template" & gt; & Lt; Setter.Value & gt; & Lt; ControlTemplate TargetType = "{x: type button}" & gt; & Lt; ControlTemplate.Triggers & gt; & Lt; Trigger Property = "Ezopress" value = "True" & gt; & Lt; Setter Property = "Fill" TargetName = "Rectangle" value = "#FFD5D5D5" /> & Lt; / Catalyst & gt; & Lt; /ControlTemplate.Triggers> & Lt; / ControlTemplate & gt; & Lt; /Setter.Value> & Lt; / Setter & gt; & Lt; / Style & gt;
ps TargetType = "TypeName" == TargetType = "{x: Type Typname}"
Comments
Post a Comment