Click here to Skip to main content
15,891,012 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Disable the Maximize button in WPF Pin
Mark Salsbery3-Oct-09 12:01
Mark Salsbery3-Oct-09 12:01 
GeneralRe: Disable the Maximize button in WPF Pin
Christian Graus3-Oct-09 12:25
protectorChristian Graus3-Oct-09 12:25 
AnswerRe: Disable the Maximize button in WPF Pin
priyagee14-Oct-09 3:11
priyagee14-Oct-09 3:11 
AnswerRe: Disable the Maximize button in WPF Pin
Thrash50519-Apr-10 9:07
Thrash50519-Apr-10 9:07 
QuestionHow do I insure that WPF uses ICC profiles to avoid color degradation? [modified] Pin
fjparisIII2-Oct-09 12:53
fjparisIII2-Oct-09 12:53 
AnswerRe: How do I insure that WPF uses ICC profiles to avoid color degradation? Pin
Pete O'Hanlon4-Oct-09 11:23
mvePete O'Hanlon4-Oct-09 11:23 
GeneralRe: How do I insure that WPF uses ICC profiles to avoid color degradation? Pin
fjparisIII5-Oct-09 5:03
fjparisIII5-Oct-09 5:03 
QuestionDynamic Controls not Stretching to Container Width Pin
Jeremy Likness2-Oct-09 11:54
professionalJeremy Likness2-Oct-09 11: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 10:46
Mark Salsbery3-Oct-09 10:46 
GeneralRe: Dynamic Controls not Stretching to Container Width Pin
Jeremy Likness3-Oct-09 14:23
professionalJeremy Likness3-Oct-09 14:23 
QuestionCustom Binding Path Pin
Fabrizio Camagna2-Oct-09 7:56
Fabrizio Camagna2-Oct-09 7:56 
QuestionRe: Custom Binding Path Pin
Mark Salsbery2-Oct-09 9:58
Mark Salsbery2-Oct-09 9:58 
AnswerRe: Custom Binding Path Pin
Fabrizio Camagna2-Oct-09 21:40
Fabrizio Camagna2-Oct-09 21:40 
GeneralRe: Custom Binding Path Pin
Mark Salsbery3-Oct-09 10:41
Mark Salsbery3-Oct-09 10:41 
QuestionSaving data to a form Pin
woofie1-Oct-09 18:32
woofie1-Oct-09 18:32 
AnswerRe: Saving data to a form Pin
Christian Graus1-Oct-09 20:33
protectorChristian Graus1-Oct-09 20:33 
QuestionHttpContext Pin
cdpace30-Sep-09 20:57
cdpace30-Sep-09 20:57 
AnswerRe: HttpContext Pin
Pete O'Hanlon30-Sep-09 23:39
mvePete O'Hanlon30-Sep-09 23:39 
Question[Message Deleted] Pin
priyagee30-Sep-09 19:48
priyagee30-Sep-09 19:48 
AnswerRe: To open microsoft word document in ribbontoolbar button in wpf Pin
Christian Graus1-Oct-09 12:40
protectorChristian Graus1-Oct-09 12:40 
AnswerRe: To open microsoft word document in ribbontoolbar button in wpf Pin
MSOffice Canada2-Oct-09 3:22
MSOffice Canada2-Oct-09 3:22 
NewsFree Silverlight Training Videos Pin
brucedkyle30-Sep-09 11:20
brucedkyle30-Sep-09 11:20 
GeneralRe: Free Silverlight Training Videos Pin
Richard MacCutchan30-Sep-09 12:38
mveRichard MacCutchan30-Sep-09 12:38 
GeneralRe: Free Silverlight Training Videos Pin
Pete O'Hanlon5-Oct-09 0:56
mvePete O'Hanlon5-Oct-09 0:56 
QuestionSilverlight Accordian control Pin
dhananjayamurthy30-Sep-09 3:23
dhananjayamurthy30-Sep-09 3:23 

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.