I need to show a Tooltip on some disabled ContextMenu items. I tried the workaround using borders and putting the Tooltip and menu item in the borders, but my menu design completely messes up, setting Margin, Padding and BorderThickness to 0 doesn't help.
Any ideas ? Another approach ?
Thanks in advance
Ok, i got it, thanks to vinod8812.
I gave my MenuItem a style with different VisualStates, then i just needed to change the VisualState of my MenuItem to "Disabled", the tooltip works fine.
VisualStateManager.GoToState(menutitem, "Disabled", true);
Not a perfect solution, but will work so far.
Related
I have added a tooltip into my code ToolTipService.ToolTip="Submit Changes" in Button control.
I also used a Radpane telerik control on my page.when i move mouse on button the tooltip is hiding behind Radpane control.
I want to display it on that telerik control. Please give me suggestion.
Thank you
If this still giving you issues try changing the z-order of the ToolTip in relation to the button so that it displays on top of the control. Hope this helps!
You must first set property to enable focus behaiviars.
set IsHitTestVisible="True"
Is there a way to get focus on both controls in the WPF DatePicker? Setting the Focusable property on both makes neither work.
We would like users to be able to tab to both controls instead of focus only going to the textbox. Thanks!
I got some help on this. I needed to set the KeyboardNavigation.TabNavigation property to "Continue", then it worked. Thanks to Sam for the fix.
Why is the binding icon (a small gray icon) not visible in blend for some properties even though they are DependencyProperties? For eg. I dragged a button on my page and dragged a textbox. I want to bind button's content property to textbox's text property. But i can't find the Binding icon in Blend. I know if i type the binding syntax in code it will work just fine. But why is that icon missing?
Thanks in advance :)
I tried reproducing this, but for me, the "Advanced Options" -> "Data Binding" is there. I'm using Blend 4, what version are you using?
Hi
I am trying to render buttons as the item template of a list, to be displayed horizontally. The problem is that they don't 'butt up' to each other. They leave a small gap betwen each one. I have tried allsorts of things to cure it, but have'nt succeeded.
Any ideas?
Try using the WPF tool Snoop to work out where the margin is coming from, and then fix it.
(Negative margins = code smell, in general, IMO.)
Try a negative margin, setting cliptobounds to false, maybe that can help
It's most likely either a Border, Margin, or Padding on your item container (i.e. ListBoxItem if you're using ListBox) which can be corrected with the ItemContainerStyle or your Button's Border is using BorderThickness=1, BorderBrush=Transparent or null.
Use Snoop as Dan suggested to find out.
I have a Canvas and in it a Border. Now I want to give focus to this Border.
Can somebody please tell me how do do this?
First, make sure you have Border.Focusable = True. After that, just call Border.Focus() and you should be good to go.
I haven't tried it for Borders, but with a WPF ContentControl, I think I had to set IsTabStop and IsEnabled to true to get it to be able to accept focus.