에서 사용자 정의 모양의 단추를 만들고 내 단추를 얻으려는 시도에 사각형 모양보다 다른 선택 영역이 있습니다. 둥근 모양 선택 영역을 만드는 것은 어렵지 않지만이 호 모양은 좋은 답변을 찾을 수 없습니다. 내가 비주얼 스튜디오를위한 혼합에서이 작업을 수행하기 위해 노력하고있어 2013 년wpf 및 C#
내 현재 코드는 다음과 같습니다
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="RoundUI.MainWindow"
Title="MainWindow" Height="350" Width="525"
AllowsTransparency="True"
OpacityMask="White"
WindowStyle="None"
Background="Transparent">
<Grid MouseLeftButtonDown="Window_MouseLeftButtonDown" MouseMove="Grid_MouseMove">
<Grid.Background>
<ImageBrush ImageSource="smileface.png" />
</Grid.Background>
<Image x:Name="image" HorizontalAlignment="Left" Height="100" Margin="212,29,0,0" VerticalAlignment="Top" Width="100" Source="nool.png" RenderTransformOrigin="0.5,0.5" MouseDown="Image_MouseDown_1" MouseEnter="Image_MouseEnter_1" MouseLeave="Image_MouseLeave" Stretch="Fill" >
<Image.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform Angle="90"/>
<TranslateTransform/>
</TransformGroup>
</Image.RenderTransform>
<Image.Clip>
<EllipseGeometry Center="50,50" RadiusX="45" RadiusY="45" />
</Image.Clip>
</Image>
<Image HorizontalAlignment="Left" Height="100" Margin="212,214,0,0" VerticalAlignment="Top" Width="100" MouseDown="Image_MouseDown" Source="nool.png" MouseEnter="Image_MouseEnter_2" MouseLeave="Image_MouseLeave_1" Stretch="Fill" Cursor="IBeam" ToolTip="Hello" />
<Ellipse Height="100" Width="100" Margin="317,156,108,94" MouseEnter="Ellipse_MouseEnter" MouseLeave="Ellipse_MouseLeave" MouseDown="Ellipse_MouseDown">
<Ellipse.Fill>
<ImageBrush ImageSource="Arc.png"/>
</Ellipse.Fill>
</Ellipse>
<TextBlock x:Name="infoBlock" HorizontalAlignment="Left" Margin="229,172,0,0" TextWrapping="Wrap" Text="TextBlock" VerticalAlignment="Top" FontSize="16"/>
<TextBlock x:Name="clickBlock" HorizontalAlignment="Left" Margin="354,135,0,0" TextWrapping="Wrap" Text="TextBlock" VerticalAlignment="Top"/>
<Image x:Name="close" HorizontalAlignment="Left" Visibility="Hidden" Source="nool.png" Height="52" Margin="376,10,0,0" VerticalAlignment="Top" Width="69" MouseDown="close_MouseDown"/>
</Grid>
</Window>
내 질문은, 내가이 녹색 영역을 만들 수있는 방법 만 클릭 가능한 . 그런 모든 종류의 보편적 인 코드가 될 수 있다면 좋을 것입니다.
http://stackoverflow.com/questions/6101823/filled-arcs-in-wpf – Sajeetharan