silverlight-3.0

Windows phone 7 button “borders”

天大地大妈咪最大 提交于 2019-12-22 06:35:37
问题 By default WP7 buttons are surrounded by a black space of 5ish pixels. I'd like to remove this, but I've tried setting the Margin, BorderThickness, Padding properties to be a Thinkness of zero, but this seems to have no effect on this mysterious space. Any clues what exactly this spaces is and how I might get rid of it. Thanks, Robert 回答1: This border is specifically added to increase the size of the button as a touch target. Having this padding makes it easier for people to be sure that they

XAML: make a ScrollViewer show scrollbars when the ScaleTransform of a child object gets big

天大地大妈咪最大 提交于 2019-12-21 12:32:33
问题 I am making a sort of "print preview" control for some documents in my Silverlight 3 application. I have a Canvas (for showing the document) inside of a ScrollViewer, and I have zoom in / zoom out buttons that control the X and Y Scale properties of the ScaleTransform for the Canvas.RenderTransform property. I want the scrollbars of the ScrollViewer to show up when I "zoom in" enough such that the canvas is no longer visible in the ScrollViewer area, but it seems that they only show up

How to define a DataTemplate in code?

和自甴很熟 提交于 2019-12-21 07:34:12
问题 How can I create a DataTemplate in code (using C#) and then add a control to that DataTemplate ? <data:DataGrid.RowDetailsTemplate> <DataTemplate> <Border> <Border Margin="10" Padding="10" BorderBrush="SteelBlue" BorderThickness="3" CornerRadius="5"> <TextBlock Text="{Binding Description}" TextWrapping="Wrap" FontSize="10"> </TextBlock> </Border> </Border> </DataTemplate> </data:DataGrid.RowDetailsTemplate> I am using Sivlerlight. 回答1: As far as I know, the only way to create a DataTemplate

Convert address to coordinates

╄→尐↘猪︶ㄣ 提交于 2019-12-21 05:16:05
问题 There is a way to convert address to coordinates with bing maps? Thank 回答1: The process of going from addresses to lat/lng coordinates is normally called Geocoding This blog post has some good example code for WP7 using Bing - http://www.braincastexception.com/wp7-web-services-first-part-geocodeservice/ 来源: https://stackoverflow.com/questions/5529135/convert-address-to-coordinates

Can I add dll to Silverlight 3 application?

蓝咒 提交于 2019-12-21 04:59:52
问题 I am tring to add dll file to my Silverlight application but get error which says that I can't add reference which wasn't built with Silverlight runtime. Is there any solution? Thanks. 回答1: Try to use WCF Service to connect to your DLL.I did that way and it solved my problem. 回答2: Try creating an empty Silverlight class library, then add all your code to that project, then you will be able to add it to a silverlight application as a reference. If this does not meet your needs, upgrade to

Error when binding a Dependency Property on a custom Behavior

早过忘川 提交于 2019-12-21 03:54:10
问题 I am exploring the Silverlight attached behaviors mechanism in order to use the Model-View-ViewModel pattern within my Silverlight applications. To start with, I am trying to get a simple Hello World working, but I am completely stuck in an error for which I'm not able to find a solution. What I have right now is a page that just contains a button which should display a message when clicked. The click event is handled by using a class derived from Behavior, and the message is specified as a

Bind a fill property in a path to a Foreground property from the ContentControl in a style

帅比萌擦擦* 提交于 2019-12-21 03:36:28
问题 I have silverlight problem I'v used two days to fight: a template with a style controls a button. In the concrete button I have a canvas with paths as content. The problem is that I want the paths fill color to bind to the Foreground from the ContentControl in the template. However, I haven't been able to figure out how to construct the binding to get to the Forground. If I would, for example use a TextBlock, it will automatically get the Forground color from the Style. As expected as the

How to use gif animated image in WP 7

若如初见. 提交于 2019-12-20 05:30:53
问题 I have seen this post: Display GIF in a WP7 application with Silverlight But in my case? for animating I am using a popup. So when application starts it shows a popup for 5 seconds. In this popup I want to show some .gif image, but it doesn't work. Here is the code which I implement: public partial class AnimatedSplashScreen : UserControl { protected Uri ImageSource { get; set; } public AnimatedSplashScreen() { InitializeComponent(); ImageSource = new Uri( "http://upload.wikimedia.org

How can I put a Silverlight 3 DataGridCell into edit mode in code?

妖精的绣舞 提交于 2019-12-19 18:53:33
问题 I want to be able to pick a specific cell in a Silverlight 3.0 DataGrid and put it into edit mode. I can use the VisualTreeManager to locate the cell. How do I switch to edit mode? Each DataGridCell looks like this in the VisualTreeManager: System.Windows.Controls.DataGridCell System.Windows.Controls.Grid System.Windows.Shapes.Rectangle System.Windows.Controls.ContentPresenter System.Windows.Controls.TextBlock System.Windows.Shapes.Rectangle System.Windows.Shapes.Rectangle with the TextBlock

Silverlight application doesn't run. I get an invalid or malformed application error

偶尔善良 提交于 2019-12-19 05:21:50
问题 I have a Silverlight application, and when I click 'run' Internet Explorer starts up and nothing is shown. I get an error icon in the bottom left that, when I click it, result in the following error. Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0) Timestamp: Wed, 25 Nov 2009 00:11:41 UTC Message: Unhandled Error in Silverlight Application Code: 2103