We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Image in chromeless wpf window title

Thread ID:





124801 Jun 30,2016 03:41 PM UTC Aug 15,2016 05:31 AM UTC WPF 12
Tags: ChromelessWindow
Asked On June 30, 2016 03:41 PM UTC

I'd like to know if I can use an image in the chromeless wpf window bar instead the standard icon, like the application "Syncfusion Metro Studio 5".

Sugapriya Mariappan [Syncfusion]
Replied On July 1, 2016 09:13 AM UTC

Hi Gianni,

Thank you for contacting Syncfusion Support.

We have prepared a sample based on your update.In this sample we have set Icon for the ChromelessWindow using the “Icon” property


If your requirement is different from this sample, please provide more information about your requirement


Replied On July 1, 2016 01:57 PM UTC

I know how to use icon property but I meant an image like your Syncfusion Metro Studio 5, see the image below:

Image in title bar

Replied On July 1, 2016 03:01 PM UTC

Ok, working around ChromelessWindow_137910 example I was able to add images to title bar using the resourceDirectory ControlTemplate definition for TitleBarTemplate.
Is it the right way?

Replied On July 1, 2016 03:57 PM UTC

I've created my custom ChromelessWindow template, on design I can view my template right and I'm able to compile but when I run the application I receive an exception:
Exception thrown: 'System.Windows.Markup.XamlParseException' in PresentationFramework.dll
See the screen shot below:
Any idea to fix it?

Venkateshwaran Ramdoss [Syncfusion]
Replied On July 4, 2016 03:33 PM UTC

Hi Gianni,

We have prepared a sample based on your requirement. In this sample we have edit the ChromelessWindow Template by using ControlTemplate. Please download the sample from the below link.

Sample: ChromelessWindowSample

Venkateshwaran V.R.

Replied On July 5, 2016 10:06 AM UTC

Thanks for your help but I'm struggling to fix this!
I've replicated your example in my project, I'm able to see right the ChromelessWindow template at design time but when I execute my project I receive an XamlParseException exception .
I've also tried to load your template without any modification in my project but when I add the line Template="{StaticResource ChromelessWindowTemplate}" in MainWindow.xaml I receive the same exception!

Link to the screenshot

Replied On July 5, 2016 10:29 AM UTC

This is the details of the exception (it seems a problem around titlebar element):

System.Windows.Markup.XamlParseException verificata
  Message='È stata generata un'eccezione durante la specifica di un valore su 'System.Windows.StaticResourceExtension'.' numero riga '11' e posizione riga '9'.
       in System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
       in System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri)
       in System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream)
       in System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
       in Codepoint.EasyWarehouse.WpfRegistrationUtility.MainWindow.InitializeComponent() in C:\Users\Ricky\Documents\TFS Repos\WpfRegistrationUtility\MainWindow.xaml:riga 1
       Message=Record imprevisto nel flusso Baml. Tentativo di aggiungere a TitleBar che non è una raccolta o ha un TypeConverter.
            in System.Windows.Baml2006.Baml2006Reader.InjectPropertyAndFrameIfNeeded(XamlType elementType, SByte flags)
            in System.Windows.Baml2006.Baml2006Reader.Process_ElementStart()
            in System.Windows.Baml2006.Baml2006Reader.Process_OneBamlRecord()
            in System.Windows.Baml2006.Baml2006Reader.ReadObject(KeyRecord record)
            in System.Windows.ResourceDictionary.CreateObject(KeyRecord key)
            in System.Windows.ResourceDictionary.OnGettingValue(Object key, Object& value, Boolean& canCache)
            in System.Windows.ResourceDictionary.OnGettingValuePrivate(Object key, Object& value, Boolean& canCache)
            in System.Windows.ResourceDictionary.GetValueWithoutLock(Object key, Boolean& canCache)
            in System.Windows.ResourceDictionary.GetValue(Object key, Boolean& canCache)
            in System.Windows.ResourceDictionary.FetchResource(Object resourceKey, Boolean allowDeferredResourceReference, Boolean mustReturnDeferredResourceReference, Boolean canCacheAsThemeResource, Boolean& canCache)
            in System.Windows.FrameworkElement.FindResourceInternal(FrameworkElement fe, FrameworkContentElement fce, DependencyProperty dp, Object resourceKey, Object unlinkedParent, Boolean allowDeferredResourceReference, Boolean mustReturnDeferredResourceReference, DependencyObject boundaryElement, Boolean isImplicitStyleLookup, Object& source)
            in System.Windows.StaticResourceExtension.FindResourceInAppOrSystem(IServiceProvider serviceProvider, Boolean allowDeferredReference, Boolean mustReturnDeferredResourceReference)
            in System.Windows.StaticResourceExtension.FindResourceInEnviroment(IServiceProvider serviceProvider, Boolean allowDeferredReference, Boolean mustReturnDeferredResourceReference)
            in System.Windows.StaticResourceExtension.TryProvideValueInternal(IServiceProvider serviceProvider, Boolean allowDeferredReference, Boolean mustReturnDeferredResourceReference)
            in System.Windows.StaticResourceExtension.ProvideValueInternal(IServiceProvider serviceProvider, Boolean allowDeferredReference)
            in System.Windows.StaticResourceExtension.ProvideValue(IServiceProvider serviceProvider)
            in MS.Internal.Xaml.Runtime.ClrObjectRuntime.CallProvideValue(MarkupExtension me, IServiceProvider serviceProvider)

Venkateshwaran Ramdoss [Syncfusion]
Replied On July 6, 2016 11:49 AM UTC

Hi Gianni,

We can directly set the ChromlessWindow Template. We have prepared a sample which can be downloaded from the below link.

Sample: ChromelessWindowSample

Please ensure whether all ControlTemplate of ResourceDictionary in App.xaml are used as in our sample.

Venkateshwaran V.R. 

Replied On August 11, 2016 01:07 PM UTC

Very Thanks! This sample is very useful and It allowed me to customize in detail my chromeless windows bar but I've some problem adding control on the windows.
For example if you try to add a SFDataGrid control to your above example it give exceptions and is no more possible to run it.
Can you explain me please the needed step to add other controls into the templated chromeless window.
Surely I missed something but don't understand what!

Sugapriya Mariappan [Syncfusion]
Replied On August 12, 2016 07:23 AM UTC

HI Gianni,

We have modified our last updated sample to meet your requirement. In this sample we have added SfDataGrid control to our ChromelessWindow.

Please download the modified sample from the below link

Could you please check the sample and let us know the result?


Replied On August 12, 2016 01:08 PM UTC

Thanks, I've solved.
Adding controls directly from toolbox often is added bad dll version that do not match the targeting of the project and it causes problems and incomprehensible behavior.
The only workaround is to be careful and manually add all the necessary dll for each SF control before add it on the project.

Sugapriya Mariappan [Syncfusion]
Replied On August 15, 2016 05:31 AM UTC

Hi Gianni,

Thank you for your update.

Please let us know if you need any other assistance



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon