Click here to Skip to main content
12,754,175 members (27,255 online)

Silverlight / WPF

 
GeneralRe: Disable the Maximize button in WPF Pin
Mark Salsbery3-Oct-09 13:01
mvpMark Salsbery3-Oct-09 13:01 
GeneralRe: Disable the Maximize button in WPF Pin
Christian Graus3-Oct-09 13:25
mvpChristian Graus3-Oct-09 13:25 
AnswerRe: Disable the Maximize button in WPF Pin
priyagee14-Oct-09 4:11
memberpriyagee14-Oct-09 4:11 
AnswerRe: Disable the Maximize button in WPF Pin
Thrash50519-Apr-10 10:07
memberThrash50519-Apr-10 10:07 
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 
QuestionSaving data to a form Pin
woofie1-Oct-09 19:32
memberwoofie1-Oct-09 19:32 
AnswerRe: Saving data to a form Pin
Christian Graus1-Oct-09 21:33
mvpChristian Graus1-Oct-09 21:33 
QuestionHttpContext Pin
cdpace30-Sep-09 21:57
membercdpace30-Sep-09 21:57 
AnswerRe: HttpContext Pin
Pete O'Hanlon1-Oct-09 0:39
mvpPete O'Hanlon1-Oct-09 0:39 
Question[Message Deleted] Pin
priyagee30-Sep-09 20:48
memberpriyagee30-Sep-09 20:48 
AnswerRe: To open microsoft word document in ribbontoolbar button in wpf Pin
Christian Graus1-Oct-09 13:40
mvpChristian Graus1-Oct-09 13:40 
AnswerRe: To open microsoft word document in ribbontoolbar button in wpf Pin
MSOffice Canada2-Oct-09 4:22
memberMSOffice Canada2-Oct-09 4:22 
NewsFree Silverlight Training Videos Pin
brucedkyle30-Sep-09 12:20
memberbrucedkyle30-Sep-09 12:20 
GeneralRe: Free Silverlight Training Videos Pin
Richard MacCutchan30-Sep-09 13:38
memberRichard MacCutchan30-Sep-09 13:38 
GeneralRe: Free Silverlight Training Videos Pin
Pete O'Hanlon5-Oct-09 1:56
mvpPete O'Hanlon5-Oct-09 1:56 
QuestionSilverlight Accordian control Pin
dhananjayamurthy30-Sep-09 4:23
memberdhananjayamurthy30-Sep-09 4: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.


Advertise | Privacy | Mobile
Web02 | 2.8.170217.1 | Last Updated 17 Feb 2017
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid