windows-phone-7.1

Get latest tweet using Tweetsharp on Windows Phone 7

大城市里の小女人 提交于 2019-12-02 05:28:42
I only want to get a latest tweet to my Windows Phone Apps using Tweetsharp. below is what I have done: Installing Tweetsharp using Nuget Package Manager. Registering my apps to Twitter Developer Site. Get Consumer key, Consumer Secret, token, and token secret. Initializing TwitterService using that 4 keys. Then, what is next? are there any mistakes of my steps above? I am really confused. The documentation for tweetsharp is available on the wiki . The best method is statuses/user_timeline : Returns a collection of the most recent Tweets posted by the user indicated by the screen_name or user

How to fix System.ArgumentException in HttpWebResponse?

主宰稳场 提交于 2019-12-02 04:20:47
问题 I am facing this exception when receiving HttpWebResponse for my WindowsPhone app. How am I supposed to fix this. It happens very often but I need to make sure my app doesn't crash if it happens. Please have a look at the screenshot. My expected response is Headers:- HTTP/1.1 500 Internal Server Error Date: Wed, 28 Nov 2012 06:41:24 GMT Content-Type: application/json Transfer-Encoding: chunked Connection: keep-alive Keep-Alive: timeout=30 Set-Cookie: ...........; path=/ Expires: Thu, 19 Nov

Change custom color for Rectangle.Fill or Grid.Background

落爺英雄遲暮 提交于 2019-12-02 03:31:29
i can change custom color Rectangle with something like : "#A125AA" in xaml. But i don't know where to find code change custom color i have i just know code for color arealy have this.gridgcolor.Background = new SolidColorBrush(Colors.Blue); you can set the color through RGB. This isn't done in hex like you're doing in your xaml. Color color = new Color() { R = 255, G = 255, B = 255 }; Brush brush= new SolidColorBrush(color); the hex values you have in your example #A125AA are also RGB R = A1, G = 25, B = AA You could convert these values with a helper method so you can add them to your Color

Access list of installed apps

独自空忆成欢 提交于 2019-12-02 02:17:06
I need to get the installed apps of a Windows Phone. Do you know if this is available from the SDK? It's possible to list third party applications installed on the phone, but only from your desktop machine (ie. not from an app running on the device) and thus might not be what you are after. Firstly, you need to add a reference to this assembly: c:\Program Files (x86)\Common Files\microsoft shared\Phone Tools\CoreCon\10.0\Bin\Microsoft.Smartdevice.Connectivity.dll Then the following code will connect to the emulator ( useEmulator = false for a device) and writes the product IDs of all the

WP7 wraping text around image

佐手、 提交于 2019-12-02 00:18:20
I have this code: <ScrollViewer x:Name="textScroller" Grid.Row="2"> <Grid x:Name="ContentPanel" Margin="12,0,12,0" DataContext="{Binding}"> <Image x:Name="ImageUrl" Source="{Binding ImageUrl}" Height="198" Width="150" Margin="10 10 10 10" FlowDirection="RightToLeft" HorizontalAlignment="Left" VerticalAlignment="Top" /> <TextBlock x:Name="Content" Text="{Binding Content}" TextWrapping="Wrap" Style="{StaticResource PhoneTextNormalStyle}" Margin="0,41,24,-41" LineStackingStrategy="BlockLineHeight" MaxWidth="478" /> </Grid> </ScrollViewer> Image in this code is background of that textblock but I

Windows Phone Mango - ListBox or LongListSelector?

ぃ、小莉子 提交于 2019-12-01 21:06:13
问题 Say if I need to display a list with lots and lots of records, which control is better? Or shall I say, which control has a better scrolling experience? I've seen a lot of people reporting issues on this LongListSelector, is it really too buggy to use? Hope someone can shed some light on this for me. Thanks in adv. Xin 回答1: If you don't need grouping, I wouldn't use the LongListSelector. The virtualization support is easier to use/manage with a regular ListBox. And as of Mango, the ListBox

GPS to calculate distance between two points on windows phone 7

ⅰ亾dé卋堺 提交于 2019-12-01 20:56:23
i am using GPS to calculate distance between two points i.e. i am using windows phone as a tape measure but when i start i dont get the correct value infact even if i am standing still it gives me hundreds of meter here is my code myWatcher.StatusChanged += new EventHandler<GeoPositionStatusChangedEventArgs>(myWatcher_StatusChanged); myWatcher.PositionChanged += new EventHandler<GeoPositionChangedEventArgs<GeoCoordinate>>(myWatcher_PositionChanged); myWatcher.MovementThreshold = 1; void myWatcher_PositionChanged(object sender, GeoPositionChangedEventArgs<GeoCoordinate> e) { double tempf = e

How close BackgroundWorker thread when application is deactivated?

丶灬走出姿态 提交于 2019-12-01 18:37:21
问题 I create thread with BackgroundWorker , and in the loop I check every time if CancellationPending is true or not, like this: public MainPage() { InitializeComponent(); bw = new BackgroundWorker(); bw.WorkerReportsProgress = true; bw.WorkerSupportsCancellation = true; bw.DoWork += new DoWorkEventHandler(bw_DoWork); bw.ProgressChanged += new ProgressChangedEventHandler(bw_ProgressChanged); bw.RunWorkerCompleted += new RunWorkerCompletedEventHandler(bw_RunWorkerCompleted); } private void

How close BackgroundWorker thread when application is deactivated?

和自甴很熟 提交于 2019-12-01 17:54:36
I create thread with BackgroundWorker , and in the loop I check every time if CancellationPending is true or not, like this: public MainPage() { InitializeComponent(); bw = new BackgroundWorker(); bw.WorkerReportsProgress = true; bw.WorkerSupportsCancellation = true; bw.DoWork += new DoWorkEventHandler(bw_DoWork); bw.ProgressChanged += new ProgressChangedEventHandler(bw_ProgressChanged); bw.RunWorkerCompleted += new RunWorkerCompletedEventHandler(bw_RunWorkerCompleted); } private void ButtonStart_Click(object sender, RoutedEventArgs e) { if (bw.IsBusy != true) { bw.RunWorkerAsync(); } }

System.Linq.GroupBy Key not binding in silverlight

女生的网名这么多〃 提交于 2019-12-01 17:54:21
list.ItemsSource=db.Templates.GroupBy(t=>t.CategoryName); in xaml: <DataTemplate> <TextBlock Text="{Binding Key}" /> </DataTemplate> After this code. Don't show any text in TextBlock. I'm changing Text binding like this <DataTemplate> <TextBlock Text="{Binding}" /> </DataTemplate> TextBlock Text shown like this System.Linq.Lookup^2+Grouping[System.String,Model.Template] I'm debugging and checking Key property. this is not null. Why Key don't bind in TextBlock? How to show group title in Textblock? RobSiklos Hmmm - unfortunate. The reason is because the result of the GroupBy() call is an