I have created a ellipse with a triangle in Blend 2012. I went to copy the xaml into my WPF application. However I get the error message "The name RegularPolygon does not exist in the namespace http://schemas.microsoft.com/expression/2010/drawing . What is missing?
<Application x:Class="WpfSimulator.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ed="http://schemas.microsoft.com/expression/2010/drawing"
StartupUri="MainWindow.xaml">
<Application.Resources>
<ed:RegularPolygon HorizontalAlignment="Left" Height="32" InnerRadius="1" Margin="29,14,0,0" PointCount="3" Stretch="Fill" Stroke="Black" StrokeThickness="0" VerticalAlignment="Top" Width="37" RenderTransformOrigin="0.5,0.5">
<ed:RegularPolygon.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform Angle="90.492"/>
<TranslateTransform/>
</TransformGroup>
</ed:RegularPolygon.RenderTransform>
<ed:RegularPolygon.Fill>
<RadialGradientBrush RadiusY="1.241" RadiusX="0.611">
<GradientStop Color="#FF1F1FD8"/>
<GradientStop Color="White" Offset="1"/>
</RadialGradientBrush>
</ed:RegularPolygon.Fill>
</ed:RegularPolygon>
You should add reference to the assembly Microsoft.Expression.Drawing
. Like this:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.