调整形状内部路径的大小 [英] Resize of a path inside a shape
问题描述
大家好!....
我有一个关于调整内部路径大小的问题一个形状。我会尝试尽可能清楚。
I have a question about the resize of a path inside a shape. I'll try to be as clear as possible.
Inside Blend我在(在LayoutGrid内)绘制一个Circle。然后我绘制另一个圆圈,我使用3个点通过相交操作提取圆的一部分。
Inside Blend I draw (inside the LayoutGrid) a Circle. Then i draw another circle and i use 3 points to extract, through an Intersect operation, a section of a circle.
现在我希望此部分围绕背景中心旋转圆圈(如在雷达效果中)...
Now i'd like this section to rotate around the center of the background circle (as in a radar effect)...
除了我仍然必须实现的所有依赖属性。我不明白为什么,当我在应用程序中使控件更大时,扇区调整的方式与背景中的圆圈不一致....
apart from all the dependency properties that i still have to implement. I don't get why, when i make the control bigger inside an application, the sector resize in a way not consistent with the circle in background....
<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"
mc:Ignorable="d"
x:Class="WpfControlLibrary3.Mycontrol1"
x:Name="UserControl" MinWidth="100" MinHeight="100">
<Grid x:Name="LayoutRoot">
<Ellipse Fill="White" Stroke="Black" Margin="-1,-1,4,4.981" d:LayoutOverrides="HorizontalAlignment, VerticalAlignment"/>
<Grid>
<Path Fill="Red" Stretch="Fill" Stroke="Black" Margin="13.081,-1,0,51.213" Data="M34.418714,0.5 L35.393712,0.51221228 35.393712,49.286999 0.5,14.393551 1.3015738,13.618863 C9.9151049,5.4905195 21.578092,0.49999994 34.418714,0.5 z" HorizontalAlignment="Left" VerticalAlignment="Center"/>
</Grid>
</Grid>
</UserControl>
推荐答案
尺寸椭圆和包含路径的网格不一样,所以当你调整它们的大小时,它们在不同的尺度上。
The sizes of the ellipse and the grid containing the path aren't the same, so when you resize both of them they are on different scales.
这篇关于调整形状内部路径的大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!