Click here to Skip to main content
15,895,557 members
Home / Discussions / WPF
   

WPF

 
QuestionWPF Designer fails loading assembly Pin
vbnetter28-Jul-09 7:43
vbnetter28-Jul-09 7:43 
AnswerRe: WPF Designer fails loading assembly Pin
Christian Graus28-Jul-09 11:14
protectorChristian Graus28-Jul-09 11:14 
GeneralRe: WPF Designer fails loading assembly Pin
vbnetter29-Jul-09 3:43
vbnetter29-Jul-09 3:43 
QuestionEmbed excel workbook inside WPF Pin
maesi198028-Jul-09 3:38
maesi198028-Jul-09 3:38 
AnswerRe: Embed excel workbook inside WPF Pin
Christian Graus28-Jul-09 22:25
protectorChristian Graus28-Jul-09 22:25 
QuestionImage Stretch programatically in WPF. [modified] Pin
Krishna Aditya28-Jul-09 1:11
Krishna Aditya28-Jul-09 1:11 
AnswerRe: Image Stretch programatically in WPF. Pin
Super Lloyd28-Jul-09 2:46
Super Lloyd28-Jul-09 2:46 
AnswerRe: Image Stretch programatically in WPF. Pin
Mark Salsbery28-Jul-09 6:21
Mark Salsbery28-Jul-09 6:21 
Your XAML doesn't match your description (e.g. images on the left and right ends of a vertical stackpanel??).

Items in Stackpanels are sized by the item, not the stackpanel size,
so you'd need to specify width and/or height of the stackpanel's children
to get the layout you want using a stackpanel. Something like:
<StackPanel Name="stkpnlHeader" Width="1254.662" Height="Auto" >
    <StackPanel Name="imgStkPnl" Orientation="Horizontal" Width="1253.511" >
        <Image Name="imgClientPhoto" Source="D:\ehtmp_top_left.gif" Stretch="Fill" Width="1030" Height="66" />
        <Image Name="imgExtraImg" Source="D:\ehtmp_top_right.gif" Width="1" Height="66" />
    </StackPanel>
</StackPanel>

The drawback to this approach is that the dimensions are hardwired to
specific values, making changes problematic. To get around that, you
could use a more appropriate layout element. For example, a grid:
<StackPanel Name="stkpnlHeader" Width="1254.662" Height="auto" >
    <Grid Name="imgGrid" >
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="Auto" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="66" />
        </Grid.RowDefinitions>
        <Image Name="imgClientPhoto" Grid.Column="0" Source="D:\ehtmp_top_left.gif" Stretch="Fill" />
        <Image Name="imgExtraImg" Grid.Column="1" Source="D:\ehtmp_top_right.gif" />
    </Grid>
</StackPanel>

Note the difference - grids lay out children, stack panels are laid out by
their children.

Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

GeneralRe: Image Stretch programatically in WPF. Pin
Krishna Aditya28-Jul-09 20:16
Krishna Aditya28-Jul-09 20:16 
QuestionAuto apply application-level resource-dictionary theme to all controls in program? Pin
FocusedWolf27-Jul-09 20:10
FocusedWolf27-Jul-09 20:10 
AnswerRe: Auto apply application-level resource-dictionary theme to all controls in program? Pin
Pete O'Hanlon27-Jul-09 22:23
mvePete O'Hanlon27-Jul-09 22:23 
GeneralRe: Auto apply application-level resource-dictionary theme to all controls in program? Pin
FocusedWolf28-Jul-09 5:52
FocusedWolf28-Jul-09 5:52 
Questionwpf Pin
bhavna432127-Jul-09 18:26
bhavna432127-Jul-09 18:26 
AnswerRe: wpf Pin
Pete O'Hanlon27-Jul-09 20:09
mvePete O'Hanlon27-Jul-09 20:09 
AnswerRe: wpf Pin
#realJSOP27-Jul-09 23:49
mve#realJSOP27-Jul-09 23:49 
QuestionPrism, XAP and dynamic loading Pin
User 527145427-Jul-09 8:01
User 527145427-Jul-09 8:01 
AnswerRe: Prism, XAP and dynamic loading Pin
Michael Sync28-Jul-09 4:45
Michael Sync28-Jul-09 4:45 
QuestionHow to draw RichTextBox with mouse? Pin
Farrukhw27-Jul-09 1:13
Farrukhw27-Jul-09 1:13 
AnswerRe: How to draw RichTextBox with mouse? Pin
Christian Graus28-Jul-09 0:10
protectorChristian Graus28-Jul-09 0:10 
GeneralRe: How to draw RichTextBox with mouse? Pin
Farrukhw28-Jul-09 0:22
Farrukhw28-Jul-09 0:22 
GeneralRe: How to draw RichTextBox with mouse? Pin
Christian Graus28-Jul-09 19:27
protectorChristian Graus28-Jul-09 19:27 
QuestionImage loading Pin
#realJSOP26-Jul-09 23:58
mve#realJSOP26-Jul-09 23:58 
AnswerRe: Image loading Pin
Pete O'Hanlon27-Jul-09 2:01
mvePete O'Hanlon27-Jul-09 2:01 
GeneralRe: Image loading Pin
#realJSOP27-Jul-09 23:49
mve#realJSOP27-Jul-09 23:49 
GeneralRe: Image loading Pin
Christian Graus28-Jul-09 0:01
protectorChristian Graus28-Jul-09 0:01 

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.