I have a project in Silverlight which I'm adding controls at run time.
Every time I'm adding a control I want to scroll browser to the bottom of the page?
Any idea to how to scroll from Silverlight?
Thanks
if your Scrollbar is created by your application using the ScrollViewer you can do the following:
ScrollViewerName.ScrollToVerticalOffset(double.PositiveInfinity);
if your scrollbar is created in the HTML page you'll have to invoke a script
Silverlight Script Invoke
HtmlPage.Window.Invoke("ScrollToBottom");
Java Script
window.onload=toBottom;
function ScrollToBottom()
{
window.scrollTo(0, document.body.scrollHeight);
}
Most easy way to do it:
Use textchange event and in that execute richtextbox.selectall();
Related
When I use the AddNewItem to add an splash screen to a project, It adds an image file to the project. But I want to know if it is possible to make a Window as the Splash Screen of a WPF project.
I tried to set the BuildAction property of a Window to SplashScreen but the project fails to compile.
The Andy Lang apparently explained to make the splash screen with this single steps.
Please refer
http://www.codeproject.com/Articles/38291/Implement-Splash-Screen-with-WPF
You need to create a normal window, put an image inside the window, and show and hide it at appropriate times. No such thing as 'Splash Screen' exists it .NET.
In my application I have created a webbrowser in which the page loads in Zoomed view.I need the page in zoomout position in default.Is it possible.Please help me.
The best way to do that is with Javascript. You can run the script from C#.
Here you have a sample:
http://blogs.msdn.com/b/mikeormond/archive/2010/08/26/calling-javascript-functions-in-windows-phone-7.aspx
I am trying to put some tabs in the first page, and when mouse is over it, it should be bold and get larger, when click, it will direct to different page. Is it going to involve with JavaScript ? any tutorial for this ?
For the URL, you will want to read about The Silverlight Navigation Framework.
To make the URL go bold and get larger, you will want to use setup a MouseOverState VisualState Storyboard, as is done here: Style the MouseOver on a Silverlight/WPF button.
I am using Extjs4.0 to develop a web application. The application require drag a Extjs Panel outside current browser. Then create a new browser instance which has the panel object.
I did some research. Javascript has window.open function which can create a new window. But how can I pass the panel parameters to the new browser instance?
Does any one have relative experiences? or have some suggestions?
Try GreyBox
Note :- Sometime it breaks if there is an error in page
for e.g. it fails to open SO
but it works fine otherway
This is impossible. You are asking if you can drag an ExtJS Panel outside the Browser itself? Think about it, you can't do that.
You can open a new Window with ExtJS content, sure.
I have the following desired workflow: on HTML button click a Silverlight modal popup (dialog) must be displayed. No Silverlight content is displayed before HTML button click and no Silverlight content must be displayed after exiting from modal SL popup.
According to our customer inclination we couldn't use another technology for such popups.
Any thoughts on how to accomplish mentioned workflow?
I'm quite new to Silverlight so all the ideas are highly appreciated.
The requirement is a little unusual, but here goes...
I am assuming you have a Silverlight test project and know enough HTML/JScript to popup a window, as you tagged this question as Silverlight only.
Think of Silverlight as just another component you can put on a web page. Any web page. It can be a small control, or fill a HTML window.
In your case you want to simply put your Silverlight startup code into a html page that a popup window can show. The popup window will be triggered by JScript attached to a button.
The Silverlight startup code is usually generated for you in a HTML test webpage in your Silverlight Webproject. Copy it from there.
If you need more detailed instructions for a specific example, please provide more detail.