microsoft-metro

Crop image with dynamic rectangle coordinate

此生再无相见时 提交于 2019-12-06 15:22:00
问题 I have a Image and I want crop it by using a rectangle, code below is the code I put a image and draw a rectangle at middle of the image: MainPage.Xaml: <Canvas x:Name="canvas" HorizontalAlignment="Center" VerticalAlignment="Center" Width="340" Height="480" Background="Blue"> <Image x:Name="photo" HorizontalAlignment="Center" VerticalAlignment="Center" ManipulationMode="All"> <Image.RenderTransform> <CompositeTransform/> </Image.RenderTransform> </Image> <Path Stroke="Black" StrokeThickness=

Windows 8 & MySQL? What are my options?

瘦欲@ 提交于 2019-12-06 14:58:37
问题 I am currently writing a Metro application and I want to integrate managed SQL handling within my app by connecting it to my web SQL DB. What are my options for .NET 4.5? Also, if you downvote, please explain why, I know there is some MySQL connector for .NET 4, but it is obviously incompatible with 4.5 回答1: I strongly advise against client programs connecting directly to a database server over the Internet, for the following reasons: Client libraries are designed and built around the

Optimal Database to be used for metro apps?

China☆狼群 提交于 2019-12-06 14:38:30
I am new to windows 8 metro apps development and i need your help in figuring out my doubt about the database support to metro applications ? i am developing a application which requires reasonably huge amount of data to be stored in its database , it would require many tables and relation between them , with help of this i can fetch the data from database and show it to user , and perform the required operations on it and sync the data when internet connection is there. Please let me know which is the optimal database for metro applications for me to use in my app. As per my knowledge these

WinRT GridView But No GridViewColumn

随声附和 提交于 2019-12-06 14:37:11
I do not have Windows 8 and Metro installed. My question is based on the documentation. It appears DataGrid is gone but ListView and GridView remain. GridViewColumn is gone. I get the tile nature of Metro. My question is can GridView be configured for a row column presentation? I have an app that for the most part would present great under Metro and would benefit from rights contracts. But there is one page were I need old school GridViewColumn like presentation. Thanks I'm not sure if I got your question. You want elements added to a ListView/GridView are displayed in a row? I use for the

How to get the first element of a CollectionViewSource?

北战南征 提交于 2019-12-06 14:27:45
问题 I remember seen some code xaml where can get the first element (like an index x[0]) from a collection. This is my CollectionViewSource from Resources. <CollectionViewSource x:Name="groupedItemsViewSource2" Source="{Binding Posters}" ItemsPath="Posters" /> If I display this in a listbox, it loaded it! <ListBox ItemsSource="{Binding Source={StaticResource groupedItemsViewSource2}}" /> But right now, I just want to get the first element through xaml. Is it possible doing this? 回答1: I faced

Render control into image in WinRT metro

别来无恙 提交于 2019-12-06 14:00:05
I'm creating an application for windows 8 metro, I need to render a framework control into an image and save it to hard disk but do not know how. Can I use SharpDX for this? How can I do? Thanks in advance for the help If you follow through this thread the limitations of Metro and the reasons why it won't work are explained. The essence of it is: Sorry, but rendering Xaml to an element or capturing a screenshot of your own app did not make it into the release version. It is by design that an app cannot capturing a screenshot of another app. A workaround mentioned is: What I meant was - you can

DataReader result truncated when reading from StreamSocket

馋奶兔 提交于 2019-12-06 13:45:16
I have the following c# / WinRT code to receive a response from an IMAP command DataReader reader = new DataReader(sock.InputStream); reader.InputStreamOptions = InputStreamOptions.Partial; await reader.LoadAsync(1000000); string data = string.Empty; while(reader.UnconsumedBufferLength > 0){ data += reader.ReadString(reader.UnconsumedBufferLength); } The results are truncated after 8192 bytes. 8192 looks suspiciously like a limit of some kind. How do I get around this? The abstraction of TCP/IP sockets is a stream of bytes, not a stream of messages , as I explain on my blog. So it's perfectly

Change Caret Color in WinRT?

岁酱吖の 提交于 2019-12-06 13:24:20
So in WPF and Silverlight you could set the caret color for TextBox using TextBox.CaretBrush, but in WinRT it seems in all their wisdom they removed this property. So now if the TextBox is a dark color, since it defaults the caret color to black you can't see it, and if the background color of your TextBox is black the caret ceases to exist completely. I find this completely illogical, there has got to be a way to change the caret color, either pragmatically or something? Does anyone have any ideas? This is not possible. You need to switch your TextBox to light background when it has focus so

How do I use XAML HexNumbers for Windows Store App icons (Segoe UI Symbol) in databound objects?

落花浮王杯 提交于 2019-12-06 13:05:39
I have a basic DataTemplate which I use to bind to the basic objects which expose several properties. These items are displayed in an ItemList . I am trying to ensure that the TextBlock which is bound to Icon , displays the symbol similar to  which would be stored in the object's Icon property. <DataTemplate x:Key="Action180x180ItemTemplate"> <Grid HorizontalAlignment="Left" Width="180" Height="180"> <Border Background="OliveDrab"> <TextBlock Text="{Binding Icon}" FontFamily="Segoe UI Symbol" FontSize="72" Padding="0,20,0,0" TextAlignment="Center" /> </Border> <StackPanel VerticalAlignment=

Win8 C# Metro dispatcher and RPC_E_WRONG_THREAD

醉酒当歌 提交于 2019-12-06 12:20:00
I am trying to build an application using the unofficial Google music api for .net in Windows 8 metro interface. I am loading the whole playlist foreach (GoogleMusicPlaylist p in pls.UserPlaylists) lbPlaylists.Items.Add(p.Title); and it comes up with this error HRESULT: 0x8001010E (RPC_E_WRONG_THREAD)) And I read around the internet and maybe I have to use dispatcher or something I am just generally confused. Use this Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { foreach (GoogleMusicPlaylist p in pls.UserPlaylists) { lbPlaylists.Items.Add(p.Title); } }); 来源: https://stackoverflow