سلام بر برنامه نویسان عزیز ایران زمین 😉 در این مطلب کد ایجاد افکت Blur با BlurBitmapEffect با wpf و سی شارپ #C را آماده کردم. امیدوارم که این کد برای شما مفید باشد.
تصاویر خروجی نهایی این کد:
کد ایجاد افکت Blur با BlurBitmapEffect با wpf و سی شارپ #C :
<Window x:Class="BitmapEffectsExample"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Bitmap Effects" Height="500" Width="400">
<!-- : -->
<StackPanel Margin="5" Grid.Column="1" Grid.Row="0">
<Button Content="A Blur Button" Width="175" Height="50"
Margin="5">
<Button.BitmapEffect>
<BlurBitmapEffect Radius="1" />
</Button.BitmapEffect>
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Bitmap Effects" Height="500" Width="400">
<!-- : -->
<StackPanel Margin="5" Grid.Column="1" Grid.Row="0">
<Button Content="A Blur Button" Width="175" Height="50"
Margin="5">
<Button.BitmapEffect>
<BlurBitmapEffect Radius="1" />
</Button.BitmapEffect>