windows-phone-7.1

Farseer - Particles doesn´t move/bounce accord to borders

↘锁芯ラ 提交于 2019-12-24 21:20:09
问题 I made my borders with this: class Maze { private Body _agentBody; private Sprite _box; private GameplayScreen _screen; private float _offset; public Maze(World world, GameplayScreen screen, Vector2 position) { _agentBody = BodyFactory.CreateBody(world, position); _agentBody.BodyType = BodyType.Dynamic; _agentBody.IsStatic = true; _agentBody.Restitution = 0.2f; _agentBody.Friction = 0.2f; _offset = ConvertUnits.ToDisplayUnits(1f); // spodek _agentBody.CreateFixture(new PolygonShape

How to get timer running even when application is running in background or phone is locked in Windows Phone

ⅰ亾dé卋堺 提交于 2019-12-24 13:47:32
问题 I have a timer in my application in Windows Phone 7.1 implemented using DispatcherTimer _timer; Initialized as Sample._timer = new DispatcherTimer(); Sample._timer.Interval = new TimeSpan(0, 0, 1); Sample._timer.Tick += new EventHandler(Timer_Tick); Sample._timer.Start(); private void Timer_Tick(object sender, EventArgs e) { double newValue = Sample.Value + 1.686; if (newValue >= 100) newValue = 0; Sample.Value = newValue; txtDigitalClock.Text = GetTime(); } public string GetTime() { time +=

Save a Grid and elements in it as a jpeg image - WinRT

六月ゝ 毕业季﹏ 提交于 2019-12-24 12:27:02
问题 I am stuck in my app. I have a grid with some elements in it. These elements are buttons, images and other controls like stackpanel and nested grids. I want to save what appears to the user as image on click of a button, but i dont know how to proceed on this. Can I write elements like grid and buttons onto a writable bitmap? Or is there some other way? In short I want to take a screen shot of my app screen when the user clicks the button. Please help. 回答1: Taking "screenshots" of winrt apps,

PivotItem control windows phone 7 set color of disabled header

 ̄綄美尐妖づ 提交于 2019-12-24 11:35:08
问题 Is there a way to set the state of the header color in XAML when the PivotItem control is not the current selected one. This is the header code i am using for the pivot item control <controls:PivotItem.Header> <TextBlock Text="first" Foreground="{StaticResource PhoneAccentBrush}"/> </controls:PivotItem.Header> In the below example, I want all the header's color to be PhoneAccentBrush but when it goes in the disabled state, I want to it to be grey (but it becomes a dimmed version of

Download an image from url and opening it in an image control in wp7

只愿长相守 提交于 2019-12-24 02:17:14
问题 I am making a WP7 app which download all my twitter feed. In this I want to download all the profile images and store them locally and use them, so that they would be downloaded every time i open the app. Please suggest any of the methods to do so. What I am doing : using a WebClient to download the image public MainPage() { InitializeComponent(); WebClient client = new WebClient(); client.DownloadStringCompleted += new DownloadStringCompletedEventHandler(client_DownloadStringCompleted);

Adding an external font to WP7 app

风格不统一 提交于 2019-12-23 20:35:36
问题 I want my WP7 app controls and to have a certain font which is not in Visual studio font selection, how can I add the font to the font list of Visual studio or directly into my controls? 回答1: Here's a post showing how to embed fonts in a silverlight project (see the section 'Custom Fonts'): http://blogs.silverlight.net/blogs/msnow/archive/2009/09/09/97060.aspx I haven't tested this in a windows phone project but it should work. 回答2: This can be easily done using Expression Blend. In your

Scanning Text (OCR) in Windows Phone 7.5 [closed]

喜你入骨 提交于 2019-12-23 15:25:59
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . Is there a way to force Zxing library to scan text only? I am looking for the offline (non-cloud) solution to scan text in windows

Is listbox virtualized by default in WP7 Mango?

独自空忆成欢 提交于 2019-12-23 15:16:59
问题 In august 2012, this article was published http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh286406%28v=vs.92%29.aspx which talks about database best practices. In this article, is mentioned that data virtualization in listbox must be enabled and suggests to follow an article dated August 2010. " For more information about enabling data virtualization on data-bound ListBox controls, see Improving ListBox Performance in Silverlight for Windows Phone 7: Data Virtualization" However

DataTemplateSelector in wp7 mango

廉价感情. 提交于 2019-12-23 13:11:49
问题 I need a data template selector in my app. I found this blog that worked great on 7.0. After upgrading my project to 7.1 I get "unspecified error" when setting the template. I tried to take the sample project they publish on the blog and upgrade it to mango, and it still works. I don't get what I do wrong, because it seems like this code is Ok for mango. Any suggestions? <Grid x:Name="LayoutRoot" Background="Transparent" VerticalAlignment="Stretch" > <StackPanel VerticalAlignment="Stretch">

Pinch Zoom images bound in Listbox

可紊 提交于 2019-12-23 12:57:24
问题 I am trying to implement pinch zoom in my application. I found this article (Correct Pinch-Zoom in Silverlight) and it works perfectly fine for one image. But the problem is, my images are within listbox as shown in below XAML: <ListBox x:Name="lstImage" Margin="-20,-23,-12,32" Height="709" Width="480"> <ListBox.ItemTemplate> <DataTemplate> <Image Source="{Binding Path=ImageSource}" VerticalAlignment="Top" Margin="10,12,10,10" Width="640" Height="800"> </Image> </DataTemplate> </ListBox