Hi I'm trying to get the screen rectangle of a wpf button so that I can highlight it.
I use this to use it:
AutomationPeer theBtnPeer = createPeerForElement (btn); Reset rect = theBtnPeer.GetBoundingScreenRectangle ();
This works fine and gives me the correct rectangle.
However .. If the button is not currently visible then I have BringIntoView () on this BTN successfully to see this button, but when I call it GetBoundingSCreenRectangle () again < Br> I have been given this same old value before I applied BringIntoView ().
How do I get a new rounding rectangle of this button?
Thanks
You can see the height of the rectangle through the actual highlights and the actual wide properties And can get width.
The coordinate window layout depends on the type of control that the button is in.
If your goal is light, then I suggest another way: by changing the template of the button using an orange rectangle, invisible
or using visual states, highlighted and not Highlighted states with a change, which makes Highlight visible rectangular.
Comments
Post a Comment