Hi,
I'm brand new to Infragistics so this is likely a beginner issue but here goes...
When I specify an image for a ContentPane, when the pane is hid the image appears very large.
I have tried both .ico and .png file types.
Any ideas?
Troy
What is happening is that the tab element is being measured with infinity so that it is sized based on the size of the content. Rather than us provide some hard coded value for the image size, it seemed better to let the Image element determine its own size. The way that an Image element determines its preferred size is to use the Size of the ImageSource it is representing.
In your case the large image that you see is that way because that is the Size of your ImageSource. So the other way to deal with it is to constrain the size of the ImageSource you are providing. If you were using a BitmapImage then the ImageSize would base its size on the pixel width/height of the image itself. If this is a DrawingImage you are using then it determines its size based on the bounds of the Drawing.
Yes, well, I was hoping there was a better way than copying the whole templates (the stretched image problem persists with more than one pane location)...
You would need to take our default templates/styles (which are included in the DefaultStyles directory) and set a Width and/or Height on the Image element (the template may be using AutoDisabledImage which is a custom derived Image element of ours that provides some support for rendering a disabled looking version of the element). Since this is about the tab item you would look at the PaneTabItem control templates.
Could you please post the XAML required for setting the image width/height?
Troy,
From what I can see from the default templates, the image is not restricted in respect of width and height, as well as its Stretch property is none. This means, that it will be allowed to take as much space as it wants.
If you are setting this in procedural code, you can give it width and height. If you are setting this at the Image property in xaml, you can use (copy) the default xaml files (that we ship in the DefaultStyles directory) and set widht/height properties of the image element.
You should be looking for the UnpinnedTabItemTemplateKey in the DockManagerGeneric.xaml file.