silverlight-2.0

Silverlight Tools for Visual Studio 2008 - Placing a Control Issue

这一生的挚爱 提交于 2020-02-04 05:06:24
问题 What is the issue with the Silverlight Tools for VS2008? I can't seem to place controls on the designer surface. This didn't work for me on two different machines. Do you have to tweak the XAML to be able to place the first control? Cursor stays a compass-like-cross when over the surface. Are you supposed to drag-n-drop controls or draw them? Screenshot (as far as I got) 回答1: This is in response to your request for my thoughts on this question from your comments on this post. As both Aaron

Silverlight 2 and large canvases?

被刻印的时光 ゝ 提交于 2020-01-15 10:25:30
问题 I am working on an application that uses several large canvas controls (several thousand pixels across), layered on top of each other. The canvas controls themselves are completely invisible, but each contains a number of controls, mainly images. My question is, is there a recommended maximum size for a canvas, or is it purely a memory issue? And also, are we better off setting the Canvas size to (0, 0) and making use of the fact that we can happily render controls outside of the bounds of

Silverlight - Cannot resolve TargetName

泄露秘密 提交于 2020-01-05 13:10:42
问题 I have a multi-page (xaml pages) Silverlight Game Application. (SL2) The flow is something like this Login_Screen -> Game1_Instruction_screen -> Game1 ->ScoreCard-> Game2_Instruction -> Game2 ->ScoreCard->.....loop.... ->Game_Over_screen I am navigating between xaml pages using - Game1 g = New Game1(); this.content = g; Now I have an animation on each screen which highlights the text. When the game loop starts, everything works first time (for ex storyboard1.begin()) But when game comes to

TemplateBindings in Custom Controls

血红的双手。 提交于 2020-01-03 15:58:14
问题 I'm just mucking about with custom controls in silverlight and for the life of me i can't get the TemplateBindings to work. Can someone give this reduced version a once over to see if I'm missing something. So my ControlTemplate in the generic.xaml looks like <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:NumericStepperControl;assembly=NumericStepperControl"> <Style

What is the best way to clone a business object in Silverlight?

限于喜欢 提交于 2020-01-02 02:46:06
问题 What is the best way to create a clone of a DTO? There is not an ICloneable interface or a BinaryFormatter class in Silverlight. Is reflection the only way? 回答1: Here is the code we came up with for cloning. This works in Silverlight 2 & 3. Public Shared Function Clone(Of T)(ByVal source As T) As T Dim serializer As New DataContractSerializer(GetType(T)) Using ms As New MemoryStream serializer.WriteObject(ms, source) ms.Seek(0, SeekOrigin.Begin) Return DirectCast(serializer.ReadObject(ms), T)

Binding Silverlight UserControl custom properties to its' elements

耗尽温柔 提交于 2019-12-31 19:44:07
问题 I'm trying to make a simple crossword puzzle game in Silverlight 2.0. I'm working on a UserControl-ish component that represents a square in the puzzle. I'm having trouble with binding up my UserControl's properties with its' elements. I've finally (sort of) got it working (may be helpful to some - it took me a few long hours), but wanted to make it more 'elegant'. I've imagined it should have a compartment for the content and a label (in the upper right corner) that optionally contains its'

Binding Silverlight UserControl custom properties to its' elements

我的未来我决定 提交于 2019-12-31 19:42:44
问题 I'm trying to make a simple crossword puzzle game in Silverlight 2.0. I'm working on a UserControl-ish component that represents a square in the puzzle. I'm having trouble with binding up my UserControl's properties with its' elements. I've finally (sort of) got it working (may be helpful to some - it took me a few long hours), but wanted to make it more 'elegant'. I've imagined it should have a compartment for the content and a label (in the upper right corner) that optionally contains its'

Binding Silverlight UserControl custom properties to its' elements

心已入冬 提交于 2019-12-31 19:42:18
问题 I'm trying to make a simple crossword puzzle game in Silverlight 2.0. I'm working on a UserControl-ish component that represents a square in the puzzle. I'm having trouble with binding up my UserControl's properties with its' elements. I've finally (sort of) got it working (may be helpful to some - it took me a few long hours), but wanted to make it more 'elegant'. I've imagined it should have a compartment for the content and a label (in the upper right corner) that optionally contains its'

To view the silverlight app in fullscreen mode(F11)

心不动则不痛 提交于 2019-12-31 03:54:11
问题 Is there any way to load my silverlight app in F11 mode directly? I have used window.open(url, '_self', 'toolbar=no,status=no,location=no,menubar=no,resizable=yes,scrollbars=no,fullscreen=yes', 'true'); HtmlPage.window.invoke("launchPage",url); But the problem is that two instances of my app are opened. One in normal screen and the other in fullscreen. I have tried App.Current.Host.Content.IsFullScreen = true; in the constructor of the App.xaml Still its not working. :( Where am I going wrong

Set MaxHeight of textblock embedded within data template of ListBox

孤街浪徒 提交于 2019-12-25 01:59:37
问题 how do i access a textblock inside a data template, within a ListBox & set the textblock's 'MaxHeight'? Code-behind as well? I have @ Page.xaml: <ListBox ItemsSource="{Binding}" DataContext="" x:Name="NewsList" SelectionChanged="NewsList_SelectionChanged" SelectionMode="Single" Width="580" Height="360" VerticalAlignment="Top" HorizontalAlignment="Center" > <ListBox.ItemTemplate> <DataTemplate> <!-- table within each ListBox item--> <!-- control horizontal scrollbar w width @ following line-->