Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1655
how to add image to content pane
posted

 

 

 

 

 

 

 

 

 

 

 

 

 

I am trying to add icon to content pane using the following code in xaml.

but it is throwing error: "Cannot convert string '../WPF.UI/Images/CustomDialogInformation.png' in attribute 'Image' to object of type 'System.Windows.Media.ImageSource'"

Plese suggest the solution for this..

<igDock:SplitPane igDock:XamDockManager.InitialLocation="DockedRight" SplitterOrientation="Horizontal">

<igDock:ContentPane x:Name="cpAdvancedSearch" Header="Advanced Search" 

Image

 

="../WPF.UI/Images/CustomDialogInformation.png"

 

 

 

Background="#FFE1E1E1" IsPinned="False" AllowClose="False">

 

 

 

 

 

</igDock:ContentPane>

 

 

 

</igDock:SplitPane

>

  • 54937
    Suggested Answer
    Offline posted

    Ritesh_2009 said:

    I am trying to add icon to content pane using the following code in xaml.

    but it is throwing error: "Cannot convert string '../WPF.UI/Images/CustomDialogInformation.png' in attribute 'Image' to object of type 'System.Windows.Media.ImageSource'"

    Plese suggest the solution for this..

    That is a general error that you will get from the WPF framework when the path given is not a valid path to that image or CustomDialogInformation.png does not have a Build Action of Resource.