Silverlight / WPF - Master page concept in silverlight . pagecontainer height problem ?

Asked By Ramesh Nalla
03-Feb-12 06:53 AM
Hi All,


Greetings to everyone..

Hope you are all doing good...  !

I have a small problem with implementation of master page concept in silverlight everything is fine but iam unable to view the pagecontainer content correctly.

please find the image for reference.


in the above image page container height is not increasing how to do this..?

Any help is really apriciated.!


Thanks,
Ramesh N
  D Company replied to Ramesh Nalla
03-Feb-12 07:52 AM
Hello Friend.

the best way to do this is fix the size of the Div container that contains Silverlight control tag. and that size should be approx to page size

Regards
D
  Ahi I replied to Ramesh Nalla
03-Feb-12 08:02 AM
U have two div know... here which one is container div....

  Ramesh Nalla replied to D Company
04-Feb-12 04:06 AM
Hi Friend,

Thanks for your reply,,

here is my code:

Home.aspx

<

html xmlns="http://www.w3.org/1999/xhtml">

<

head runat="server">

<title></title>

</head>

<

body>

<form id="form1" runat="server">

<div>

 

 

<div>

<%-- <asp:Silverlight InitParameters="PageName=Home" ID="abc" runat="server" Source="~/ClientBin/EWS.xap" MinimumVersion="2.0.30923.0" Width="100%" Height="100%" />--%>

 

 

<div id="silverlightControlHost" >

<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">

<%--<param name="InitParameters" value="PageName=Home" />--%>

<param name="InitParams" value="PageID=Home" />;

<param name="source" value="ClientBin/EWS.xap"/>

<param name="onError" value="onSilverlightError" />

<param name="background" value="white" />

<param name="minRuntimeVersion" value="3.0.40818.0" />

<param name="autoUpgrade" value="true" />

<a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=3.0.40818.0" style="text-decoration:none">

<img src="http://go.microsoft.com/fwlink/?LinkId=161376" alt="Get Microsoft Silverlight" style="border-style:none"/>

</a>

</object><iframe id="_sl_historyFrame" style="visibility:hidden;height:0px;width:0px;border:0px"></iframe></div>

</div>

</div>

</form>

</

body>

</

html>



Home.xaml

<

Grid Height="567" Name="grid1" Width="1117">

 

<Grid.ColumnDefinitions>

 

<ColumnDefinition Width="227*" />

 

 

</Grid.ColumnDefinitions>

 

<Grid.RowDefinitions>

 

<RowDefinition Height="56*" />

 

<RowDefinition Height="72*" />

 

<RowDefinition Height="402*" />

 

<RowDefinition Height="37*" >

 

</RowDefinition>

 

</Grid.RowDefinitions>

 

<Button Background="#FF4487CB" BorderBrush="White" Content="Search" Foreground="#FF432828" Height="30" HorizontalAlignment="Left" Margin="577,16,0,0" Name="btnSearch" VerticalAlignment="Top" Width="150" Grid.Row="1" HorizontalContentAlignment="Right" Click="btnSearch_Click" />

 

<Button Background="#FF4487CB" BorderBrush="White" Content="ChangePassword" Foreground="#FF432828" Height="30" HorizontalAlignment="Left" Margin="770,0,0,26" Name="btnChangePwd" VerticalAlignment="Bottom" Width="150" Grid.Row="1" HorizontalContentAlignment="Right" Click="btnChangePwd_Click" />

 

<Button Background="#FF4487CB" BorderBrush="White" Content="Project Information" Foreground="#FF432828" Height="30" HorizontalAlignment="Left" HorizontalContentAlignment="Right" Margin="404,16,0,0" Name="button1" VerticalAlignment="Top" Width="150" Grid.Row="1" Click="button1_Click" />

 

<Button Background="#FF4487CB" BorderBrush="White" Content="Assignments" Foreground="#FF432828" Height="30" HorizontalAlignment="Left" HorizontalContentAlignment="Right" Margin="237,16,0,0" Name="btnAssignments" VerticalAlignment="Top" Width="150" Grid.Row="1" Click="btnAssignments_Click" />

 

<Button Content="ViewLog" Grid.Row="1" Height="30" HorizontalAlignment="Left" Margin="81,16,0,0" Name="btnViewLog" VerticalAlignment="Top" Width="150" Background="#FF4487CB" Foreground="#FF432828" BorderBrush="White" HorizontalContentAlignment="Right" Click="btnViewLog_Click" />

 

<Button Background="#FF4487CB" BorderBrush="White" Content="Logout" Foreground="#FF432828" Height="30" HorizontalAlignment="Left" HorizontalContentAlignment="Right" Margin="941,16,0,0" Name="button2" VerticalAlignment="Top" Width="150" Grid.Row="1" Click="button2_Click" />

 

<!--<StackPanel Grid.Row="2" Height="378" HorizontalAlignment="Left" Margin="12,12,0,0" Name="spEmployee" VerticalAlignment="Top" Width="1105" />-->

 

