Click here to Skip to main content
15,914,419 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: Get Info Pin
Mycroft Holmes8-Oct-15 20:26
professionalMycroft Holmes8-Oct-15 20:26 
Questionsetting image in nested menu Pin
HailStorm26-Oct-15 4:05
HailStorm26-Oct-15 4:05 
AnswerRe: setting image in nested menu Pin
Pete O'Hanlon6-Oct-15 4:30
mvePete O'Hanlon6-Oct-15 4:30 
GeneralRe: setting image in nested menu Pin
HailStorm26-Oct-15 19:26
HailStorm26-Oct-15 19:26 
GeneralRe: setting image in nested menu Pin
Pete O'Hanlon6-Oct-15 21:01
mvePete O'Hanlon6-Oct-15 21:01 
AnswerRe: setting image in nested menu Pin
Richard Deeming6-Oct-15 5:16
mveRichard Deeming6-Oct-15 5:16 
QuestionAvalon 2.0 with MVVM and 2 anchorable panes Pin
marc borgers1-Oct-15 7:10
marc borgers1-Oct-15 7:10 
QuestionNeed Some Help With This Design Pin
Kevin Marois22-Sep-15 5:42
professionalKevin Marois22-Sep-15 5:42 
SuggestionRe: Need Some Help With This Design Pin
Richard Deeming22-Sep-15 6:10
mveRichard Deeming22-Sep-15 6:10 
GeneralRe: Need Some Help With This Design Pin
Kevin Marois22-Sep-15 6:32
professionalKevin Marois22-Sep-15 6:32 
QuestionStopping resizing of usercontrol and grid cell visibility Pin
Saurabh18cs22-Sep-15 0:43
Saurabh18cs22-Sep-15 0:43 
AnswerRe: Stopping resizing of usercontrol and grid cell visibility Pin
Gerry Schmitz23-Sep-15 8:21
mveGerry Schmitz23-Sep-15 8:21 
GeneralRe: Stopping resizing of usercontrol and grid cell visibility Pin
Saurabh18cs23-Sep-15 16:28
Saurabh18cs23-Sep-15 16:28 
GeneralRe: Stopping resizing of usercontrol and grid cell visibility Pin
Gerry Schmitz24-Sep-15 6:56
mveGerry Schmitz24-Sep-15 6:56 
GeneralRe: Stopping resizing of usercontrol and grid cell visibility Pin
Saurabh18cs24-Sep-15 21:47
Saurabh18cs24-Sep-15 21:47 
GeneralRe: Stopping resizing of usercontrol and grid cell visibility Pin
Gerry Schmitz24-Sep-15 22:54
mveGerry Schmitz24-Sep-15 22:54 
SuggestionRe: Stopping resizing of usercontrol and grid cell visibility Pin
J. Calhoun24-Sep-15 7:45
J. Calhoun24-Sep-15 7:45 
GeneralRe: Stopping resizing of usercontrol and grid cell visibility Pin
Saurabh18cs24-Sep-15 21:50
Saurabh18cs24-Sep-15 21:50 
GeneralRe: Stopping resizing of usercontrol and grid cell visibility Pin
J. Calhoun25-Sep-15 2:14
J. Calhoun25-Sep-15 2:14 
GeneralRe: Stopping resizing of usercontrol and grid cell visibility Pin
Saurabh18cs25-Sep-15 20:06
Saurabh18cs25-Sep-15 20:06 
GeneralRe: Stopping resizing of usercontrol and grid cell visibility Pin
J. Calhoun28-Sep-15 3:06
J. Calhoun28-Sep-15 3:06 
GeneralRe: Stopping resizing of usercontrol and grid cell visibility Pin
Saurabh18cs29-Sep-15 0:13
Saurabh18cs29-Sep-15 0:13 
GeneralRe: Stopping resizing of usercontrol and grid cell visibility Pin
J. Calhoun29-Sep-15 3:38
J. Calhoun29-Sep-15 3:38 
Thank you, this did help me to get a visual of what you are trying to accomplish. I still have one question and that is, the only buttons that you want to change the visibility on are the 8 buttons in the middle of your control correct? Under that assumption I have come up with a solution that I believe meets your requirements.

