-
May 26th, 2010, 05:33 AM
#1
Thread Starter
Junior Member
wpf layout
Hi,
I'm new in WPF and I need to do a Showroom. My question is how can I divide de structure of the form, like <div> in HTML, so that when the contents change only that part is changed and later give some slide effect or whatever...
Thanks
-
May 26th, 2010, 06:56 AM
#2
Re: wpf layout
If you want to have just one part of the window run in its own container then you can use a Frame control.
-
May 26th, 2010, 07:43 AM
#3
Thread Starter
Junior Member
Re: wpf layout
ok but the idea is like if you have a car showroom you need to choose de brand of the car, next the model and then the car appears.
I've already begin the showroom it's not a car showroom but the idea is the same. I did a grid with 3 rows and I'm working in the second row.
on the load event I've 2 buttons you chose one of them and on the click event of this button I put the visibility of those buttons to hidden to show what I want. what do you think about that? it's bad or I can do this by this way ?
I'm sorry about my English...
-
May 26th, 2010, 02:14 PM
#4
Lively Member
Re: wpf layout
u can just put a grid or a stackpanel or whatever type of container inside of the outer grid that would fill up your whole window.
so something similar to this logic here
Code:
<Window>
<Grid Name="OuterGrid">
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<Grid Name="ContentGrid" Grid.Row="1">
<!--Put all the showroom stuff that you want changed in here-->
</Grid>
</Grid>
</Window>
-
May 27th, 2010, 04:28 AM
#5
Thread Starter
Junior Member
Re: wpf layout
nice, thanks a lot.
I've another question.
in windows1_loaded (etc)...
I've a button created by code called Botaocat. Now I need to get the click event of this button, how can i do this =
-
May 27th, 2010, 08:10 AM
#6
Lively Member
Re: wpf layout
by get the click event u mean you need to add a click event? add this to window_loaded event then you just need to create the Sub for MyButton_Click
Code:
AddHandler MyButton.Click, AddressOf MyButton_Click
-
May 27th, 2010, 08:28 AM
#7
Thread Starter
Junior Member
Re: wpf layout
yes it's works but now I need to put the botaocat.visibiliti to false...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|