<Grid Name="PageContainer" Grid.Row="2" Height="378" HorizontalAlignment="Left" Background="LightSkyBlue" Margin="12,12,0,0" VerticalAlignment="Top" Width="1105" >

 

 

</Grid>

 

<TextBlock Height="37" HorizontalAlignment="Left" Margin="25,11,0,0" Name="textBlock1" Text="Daily Work Log System" VerticalAlignment="Center" Width="1066" Foreground="#FF1010F2" FontWeight="Bold" FontSize="14" Visibility="Collapsed" />

 

<TextBlock Grid.Row="3" Height="23" HorizontalAlignment="Left" Margin="12,14,0,0" Name="textBlock2" Text="All rights reserved @ AppLabs Technologies Pvt Ltd. Version V01R01" VerticalAlignment="Top" FontWeight="Bold" Foreground="#FF61D161" />

 

</Grid>

can you please tell me where i need to set the height ...?


Regards
Ramesh

  Ramesh Nalla replied to D Company
04-Feb-12 04:16 AM
Hi D Company


YEs You are correct it  works fine..


Thanks Alot buddy.. You saved me ...


<

object data="data:application/x-silverlight-2," type="application/x-silverlight-2" style="height:900px" width="100%" height="100%">

Create New Account
help
How to prevent combobox SelectionChanged event on page load. Silverlight / WPF hello frnd How to prevent combobox SelectionChanged event on page load. i want only when an IsEnabled-property to your ViewModel and bind it on the IsEnabled-property of the container ( ItemContainerStyle ). The best option IMO would however be, not to show the items that are
WPF Projekt Startseite festlgegen .NET Framework Hallo, kann mir jemand sagen, wie man in in einem WPF Projekt mit C# 2008 die Startform festlegt. Kann man in einem WPF Projekt eine Windows Form als Startform festlegen? Wenn ja, wie? Bin f??r jede Info dankbar. Gru?? Thomas C# - German Discussions WindowsFormsHost (1) Silverlight (1) IsMDIContainer (1) ElementHost (1) TabControl (1) WPF (1) InitializeComponent (1) WfHost.Child (1) Hallo Thomas, Thomas schrieb: also bei mir steht das richtig hin. Mein Problem ist, dass ich bisher ein WinForm Projekt habe. Ich bin totaler WPF Neuling. Jetzt will ich mit WPF weitermachen. Daf??r habe ich wohl nun 2 M??glichkeiten. 1. In das bestehende WinForm Projekt WPF einf??gen. 2. Neues WPF Projekt anlegen und dort meine WinForms einf??gen. Um auf
Silverlight, WPF, XAML and InnerWorkings Coding Challenge This article explains a little of the history behind Silverlight (WPF / XAML) and what you can use it for. You’ll see how easy it is coding challenge featuring a sample app that demonstrates how to use and transform video in Silverlight. Getting Started with Silverlight One of the most talked-about aspects of Silverlight is its undeniable technical accomplishments. In an age of 50 megabyte downloads, Microsoft managed to squeeze large parts of WPF and a mini-CLR into a tiny browser plug-in, currently under 5MB. Not only
General discussion Helo to all Plz tell me only 10-15 important questions in Silverlight that mostly asked by Interviewer. . and if possible plz tell me interview question for ASp www.dotnetfunda.com / interview / showcatquestion.aspx?category = 84 http: / / www.aired.in / 2010 / 03 / microsoft-silverlight-interview.html http: / / www.dotnetobject.com / Thread-Silverlight-Interview-Questions-Answers HI read this Is Silverlight supported on various locales? Ans: Silverlight installs on localized versions of Macintosh computers and Windows. At this time, the installation is render international text (using double-byte characters) and support the full 64K Unicode character set. Silverlight uses simple input mechanism that treats all the languages in the same way. Ques: 2 Can I add more than one .xaml pages in silverlight application? Ans: Yes, you can have multiple .xaml files in a single project. In the Application_Startup you can choose, which page you want to initially display. Ques: 3 What is Silverlight Tool Kit? Ans: Silverlight Tool kit is nothing but is a collection of Silverlight Tools
intro hi, i want 2 know details about silverlight and their practically implementations of controls. . .so plz will u provide me helpfull links. . . Silverlight is a powerful development platform for creating engaging, interactive user experiences for Web, Desktop and Microsoft has got great tutorials, articles, videos on this section, refer these links http: / / www.silverlight.net / learn http: / / www.silverlight.net / archives / videos / getting-started-with-silverlight-development screencasts on how Silverlight works, controls, File IO, networking, UI design, data-binding, interacting with HTML pages, and more If you want to learn about Silverlight, this set of screencasts should definitely help! http: / / blogs.msdn.com / b / joestagner / archive / 2008 / 08 / 01 / 44-silverlight-videos.aspx Regards hi Silverlight enables development of the next generation of Microsoft .NET-based