benruehl / adonis-ui

Lightweight UI toolkit for WPF applications offering classic but enhanced windows visuals
https://benruehl.github.io/adonis-ui/
MIT License
1.7k stars 143 forks source link

How to remove or change the default adonis-UI background image (used in demo app)? #155

Closed Zollot closed 2 years ago

Zollot commented 3 years ago

Hi. I have created a small app with adonis-UI wpf library using the demo app as a basis. The demo app has adonis background image (watermark type of img) and even when it looks great I'd like to try to change it or to remove it. But the problem is I haven't found a way to change or remove the background image used in the adonis demo app.

Where is the default background image stored and can I somehow replace ti with a new image? Or how can I remove the background image?

At the moment the main window has following style and theme settings. Thanks for and keep up the good work.

<adonisControls:AdonisWindow x:Class="TestApp1.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:TestApp1"
        xmlns:adonisUi="clr-namespace:AdonisUI;assembly=AdonisUI"
        xmlns:adonisControls="clr-namespace:AdonisUI.Controls;assembly=AdonisUI"
        xmlns:adonisExtensions="clr-namespace:AdonisUI.Extensions;assembly=AdonisUI"
        xmlns:converters="clr-namespace:TestApp1.Converters"                             
        xmlns:viewModels="clr-namespace:TestApp1.ViewModels"                            
        mc:Ignorable="d"
        PlaceTitleBarOverContent="False"
        Title="TestApp with Adonis-UI" Height="600" Width="800">

    <adonisControls:AdonisWindow.Style>
        <Style TargetType="adonisControls:AdonisWindow" BasedOn="{StaticResource {x:Type adonisControls:AdonisWindow}}"></Style>
    </adonisControls:AdonisWindow.Style>

    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="Views.xaml"/>
            </ResourceDictionary.MergedDictionaries>

            <Style x:Key="NavigationGroupHeaderStyle" TargetType="TextBlock">
                <Setter Property="Foreground" Value="{DynamicResource {x:Static adonisUi:Brushes.ForegroundBrush}}"/>
                <Setter Property="FontWeight" Value="DemiBold"/>
                <Setter Property="FontSize" Value="11"/>
                <Setter Property="Margin" Value="{adonisUi:Space 2, 1, 1, 1}"/>
            </Style>
        </ResourceDictionary>
    </Window.Resources>
    <Grid>  .....etc...... wpf controls...
benruehl commented 2 years ago

It is a little further down in MainWindow.xaml.

<ContentControl ContentTemplate="{DynamicResource {x:Static adonisUi:Icons.AdonisUIGrayscale}}"
                Foreground="{DynamicResource {x:Static adonisUi:Brushes.Layer1BorderBrush}}"
                Focusable="False"
                HorizontalAlignment="Right"
                VerticalAlignment="Bottom"
                Opacity="0.4"
                Width="600"
                Height="600"
                Margin="0, 0, -64, -136"/>