I have a resizable button whose control template has thumbs up among other things:
& Lt; ControlTemplate x: key = "ResizableButtonTemplate" TargetType = "{x: type button}" & gt; & Lt; Grid & gt; & Lt ;! - Other Stuff - & gt; & Lt; Thumb height = "3" cursor = "sizeN" margin = "0 -4 0" vertical alignment = "top" horizontal align = "statch" /> & Lt; Thumb width = "3" cursor = "size" "margin =" - 4 0 "workspaceElement =" statchch "horizontal alignment =" left "/> ... gt; & lt; / ControlTemplate> Now I would like that these thumbs are non-dragable after the user reaches some height and width. I tried to use MaxHeight and MaxWidth, But this did not help. Anyone from here can help me!
In the Drag Delta event handler of the Top, where you also change the size of the button (?), You can limit the maximum size when dragging goes to the acceptable size, you do not allow change.
Something like this:
DrugDelta at zero (object sender, drag deltaant ergues e) {// no real code if (actual sizeofbutton + new shape (E. Horizontal change, E. Vertical Change)) MaxSize {// button size adjustment Industry Ministers in}}
Comments
Post a Comment