Click here to Skip to main content
12,242,156 members (46,518 online)

Silverlight / WPF

 
QuestionHow do I insure that WPF uses ICC profiles to avoid color degradation? [modified] Pin
fjparisIII2-Oct-09 13:53
memberfjparisIII2-Oct-09 13:53 
AnswerRe: How do I insure that WPF uses ICC profiles to avoid color degradation? Pin
Pete O'Hanlon4-Oct-09 12:23
mvpPete O'Hanlon4-Oct-09 12:23 
GeneralRe: How do I insure that WPF uses ICC profiles to avoid color degradation? Pin
fjparisIII5-Oct-09 6:03
memberfjparisIII5-Oct-09 6:03 
QuestionDynamic Controls not Stretching to Container Width Pin
Jeremy Likness2-Oct-09 12:54
memberJeremy Likness2-Oct-09 12:54 
Imagine an ItemsControl that is a fixed width. Each item is a grid with a fixed width as well.

Let's say each grid item is 200 pixels wide, so when generated in the items control it's like:

Name: Value
Name: Value
Name: Value

Value is dynamically rendered. I host it inside a content control, like this:

<ContentControl Content="{Binding Converter={ControlConverter}}" HorizontalAlignment="Stretch"/>


Inside the converter, I might return a TextBox, a PasswordBox, a CheckBox, etc.

The problem I'm having is that I am setting the width of these like so:

return new TextBox() { HorizontalAlignment=HorizontalAlignment.Stretch };


Of course I'm setting other properties but you get the gist.

Unfortunately, the resulting controls are sizing themselves to the content, not the container.

The stretch basically isn't working the same as if I have a actual TextBox in place of the content control.

Anyone have an idea of why the stretch isn't working? Should I wire into some event and rebind the size somehow or make it dependent on the parent control (perhaps pass the parent as a parameter?)

Thanks,

Jeremy


AnswerRe: Dynamic Controls not Stretching to Container Width Pin
Mark Salsbery3-Oct-09 11:46
mvpMark Salsbery3-Oct-09 11:46 
GeneralRe: Dynamic Controls not Stretching to Container Width Pin
Jeremy Likness3-Oct-09 15:23
memberJeremy Likness3-Oct-09 15:23 
QuestionCustom Binding Path Pin
Fabrizio Camagna2-Oct-09 8:56
memberFabrizio Camagna2-Oct-09 8:56 
QuestionRe: Custom Binding Path Pin
Mark Salsbery2-Oct-09 10:58
mvpMark Salsbery2-Oct-09 10:58 
AnswerRe: Custom Binding Path Pin
Fabrizio Camagna2-Oct-09 22:40
memberFabrizio Camagna2-Oct-09 22:40 
GeneralRe: Custom Binding Path Pin
Mark Salsbery3-Oct-09 11:41
mvpMark Salsbery3-Oct-09 11:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web02 | 2.8.160426.1 | Last Updated 29 Apr 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid