با عرض سلام و خسته نباشید خدمت کاربران وب سایت پروگرم 98 😉 در این مطلب کد شفاف کردن دکمه با OpacityMask در #C را آماده کردم. امیدوارم که این کد برای شما مفید باشد.
تصویر خروجی این کد:
کد شفاف کردن دکمه با OpacityMask در #C :
<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 Height="60" Width="60"
RenderTransformOrigin="1,0.5">
<Button.OpacityMask>
<LinearGradientBrush StartPoint="0,0"
EndPoint="0,1">
<GradientStop Color="Transparent"
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 Height="60" Width="60"
RenderTransformOrigin="1,0.5">
<Button.OpacityMask>
<LinearGradientBrush StartPoint="0,0"
EndPoint="0,1">
<GradientStop Color="Transparent"