1. 程式人生 > >wpf border內部元素內邊角溢出問題 裁剪效果

wpf border內部元素內邊角溢出問題 裁剪效果

span -- 問題 ger tor body ima eat str

效果圖

技術分享圖片技術分享圖片

<Grid>
        <Border BorderThickness="3" BorderBrush="#3c4d72" 
                 CornerRadius="12" Background="LightBlue"  Width="606" Height="356" >
            <MediaElement Name="mainMediaElement"   Volume="0"
                       Stretch="Fill"  Width="600" Height="350"  >
                <MediaElement.Clip> 
                    <!--矩形裁剪-->
                    <RectangleGeometry RadiusX="
10" RadiusY="10" Rect="0,0,600,350" /> </MediaElement.Clip> <MediaElement.Triggers> <EventTrigger RoutedEvent="MediaElement.Loaded"> <EventTrigger.Actions> <BeginStoryboard> <Storyboard> <MediaTimeline Storyboard.TargetName="
mainMediaElement" Source="font/TestMedia.mp4" RepeatBehavior="Forever" /> </Storyboard> </BeginStoryboard> </EventTrigger.Actions> </EventTrigger> </MediaElement.Triggers> </MediaElement> </Border> </Grid>

wpf border內部元素內邊角溢出問題 裁剪效果