Developing applications with
Windows Presentation Foundation can use the control palette of our business is
large enough to comfortably walk. Tool
box in the controls increased Framework and CodePlex, such as code.msdn web
sites projects with the help to further increase is continuing. WPF in graphical
and visual power of the everyday life of the control is also available through
most simple applications, the most complex applications are given the
opportunity to develop.
This one we used on the most
fundamental WPF controls Tooltip property and examines how to use features,
features we will be trying to examine.
WPF - Tooltip
WPF application for end users and
developing the components in the component palette and edit a lot you'll use. Have
made our process works and what each control then click on what works and then
prepare a document describing.However, among the world does not change the
facts. End
users do not read the documents easily prepared. This is the reason that the
texts written on the clicks to be very careful Convectional choose and try to
write text algınacak easily. However,
with a maximum of two three words can describe what comes to mind words like
that.
Tooltip help
in this case, we will grow. Control
the mouse on a written explanation required üle we could stop, we can show
pictures are very nice feature. Now,
how to use this feature, let us begin to explain with the help of examples.
Almost all of the controls with
the mouse in the properties of the Tooltip property of a control point when
information disclosure is a nice feature to show the wound. We
want to be able to write a value to assign
Tooltip will
suffice.
<Button Content="Submit">
<Button.ToolTip>
<ToolTip>
<StackPanel>
<TextBlock FontWeight="Bold">Submit</TextBlock>
<TextBlock>Server on request..</TextBlock>
</StackPanel>
</ToolTip>
</Button.ToolTip>
</Button>
Tooltip property of the
button control, we've added two adert TextBlock control and the mouse is over
will allow to be displayed. Now
run the project for testing purposes and the results are a look at.
Seems to have realized
we want. From
the user when the button on the button that describes what works on a very short
explanation is.
Of course, in practice
always be active at all in the form of kontorllerin is never a rule. In
some cases, checks may be shown in passive state. But
we have been passive in the control and that we were preparing a Tooltip always
want to display. There
needs to be done in this case TooltipService URLs into the circuit as shown in
cases where Convectional Disable will allow.
IsEnabled = "False" in
cases where the checks
TooltipService.ShowOnDisable
= "True" feature using the
Tooltip in'll allow to be displayed.
<Button IsEnabled="False" ToolTip="Fill all areas..." ToolTipService.ShowOnDisabled="True" Content="Save" />
Passive control when the
mouse pointer over the button, we would like the following screenshot.

Fine. In
cases where the buttons are active will continue to display Tooltip. However,
we call if we cancel the service will experience Tooltip is not displayed. Tooltip
'feature in the other how much we are able to specify a time period can be
displayed. For
this TooltipService again. 'It
is enough to take advantage of features in ShowDuration.
<Button ToolTip="Fill all Areas..." ToolTipService.ShowDuration="20" Content="Save" />
We have written into the
Tooltip text displayed on the screen after two seconds will be lost.

Tooltip feature
different scenarios very easy Somehow we have seen in kullanbildiğimizi. Now
let's work deals with the visual side. We
use the form on the windows of this type already used for all URLs we could. Practices,
but not forget that we are developing with WPF, and this is presented to us
teknlojinin visuals and flexibility we are able to use them all. Here
we take advantage of this flexibility into the tooltip case i will a bit more
visual. In
the picture, and a tooltip will be outside of standard dimensions.
<Window x:Class="WPFControls.Tooltip"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Tooltip" Height="300" Width="300">
<StackPanel>
<Button Width="100" Height="30">Click Me...
<Button.ToolTip>
<StackPanel Background="Honeydew" Height="200" Width="200">
<StackPanel Background="BurlyWood" Height="30" Width="200"
Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Top" >
<Image VerticalAlignment="Top"
Width="30" Height="30" Source="Images/Copy.png" Name="image1" />
<TextBlock FontFamily="Aharoni" FontSize="24" FontWeight="Bold" Foreground="Black" TextWrapping="Wrap"
VerticalAlignment="Top" Height="30" HorizontalAlignment="Right" Width="143">
<Run FontFamily="Andalus" FontSize="18" FontWeight="Normal" Text="Hi, Everyone."/>
</TextBlock>
</StackPanel>
<StackPanel Width="200" Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Top" >
<TextBlock TextWrapping="Wrap"
Foreground="#FFF9F4F4" TextAlignment="Center" Background="{x:Null}"
HorizontalAlignment="Right" VerticalAlignment="Top" Width="181" Height="98">
<Run FontFamily="Verdana" FontSize="11" FontWeight="Normal" Foreground="#FF151514"
Text="Windows Presentation Foundation with building
<span class="Apple-tab-span" style="white-space: pre; "> </span>perfect rich client application."/>
</TextBlock>
</StackPanel>
</StackPanel>
</Button.ToolTip>
</Button>
</StackPanel>
</Window>
After we process the
following screen will be.

WPF a very simple way in
using the power we have created a very slick Tooltip. We increased these
examples according to the imagination and you have the opportunity.
As a result of this
summer, what we are doing end-user control help to explain one of the features
of the WPF Tooltip control in using the power we have to review.
I hope you able to be
useful.
Turhal Temizer 'in Blog