How to locate silverlight controls to the same location when browsing? - silverlight

I'm trying to create a login screen in silverlight and i was taken two textboxes and put them in two of rows in Grid layout but when i run the app textboxes taking right alignment and stick with end of the window right side, any one help me to get out of this.
Thanks,
#nagaraju.

With personal experience with Silverlight, i would recommend using blend 4 for these things.
Because it will give you a more direct feel and a look.
Most Grids can have a free form, so that you can put anything anywhere.Though if your just writing XAML for it you may be off on your padding and margins for the Textboxes in the the Grid.
Also if that's happening their is a Case where your TextBoxes may not be in the Grid, if that's the case it will try and throw it out of the picture but your canvas size is most likely set to the size of the Login Screen so it cant throw it out. Alas putting it in the right lower hand side.
I would definitely mess around with the different options inside blend to get that working,
if your a Windows Phone DEV then you should have blend 4...but if your a Silverlight WEB DEV you would have to download Sketch Flow or Blend 4 Ultimate.
Also if your a student you may access Dreamspark.com and get Ultimate for free.
I hope this helps! :)

Related

Callout control in blend not exist anymore?

I am doing a Win store app 8.1. I want to have a shape looks like the dialog box, with the little triangle in the bottom. I remember there is "Callout" control in Expression 4 before when I did WP7 silverlight app, which is the thing I want, but they are not existing any more in blend for win store apps.
Where can I find that shape, Any ideas?
Stinks huh? But maybe it's not what you would have wanted anyway, right? Listen, there's nothing stopping you from creating one. It's super-easy.
http://blog.jerrynixon.com/2012/08/expression-design-to-create-windows-8.html
Here's another one
http://blog.jerrynixon.com/2013/12/you-can-make-it-snow-in-xaml-here-ill.html
Best of luck!

How do I create an expaning panel in Silverlight 4?

I'm a rank newbie at animations and so on in Siverlight, and have a need to create an expandable panel, which can be used as a help facility. The idea is that the screen would have a small button at the top-right, and when clicked, this would animate the width of a panel containing help info from zero to some width. Clicking the button again would shrink the help panel back to zero width.
This sounds like it ought to be really easy, and in WPF it is, but as Silverlight doesn't seem to support a lot of the functionality of WPF, I'm struggling badly here.
I looked at the expander control from the toolkit, but as far as I can see, this doesn't do what I want, as the control always takes up the same screen area. I want the expandable panel to disappear when it's not in use.
Anyone able to provide a simple example of how this could be done? Note that I'm using SL4, not SL5.
Thanks very much in advance.
If you've got access to Expression Blend, this can (almost) all be done in XAML.
This is a good place to get started
Found another SO question where someone posted XAML to do something almost identical...
Silverlight Project - Slide-in and out Panel - How?
Hope this helps someone else :)

Building a presentation display for big screen using Silverlight

Our company wants to replace the powerpoint presentation (company info, etc) displayed on the big screen TV in the lobby with something more professional. I can do that easily using ASP.NET/HTML and JQuery (use JQuery to cycle through the DIVs), but I want to develop it in Silverlight - basically a web-based Silverlight application that fades in/out through the different "slides". It'll be tied to a SQL server database.
I'm new to Silverlight (my 1st project) and am not sure how to proceed (I'm pretty conversant with ASP.NET). I'm not sure which container (stackpanel, grid, canvas) to use in building the slides. I tried using stackpanels but couldn't get it to fade from one stackpanel to another.
Can someone please help me out??
Thanks.
My answer at "Animation target not specified issue - Silverlight storyboards." will do the trick at
Animation target not specified issue - Silverlight storyboards
When placing your Dia in a Grid you can easy use the PlaneProjection to move it around animating the LocalOffsetX property of the PlaneProjection for example.
<Grid>
<Grid.Projection>
<PlaneProjection />
</Grid.Projection>
<Dia />
</Grid>
If you need more explanation, let me know. I will be happy to elaborate in more detail.
Please let me know if this helped you.

Can I use the WP7 Panorama control outside of WP7?

I need a WPF control that acts like the Panorama control for Windows Phone 7, but I need it for a desktop application.
It will contain a series of panels (or Panorama Items) that the application will be able to slide through horizontally programmatically.
Also, the content inside the panels not currently displayed on the screen will need to be "lazy loaded". In other words, they should be referenced but not loaded or rendered.
Can I somehow adapt the WP7 Panorama control to do this? Or will I have to develop a custom control from scratch to behave similarly to it?
Thank you!
EDIT:
I could probably use a VirtualizingPanel to implement the lazyload behaviour.
MahApps.Metro while still not super mature does allow for the wp7 Panorama control. Demo of how to use a panorama here. I've played with it a little and while its not the most customizable thing out there it gets the job done. Pretty sweet. Also Sacha Barber (Codeproject Demigod) wrote up an article on making your own. Of which I haven't looked at yet but, the guy usually does awesome work. So I'd check that one out as well.
http://blogs.microsoft.co.il/blogs/arielbh/archive/2010/10/21/porting-windows-phone-7-s-panorama-control-to-silverlight-4.aspx gives some clues about how do to this.
It suggests using http://phone.codeplex.com/ as your base and then you can use http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=4b281bde-9b01-4890-b3d4-b3b45ca2c2e4 (Microsoft Surface Manipulations and Inertia Sample for Microsoft Silverlight) to run convert get it to respond to touch.
Seems none exist as far as I can see so far.
This blog has started an attempt at making it, so you could work from there to make your own. Be sure to also check out this page which details the creation of an individual panorama item too.

Silverlight 3: How to implement Textblock copy/paste functionality?

Silverlight is awesome, most of my application users are giving positive feedback about silverlight. However some of the users are not able to live without copy/paste functionality. They are very much used to copy/paste functionality provided by HTML page out of the box.
How can I implement such a context menu as well as copy/paste functionality?
PS: Windows only solution is fine too.
Aside from using TextBox with IsReadOnly=true, you'll have a pretty hard time trying to simulate selection and copy/paste in a TextBlock. I would identify the areas they wish to copy/paste the most and use TextBox's there. You could even remove the border and make a transparent background and it should look nearly identical to adjacent TextBlock's.
If you do that then you will get the selection and copy functionality provided by TextBox and it works across browsers.
Otherwise you will need to go through the browser's DOM to put stuff on the clipboard and that will be a pain because of cross-browser concerns. Silverlight 4 adds a Clipboard API if you're able to start development with a beta version.
As Josh has answered, style a TextBox to look like a TextBlock. In terms of copy and paste:
Assuming the users aren't content with just CTRL+C, CTRL+X or CTRL+V - you can now access the clipboard in Silverlight 4:
string content = Clipboard.GetText();
Clipboard.SetText("hello world");
A context menu can be done in various ways, and in Silverlight 4 it is actually properly supported cross browser instead of just IE. You could do it with a Popup or a ChildWindow or just use one from the Vectorlight library:
This open source project on Codeplex contains a demo that does just that and much more:
http://sl4popupmenu.codeplex.com/

Resources