Click here to Skip to main content
15,868,016 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,
I have created a silver light application. My question is silver control is not expanding with respect to the screen resolution. I have tried to set the width and height dynamically. but it is not working. Please help.


Silverlight Code
XML
<UserControl x:Class="ContactInfo.App.SearchContact"
    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="670" d:DesignWidth="1200" xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls" xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data" >

 <Grid x:Name="gdEdit">
            <Grid.RowDefinitions>
                <RowDefinition Height="45"></RowDefinition>
                <RowDefinition Height="30"></RowDefinition>
                <RowDefinition Height="Auto"></RowDefinition>
                <RowDefinition Height="50*" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <!--<6 Columns>-->
                <ColumnDefinition Width="100"></ColumnDefinition>
                <ColumnDefinition Width="180"></ColumnDefinition>
                <ColumnDefinition Width="150"></ColumnDefinition>
                <ColumnDefinition Width="150"></ColumnDefinition>
                <ColumnDefinition Width="100"></ColumnDefinition>
                <ColumnDefinition Width="100"></ColumnDefinition>
                <ColumnDefinition Width="*"></ColumnDefinition>
            </Grid.ColumnDefinitions>

          .......


ASP.NET
ASPX Code
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <br />
            <div align="left">
                <asp:Silverlight ID="slSearchContact" runat="server" Source="~/ClientBin/ContactInfo.App.xap"
                    BackColor="ActiveBorder" MinimumVersion="3.0.0.0" Width="100%" Height="650px">
                </asp:Silverlight>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel> 
Posted
Updated 29-Oct-13 22:56pm
v3

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

  Print Answers RSS


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