Skip to content

TitleBar Icon is missing #1345

@KnoerleMan

Description

@KnoerleMan

Describe the bug

For me the Icon of the TitleBar is not shown when running the latest MVVM sample project.

I had to adjust the code from this:

<ui:TitleBar
            Title="{Binding ViewModel.ApplicationTitle, Mode=OneWay}"
            Grid.Row="0"
            Icon="pack://application:,,,/Assets/applicationIcon-256.png" />

To this:

<ui:TitleBar
            Title="{Binding ViewModel.ApplicationTitle, Mode=OneWay}"
            Grid.Row="0">
            <ui:TitleBar.Icon>
                <ui:ImageIcon>
                    <ui:ImageIcon.Source>
                        <BitmapImage UriSource="pack://application:,,,/Assets/applicationIcon-256.png" />
                    </ui:ImageIcon.Source>
                </ui:ImageIcon>
            </ui:TitleBar.Icon>
        </ui:TitleBar>

To make it work.

Does the samples need to be adjusted or am I doing something wrong?

Thanks in advance!

Regards,
Manuel

To Reproduce

Build and run the latest MVVM sample project.

Expected behavior

The window of the MVVM sample project displays the application icon in the title bar.

Screenshots

No response

OS version

Windows 10

.NET version

net8.0-windows

WPF-UI NuGet version

4.0.0

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions