Click here to Skip to main content
13,868,387 members

Silverlight / WPF

 
PinnedHOW TO ANSWER A QUESTION PinPopular
Chris Maunder16-Jul-09 4:09
adminChris Maunder16-Jul-09 4:09 
PinnedHow to get an answer to your question PinPopular
Chris Maunder16-Jul-09 4:05
adminChris Maunder16-Jul-09 4:05 
QuestionHow to solve erroneous designer intellisense error report Pin
Super Lloyd26-Jan-19 20:29
memberSuper Lloyd26-Jan-19 20:29 
AnswerRe: How to solve erroneous designer intellisense error report Pin
Gerry Schmitz28-Jan-19 9:24
mveGerry Schmitz28-Jan-19 9:24 
GeneralRe: How to solve erroneous designer intellisense error report Pin
Super Lloyd28-Jan-19 15:42
memberSuper Lloyd28-Jan-19 15:42 
QuestionHave two controls fill the MainWindow and resize automatically Pin
Mc_Topaz16-Jan-19 5:14
memberMc_Topaz16-Jan-19 5:14 
AnswerRe: Have two controls fill the MainWindow and resize automatically Pin
Richard Deeming16-Jan-19 9:07
mveRichard Deeming16-Jan-19 9:07 
The columns in a UniformGrid will always be the same width. Since you have four columns, each column will be ¼ of the width of the window. The controls with a defined width are aligned in the centre of the column, which is why you're getting white-space around them.

The obvious option would be to use a standard Grid. This would require adding column definitions, and setting the Grid.Column attached property on each child control.
<Grid>
    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="*" />
        <ColumnDefinition Width="Auto" />
        <ColumnDefinition Width="*" />
        <ColumnDefinition Width="Auto" />
    </Grid.ColumnDefinitions>
    
    <Rectangle Fill="Blue" Grid.Column="0" />
    <Rectangle Fill="Lime" Width="20" Grid.Column="1" />
    <Rectangle Fill="Red" Grid.Column="2" />
    <Rectangle Fill="Yellow" Width="20" Grid.Column="3" />
</Grid>

Another alternative would be to combine the UniformGrid with a DockPanel:
<UniformGrid Columns="2">
    <DockPanel>
        <Rectangle Fill="Lime" Width="20" DockPanel.Dock="Right" />
        <Rectangle Fill="Blue" />
    </DockPanel>
    <DockPanel>
        <Rectangle Fill="Yellow" Width="20" DockPanel.Dock="Right" />
        <Rectangle Fill="Red" />
    </DockPanel>
</UniformGrid>




"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer

GeneralRe: Have two controls fill the MainWindow and resize automatically Pin
Mc_Topaz16-Jan-19 20:22
memberMc_Topaz16-Jan-19 20:22 
QuestionHyperlink Context Menu Pin
Kevin Marois9-Jan-19 16:30
professionalKevin Marois9-Jan-19 16:30 
AnswerRe: Hyperlink Context Menu Pin
Richard Deeming10-Jan-19 1:32
mveRichard Deeming10-Jan-19 1:32 
GeneralRe: Hyperlink Context Menu Pin
Kevin Marois10-Jan-19 5:32
professionalKevin Marois10-Jan-19 5:32 
GeneralRe: Hyperlink Context Menu Pin
Kevin Marois10-Jan-19 6:31
professionalKevin Marois10-Jan-19 6:31 
QuestionTreeView Item Show Button Using Trigger Pin
Kevin Marois1-Jan-19 12:41
professionalKevin Marois1-Jan-19 12:41 
AnswerRe: TreeView Item Show Button Using Trigger Pin
Gerry Schmitz5-Jan-19 8:22
mveGerry Schmitz5-Jan-19 8:22 
GeneralRe: TreeView Item Show Button Using Trigger Pin
Kevin Marois7-Jan-19 8:31
professionalKevin Marois7-Jan-19 8:31 
GeneralRe: TreeView Item Show Button Using Trigger Pin
Gerry Schmitz7-Jan-19 9:39
mveGerry Schmitz7-Jan-19 9:39 
GeneralRe: TreeView Item Show Button Using Trigger Pin
Kevin Marois7-Jan-19 10:18
professionalKevin Marois7-Jan-19 10:18 
GeneralRe: TreeView Item Show Button Using Trigger Pin
J. Calhoun14-Feb-19 5:37
memberJ. Calhoun14-Feb-19 5:37 
QuestionWPF Items Source get the visible items Pin
Paul M Gibson31-Dec-18 8:00
memberPaul M Gibson31-Dec-18 8:00 
AnswerRe: WPF Items Source get the visible items Pin
Gerry Schmitz1-Jan-19 7:42
mveGerry Schmitz1-Jan-19 7:42 
GeneralRe: WPF Items Source get the visible items Pin
Paul M Gibson2-Jan-19 7:22
memberPaul M Gibson2-Jan-19 7:22 
QuestionAd Control / monetization Pin
Super Lloyd18-Dec-18 14:02
memberSuper Lloyd18-Dec-18 14:02 
AnswerRe: Ad Control / monetization Pin
Pete O'Hanlon18-Dec-18 23:17
protectorPete O'Hanlon18-Dec-18 23:17 
GeneralRe: Ad Control / monetization Pin
Super Lloyd19-Dec-18 16:40
memberSuper Lloyd19-Dec-18 16:40 
AnswerRe: Ad Control / monetization Pin
Gerry Schmitz23-Dec-18 10:02
mveGerry Schmitz23-Dec-18 10:02 

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 | Cookies | Terms of Service
Web03 | 2.8.190214.1 | Last Updated 14 Feb 2019
Copyright © CodeProject, 1999-2019
All Rights Reserved.
Layout: fixed | fluid