views:

320

answers:

1

Hi,

I am doing an Windows Application using XAML ,WPF in C#.

I have 2 radio buttons called "WriteData" and "ReadData".

when writeData is selected, I need groupbox with a textbox and browse button inside it to be displayed at a particular location, (this i have already designed in UI..)

<GroupBox Header="Browse Data" Name="grpBrowseData" Height="78" VerticalAlignment="Top" HorizontalAlignment="Left" Width="1030">
<Grid Name="grdBrowse" Height="60" Width="1030">


<Button x:Name="btnBrowseButton" Margin="0,7.5,45,20" Content="Browse" Click="BrowseButton_Click" HorizontalAlignment="Right" Width="111" />

<TextBox x:Name="txtBxBrowseTB" Margin="46,13.993,185,17.5" Text="TextBox" TextWrapping="Wrap" TextChanged="BrowseTB_TextChanged" ></TextBox>
<Label HorizontalAlignment="Left" Margin="-1.25,8.75,0,15" Name="label1" Width="47.5" FontSize="13" VerticalContentAlignment="Center" HorizontalContentAlignment="Center">Path:</Label>

Now, if I select "ReadData" radio button, a combo box should be visible in the SAME LOCATION where the above groupbox is displayed, the xaml code for this

<GroupBox Header="Select the Project" Name="grpSelectProject" Height="78" VerticalAlignment="Top" HorizontalAlignment="Left" Width="1030" Visibility="Visible" Margin="-1030,0,0,0">

<Grid Name="grdSelectProject" Height="60" Width="1030">

<Label HorizontalAlignment="Left" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Margin="0,11.662,0,20.825" Width="95.103">Select the Project</Label>


<ComboBox Margin="119.952,13.994,493.969,16.66"></ComboBox>


</Grid></GroupBox>

so, how do I make only one visible as per the radio button selected.

In the ReadData_click event i tried to make other groupbox invisble. but I wasnt able to do that. please help me.

Thanks

Ramm

A: 

Hi Guys,

I solved this. I was able to display the fields as required.

Thanks Ramm

Aditya