 |
| Mark | |
|
| Commented on 2.April 2009 |
| Nice small piece of code.
|
|
|
 |
| Rupesh Chavan | |
|
| Commented on 15.April 2009 |
| Good Work.... Keep it up...
|
|
|
 |
| Martin | |
|
| Commented on 17.April 2009 |
| it is simple logic...!
|
|
|
 |
| Ahmed | |
|
| Commented on 19.April 2009 |
| Nice
|
|
|
 |
| Anil | |
|
| Commented on 1.May 2009 |
| Good and Simple...thanks
|
|
|
 |
| Tore Aurstad | |
|
| Commented on 10.May 2009 |
| I have been developing WPF application for 18 months now. I didn't know about this nice feature, great tip, thanks!
|
|
|
 |
| hnin | |
|
| Commented on 14.May 2009 |
| Great job!
|
|
|
 |
| Asif | |
|
| Commented on 25.May 2009 |
| It is a very nice and precise article. Excellent job
|
|
|
 |
| fernando | |
|
| Commented on 9.June 2009 |
| and how i can to make my own ToolTip in Blend.. or XAMP.. thk
|
|
|
 |
| DON | |
|
| Commented on 18.June 2009 |
| Hun too Yae baat hai
|
|
|
 |
| Tormentor | |
|
| Commented on 26.June 2009 |
| Hi Christian, Can we modify the tooltip content and make like a content presenter, like office 2007 tooltips for an example(Header, Description, image, etc...)?
|
|
|
 |
| Sumit | |
|
| Commented on 12.July 2009 |
Nice tutorial , good that it includes tooltipservice : http://msdn.microsoft.com/en-us/library/system.windows.controls.tooltipservice(VS.95).aspx
|
|
|
 |
| Bolshoi Booze | |
|
| Commented on 7.September 2009 |
Hi Christian
Is it possible to have something like below:
<Style TargetType="{x:Type ...}">
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition .. />
<Condition .. />
</MultiDataTrigger.Conditions>
<Setter Property="ToolTip>
<Setter.Value>
<Grid>
...[Custom Content such as images, textblocks etc]...
</Grid>
</Setter.Value>
</Setter>
</MultiDataTrigger>
</Style>
When I do this I get a below exception:
Exception Cannot add content of type 'System.Windows.Controls.Grid' to an object of type 'System.Object'.
Thanks
|
|
|
 |
| Bolshoi Booze | |
|
| Commented on 7.September 2009 |
Hi Christian
Is it possible to have something like below:
<Style TargetType="{x:Type ...}">
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition .. />
<Condition .. />
</MultiDataTrigger.Conditions>
<Setter Property="ToolTip>
<Setter.Value>
<Grid>
...[Custom Content such as images, textblocks etc]...
</Grid>
</Setter.Value>
</Setter>
</MultiDataTrigger>
</Style>
When I do this I get a below exception:
Exception Cannot add content of type 'System.Windows.Controls.Grid' to an object of type 'System.Object'.
Thanks
|
|
|
 |
| Christian Moser | |
|
| Commented on 8.September 2009 |
Hi Bolshoi,
there are two problems in your approach. The property "tooltip" that you are trying to set requires an object of type tooltip. So you need to warp your <Grid> into a <Tooltip> element.
The second problem is that a style is something like a singleton. It's only created once and applied multiple times. This means that if you include wpf elements in a style you have to add the x:Shared="False" attribute to the style.
I hope this helps you.
Greetings
Christian
|
|
|
 |
| Rajagopal | |
|
| Commented on 3.December 2009 |
| simple and working
|
|
|
 |
| M Islam | |
|
| Commented on 12.January 2010 |
| Great Work !!!
|
|
|
 |
| Jawahar | |
|
| Commented on 16.January 2010 |
| Great, its simple and easy to learn....
|
|
|
 |
| Heinzi | |
|
| Commented on 17.February 2010 |
| ToolTipService.ShowDuration is in Milliseconds, so "20" might not be the best example.
|
|
|
 |
| Victor | |
|
| Commented on 9.April 2010 |
| You are Man!
|
|
|
 |
| CoolDev | |
|
| Commented on 20.May 2010 |
| Suoerb Piece of Code
|
|
|
 |
| Daniel | |
|
| Commented on 12.August 2010 |
I dont have visual studio in this computer so I have to ask... Can I show an image inside the tooltip? If I add an Image tag inside the StackPanel should work??? The code should be like this:
<Button Content="Submit">
<Button.ToolTip>
<ToolTip>
<StackPanel>
<image ... />
<TextBlock FontWeight="Bold">Submit Request</TextBlock>
<TextBlock>Submits the request to the server.</TextBlock>
</StackPanel>
</ToolTip>
</Button.ToolTip>
</Button>
Im ok or is another way to have an image in the tooltip?
|
|
|
 |
| someone | |
|
| Commented on 21.August 2010 |
Hi
How can I set this tooltip (with stackpanel etc) in style file?
I made my style for textbox
<Style x:Key="DefaultStyle" TargetType="{x:Type TextBox}">
<Setter Property="FontFamily" Value="Tahoma"/>
<Setter Property="FontSize" Value="15"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="TextAlignment" Value="Center"/>
<Setter Property="TextWrapping" Value="Wrap"/>
<Setter Property="BorderBrush" Value="#A9C2DE"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Background">
<Setter.Value>
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1" >
<GradientStop Color="#CDE1F7" Offset="0.01"/>
<GradientStop Color="#DFECFA" Offset="0.8" />
</LinearGradientBrush>
</Setter.Value>
</Setter>
<Setter Property="ToolTip">
<Setter.Value>
<StackPanel>
<TextBlock Text="Nice toolbox"/>
<TextBlock Text="Nice tooltip"/>
</StackPanel>
</Setter.Value>
</Setter>
</Style>
But I get xaml parse exception error if I use this style. Is it possible to set this tooltip in style file?
|
|
|