Posts Tagged ‘callout Silverlight’
Callouts in Silverlight
As per the project requirement I have to show some Callouts. I was thinking of creating it using paths and curves. It would have been a lot of work. But blend saved my time. Blend provides callouts and other shapes in toolbar, VS editor wont provide it in toolbar. Below xaml shows a callout with an Oval textbox (Oval textbox I mentioned in my earlier post).
Name Space: System.Windows.Shapes
XAML
<UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:ed="http://schemas.microsoft.com/expression/2010/drawing" xmlns:we="clr-namespace:Designer.Controls" mc:Ignorable="d" x:Class="Designer.Controls.CallOutOval" d:DesignWidth="640" d:DesignHeight="480"> <Grid x:Name="LayoutRoot"> <ed:Callout AnchorPoint="0,1.25" CalloutStyle="Oval" Fill="#FFF4F4F5" FontSize="14.666999816894531" Stroke="Black" HorizontalAlignment="Left" VerticalAlignment="Top"> <ContentControl> <we:OvalTextBox Text="Your Text here" CornerRadius="50" BorderThickness="0" Background="Transparent"></we:OvalTextBox> </ContentControl> </ed:Callout> </Grid> </UserControl>
Blend provides different callouts like Oval, Rectangle and Cloud. We are done with the Callout user control.