BlurredBackground.WPF 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package BlurredBackground.WPF --version 1.0.0                
NuGet\Install-Package BlurredBackground.WPF -Version 1.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="BlurredBackground.WPF" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add BlurredBackground.WPF --version 1.0.0                
#r "nuget: BlurredBackground.WPF, 1.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install BlurredBackground.WPF as a Cake Addin
#addin nuget:?package=BlurredBackground.WPF&version=1.0.0

// Install BlurredBackground.WPF as a Cake Tool
#tool nuget:?package=BlurredBackground.WPF&version=1.0.0                

BlurredBackground.WPF

BlurredBackground is a powerful library for C# WPF applications that allows developers to easily add a blurred background effect to UI elements in their WPF applications without affecting the element's content. Enhance your application’s visual appeal by creating a frosted glass effect on the backgrounds of specified controls.

<p align="center"> <img src="https://github.com/user-attachments/assets/001b9c4d-06ab-434f-bb7e-2ee7e1821710" width="50%"> </p>

Features

  • Blur Background: Easily enable a blur effect on any WPF Border.
  • Customizable Blur Radius: Set the intensity of the blur effect through the BlurRadius property.
  • Dynamic Merging: Control the opacity of the blurred effect with the Merging property.
  • DPI Awareness: Adjusts the blur effect based on the DPI property.

Getting Started

Prerequisites

  • .NET Framework or .NET Core with WPF support.
  • Visual Studio or any compatible IDE for WPF development.

Installation

Install the BlurredBackground.WPF NuGet package :

Install-Package BlurredBackground.WPF

Usage

1. Add a Blurred Background to Your XAML

Include the BlurredBackground effect on a Border in your main window or the appropriate user control.

<Window x:Class="YourNamespace.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:BlurBackground.WPF"
        Title="Blurred Background Example" Height="350" Width="525">
    <Grid>
        <Border local:BlurredBackground.EnableBlur="True"
                local:BlurredBackground.BlurRadius="10"
                local:BlurredBackground.Merging="0.5"
                local:BlurredBackground.Dpi="96"
                Background="Gray">
            <TextBlock Text="Hello, World!" 
                       HorizontalAlignment="Center" 
                       VerticalAlignment="Center" 
                       FontSize="32" 
                       Foreground="White"/>
        </Border>
    </Grid>
</Window>
2. Configure Properties
  • EnableBlur: Set to true to activate the blur effect.
  • BlurRadius: Adjusts the strength of the blur. The default value is 20.0.
  • Merging: Sets the opacity of the blurred background. The default is 0.5.
  • Dpi: Adjusts the DPI settings for the rendered blur effect. Default is 96 A suitable value for performance is 30.

The library hooks into the Loaded and SizeChanged events of the Border control to apply and update the blur effect dynamically as needed.

Customization

You can customize the blur appearance by adjusting the BlurRadius, Merging, and Dpi properties on the Border control.

<p align="center"> <img src="https://github.com/user-attachments/assets/ad74750a-a463-41b1-a851-fc254fc98140" width="50%"> <img src="https://github.com/user-attachments/assets/f283b3b0-c673-43fc-b26f-08cbb2c0909d" width="50%"> </p>

Contributing

Contributions are welcome! Please submit pull requests or open issues to discuss potential improvements.


Enhance your application's visual appeal with BlurredBackground!

Product Compatible and additional computed target framework versions.
.NET net5.0-windows7.0 is compatible.  net6.0-windows was computed.  net6.0-windows7.0 is compatible.  net7.0-windows was computed.  net8.0-windows was computed.  net8.0-windows7.0 is compatible. 
.NET Framework net462 is compatible.  net463 was computed.  net47 is compatible.  net471 was computed.  net472 was computed.  net48 is compatible.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.6.2

    • No dependencies.
  • .NETFramework 4.7

    • No dependencies.
  • .NETFramework 4.8

    • No dependencies.
  • net5.0-windows7.0

    • No dependencies.
  • net6.0-windows7.0

    • No dependencies.
  • net8.0-windows7.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.0 95 10/4/2024
1.0.0 89 10/2/2024