با عرض سلام و خسته نباشید خدمت کاربران وب سایت پروگرم 98 😉 در این مطلب از وب سایت پروگرم 98 آموزش قرار دادن عکس در دکمه با استفاده از
تصاویر خروجی نهایی این کد:
کد قرار دادن عکس در دکمه با استفاده از
<Window x:Class="OpacityMaskExample"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title=""
Height="430" Width="300">
<Grid>
<Button Name="Select" ToolTip="Select" Margin="5" Width="60" Height="60" Background="LightCoral">
<Image Width="50" Height="50">
<Image.Source>
<DrawingImage>
<DrawingImage.Drawing>
<GeometryDrawing Brush="Yellow">
<GeometryDrawing.Geometry>
<PathGeometry
Figures="M25,75 L 50,0 200,75 100,75 60,100 40,100,40,75Z">
<PathGeometry.Transform>
<RotateTransform
CenterX="50" CenterY="50" Angle="45" />
</PathGeometry.Transform>
</PathGeometry>
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title=""
Height="430" Width="300">
<Grid>
<Button Name="Select" ToolTip="Select" Margin="5" Width="60" Height="60" Background="LightCoral">
<Image Width="50" Height="50">
<Image.Source>
<DrawingImage>
<DrawingImage.Drawing>
<GeometryDrawing Brush="Yellow">
<GeometryDrawing.Geometry>
<PathGeometry
Figures="M25,75 L 50,0 200,75 100,75 60,100 40,100,40,75Z">
<PathGeometry.Transform>
<RotateTransform
CenterX="50" CenterY="50" Angle="45" />
</PathGeometry.Transform>
</PathGeometry>