Click here to Skip to main content
15,885,309 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

i have made a simple application in silverlight4 which includes one label and a textbox , button. when i press a button the text from the textbox should be displayed in label.

i have installed silverlight sdk and silverlight plugins for browser but when i run the aaplication each time it ask for the silverlight developer runtime even i have installed it already. May i know why is it so? am i missing anything to install?

here is the app code...

XML
<UserControl x:Class="First_App.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">

    <Grid x:Name="LayoutRoot" Background="White" ShowGridLines="True">
        <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>

        </Grid.RowDefinitions>
        <TextBlock Name="txtname" Height="25" Width="75" HorizontalAlignment="Center"></TextBlock>
        <TextBox Name="txtbxname" Height="35" Width="90" HorizontalAlignment="Center" Margin="15" Grid.Row="2"></TextBox>
        <Button Name="mybtn" Content="ClickMe" Grid.Row="3" Width="55" Height="35" Click="mybtn_Click"></Button>
    </Grid>
</UserControl>


and in .cs file:

C#
public partial class MainPage : UserControl
   {
       public MainPage()
       {
           InitializeComponent();
       }

       private void mybtn_Click(object sender, RoutedEventArgs e)
       {
           txtname.Text = txtbxname.Text;

       }
   }



Can anybody help me please???

thanks in advance.....
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900