I made a User Control with the design height at 500 and the design width at 300 which allowed me to fit all your controls in the window and keep the same arrangement scheme that you provided.

Next, I created 3 rows and seperated your controls into the 3 Sections. The top controls will go in the first StackPanel like this:

HTML
<Grid>
    <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
    </Grid.RowDefinitions>
    <StackPanel>
        <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center" Grid.Row="0">
            <Label Content="Site No.:" HorizontalAlignment="Left" VerticalAlignment="Center"/>
            <TextBox Width="150" Margin="5,5,0,5" HorizontalAlignment="Left" VerticalAlignment="Center"/>
            <Button Margin="1" Content="YourImage"/>
        </StackPanel>
        <Label Content="Commands" HorizontalAlinment="Left" VerticalAlignment="Center"/>
    </StackPanel>


The WrapPanel is where I host your 8 buttons, and the StackPanels will host your other controls.

HTML
<WrapPanel Orientation="Horizontal" Grid.Row="1">
        <Button Height="50" Width="100" HorizontalAlignment="Left" VerticalAlignment="Center">
            <TextBlock TextWrapping="Wrap" TextAlignment="Center">
            New Site
            </TextBlock>
        </Button>
        <Button Height="50" Width="100" HorizontalAlignment="Left" VerticalAlignment="Center">
            <TextBlock TextWrapping="Wrap" TextAlignment="Center">
                Modify Site
            </TextBlock>
        </Button>
        <Button Height="50" Width="100" HorizontalAlignment="Left" VerticalAlignment="Center">
            <TextBlock TextWrapping="Wrap" TextAlignment="Center">
            Save To Draft
            </TextBlock>
        </Button>
        <Button Height="50" Width="100" HorizontalAlignment="Left" VerticalAlignment="Center">
            <TextBlock TextWrapping="Wrap" TextAlignment="Center">
            Lowest Height Control
            </TextBlock>
        </Button>
        <Button Height="50" Width="100" HorizontalAlignment="Left" VerticalAlignment="Center">
            <TextBlock TextWrapping="Wrap" TextAlignment="Center">
            QC Report
            </TextBlock>
        </Button>
        <Button Height="50" Width="100" HorizontalAlignment="Left" VerticalAlignment="Center">
            <TextBlock TextWrapping="Wrap" TextAlignment="Center">
            Send for QC
            </TextBlock>
        </Button>
        <Button Height="50" Width="100" HorizontalAlignment="Left" VerticalAlignment="Center">
            <TextBlock TextWrapping="Wrap" TextAlignment="Center">
            Maintain Scheme Checklist
            </TextBlock>
        </Button>
        <Button Height="50" Width="100" HorizontalAlignment="Left" VerticalAlignment="Center">
            <TextBlock TextWrapping="Wrap" TextAlignment="Center">
            Configure Storey Heights
            </TextBlock>
        </Button>

This WrapPanel will cause your controls to take up the space that the collapsed button used to occupy and will move up rows if there is enough space on the row above it. The width of the WrapPanel will determine how many buttons per row as the buttons will fill in horizontally before moving down to the next row, this is possibly the reason for the vertical alignment you previously mentioned.
And Finally You can put your Last Section in another StackPanel:
HTML
    <StackPanel Grid.Row="2" HorizontalAlignment="Stretch">
        <Label Content"My Drafts:" HorizontalAlignment="Left" VerticalAlignment="Center"/>
        <Listbox Height="200" Width="250" Background="Azure" Margin="3"/>
        <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
            <Button Content="Load" Width="75" Margin="0,0,10,0"/>
            <Button Content="Reassign" Width="75" Margin="0,0,10,0"/>
            <Button Content="Delete" Width="75" Margin="0,0,10,0"/>
        </StackPanel>
    </StackPanel>
</Grid>


I hope this meets your requirements! If you have any other questions I will be happy to help!
GeneralRe: Stopping resizing of usercontrol and grid cell visibility Pin
Saurabh18cs29-Sep-15 17:28
Saurabh18cs29-Sep-15 17:28 
GeneralRe: Stopping resizing of usercontrol and grid cell visibility Pin
J. Calhoun30-Sep-15 3:11
J. Calhoun30-Sep-15 3:11 

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.