Stackpanel visibility problem??
-
Hi, Im using WPF for designing the form.im having a dockpanel in the dockpanel i have splited into two regions by using the following code <Border Height="50" x:Uid="Left" CornerRadius="0,0,40,40" Background="#81a4d1" BorderBrush="#4D6C82" BorderThickness="1" DockPanel.Dock="left"> </Border> <Border Width="200" x:Uid="Right" Background="#b2ccec" BorderBrush="#4D6C82" BorderThickness="1" DockPanel.Dock="right"> </Border> Then im having two buttons namely Client and Product in the left border and im having two stack panel with some controls related to client and product.now if im clicking client button means the client information related stackpanel should be visible and if i click product button means the product related stackpanel should be visible, how can i achieve this? i have tried the below code but its getting hidden but the alternate panel is not getting visible.. private void BtnClient_Click(object sender, RoutedEventArgs e) { StkClient.Visibility = Visibility.Visible; StkProduct.Visibility = Visibility.Hidden; } private void BtnProduct_Click(object sender, RoutedEventArgs e) { StkProduct.Visibility = Visibility.Visible; StkClient.Visibility = Visibility.Hidden; } Rgrds Kanna