@רחמים
@דוד ל.ט.
זה נותן כזה חלון:
אצלי זה נתן אליפסה -
@דוד ל.ט.
<Ellipse
לא כ"כ הבנתי את כוונתך.
אבל אתגרה בך יותר..
הקוד הזה:
<Window x:Class="Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
WindowStyle="None"
AllowsTransparency="True"
Background="Transparent"
Title="Window1" SizeToContent="WidthAndHeight" >
<Grid Margin="25" Height="435" Width="362" >
<Grid.Effect>
<DropShadowEffect BlurRadius="15" />
</Grid.Effect>
<Path Stretch="Fill" HorizontalAlignment="Left" Width="363" Fill="#FF99CDDE" >
<Path.Data>
<PathGeometry Figures="M131.889 150.061v63.597h-27.256 c-20.079 0-36.343 16.263-36.343 36.342v181.711c0 20.078 16.264 36.34 36.343 36.34h290.734c20.078 0 36.345-16.262 36.345-36.34 V250c0-20.079-16.267-36.342-36.345-36.342h-27.254v-63.597c0-65.232-52.882-118.111-118.112-118.111 S131.889 84.828 131.889 150.061z M177.317 213.658v-63.597c0-40.157 32.525-72.685 72.683-72.685 c40.158 0 72.685 32.528 72.685 72.685v63.597H177.317z M213.658 313.599c0-20.078 16.263-36.341 36.342-36.341 s36.341 16.263 36.341 36.341c0 12.812-6.634 24.079-16.625 30.529c0 0 3.55 21.446 7.542 46.699 c0 7.538-6.087 13.625-13.629 13.625h-27.258c-7.541 0-13.627-6.087-13.627-13.625l7.542-46.699 C220.294 337.678 213.658 326.41 213.658 313.599z" FillRule="evenodd"/>
</Path.Data>
</Path>
<Button Content="נעל" HorizontalAlignment="Left" VerticalAlignment="Top" Width="75" Margin="40,408,0,0"/>
<Button Content="פתח" HorizontalAlignment="Left" VerticalAlignment="Top" Width="75" Margin="248,408,0,0"/>
</Grid>
</Window>
נותן את XY (אני מפחד שלא תאהב את ההגדרה) הנראה כך:
שים לב שאת מפת הנקודות של הpath לא כתבתי ידנית.
אני נעזרתי בהמרה מSVG לXAML ע"י התוכנה inkspace,
אבל אפשר לצייר ישירות בBlend של מיקרוספט.
אפשר להרשים הרבה יותר, רק שאני לא כ"כ כשרוני בזה ולא כ"כ פנוי.
תמונה/קובץ מצורף לא נמצא
פורסם במקור בפורום CODE613 ב15/08/2013 12:00 (+03:00)