winrt-xaml

Windows Store Apps: Change the icon of an AppBar Button?

点点圈 提交于 2019-12-04 17:38:15
I want to change the icon of an AppBar Button in my Windows Store app. I found that the AppBar buttons have XAML markup that looks like this: <Style x:Key="PicturesAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}"> <Setter Property="AutomationProperties.AutomationId" Value="PicturesAppBarButton"/> <Setter Property="AutomationProperties.Name" Value="Pictures"/> <Setter Property="Content" Value=""/> </Style> What does the content value  mean? Is there any refernece to the built-in icons ? Also how can I display a different icon of my own ? Frank

Text control used in Windows Phone 8.1 messaging app [closed]

梦想的初衷 提交于 2019-12-04 17:15:59
I need a text control similar to the one used by WP 8.1 messaging app that shows the up & down arrows that point to 'top-left' and 'bottom right'. I am not able to find one. I do see other apps like 'whapsapp', 'line' etc using similar controls. Is there a preexisting / opensource control available with that functionality. Any pointers or links would be very helpful. Thanks, Amar This doesn't require a custom control. You can create a normal TextBox or TextBlock and add a triangle underneath (or above) it. Use a template selector to choose left or right based on which person is chatting: Xaml:

How to get GridView.Selected Item's Scroll Position in Windows 8 Metro App

感情迁移 提交于 2019-12-04 16:20:32
I am selecting gridview item using code, so I also need my gridview to Scrolls at selected item's position , I tried GridView.ScrollintoPosition() but it is not working . IS there any way to get the Scroll position of SelectedItem so that I can scroll it using scrollViewer1.ScrollToHorizontalOffsetWithAnimation() There are a few aspects here. I think just gridView.ScrollIntoView(gridView.SelectedItem) should work. It's a bit asynchronous, so the code wouldn't immediately see it scrolled, but if you do something like await Task.Delay(100) - you might be able to see the ScrollViewer offset

Cannot get Facebook single signon with windows 8.1 to work

人走茶凉 提交于 2019-12-04 15:36:11
After the great news about Facebook and Microsoft support Facebook SSO I have tried to implement this in a winrt/xaml/c# app for windows 8.1, however I cannot get it to work. I have registered the app with facebook and set the app's SID in the app's settings. This is the login code: Uri sid = WebAuthenticationBroker.GetCurrentApplicationCallbackUri(); string callbackURL = sid.ToString(); String facebookURL = "https://www.facebook.com/dialog/oauth?client_id=" + Uri.EscapeDataString(AppId) + "&display=touch&response_type=token&scope=publish_stream&redirect_uri=" + Uri.EscapeDataString

How to start a MetroApp directly in Snapped mode? [duplicate]

别等时光非礼了梦想. 提交于 2019-12-04 14:26:47
Possible Duplicate: Force WinRT app to snapped view Is it possible to start a MetroApp directly in snapped mode? I want to call another App by Protocol, an the App should open in Snapped mode. The call to the App by Protocol is not a problem, it works fine, but the App opens in Fullscreen or Main-Content Mode. I have'nt found any configuration to say "start on Sidebar". Please Help! As of now the answer is no. Since the snapped mode functionality depends on the user , you cant skip it / restrict it using code , Hope MS might provide this feature in further . As @Hermit Dave mentioned

PreviewKeyDown for Windows Store App ListBox

独自空忆成欢 提交于 2019-12-04 14:13:57
问题 Is there an equivalent to the PreviewKeyDown for a Windows Store App ? It isn't available. I have exactly the same problem as described here: I have a ListBox with a TextBox above it. I would like to use the arrow keys to navigate from the ListBox to the TextBox. The intention is that if the first item in the ListBox is selected, and the user keys up, the TextBox will get focus. 回答1: Ah, tricky. Handling key events isn't super-obvious. Here's what you want: public MainPage() { this

How do you capture current frame from a MediaElement in WinRT (8.1)?

孤街醉人 提交于 2019-12-04 13:48:45
I am trying to implement a screenshot functionality in a WinRT app that shows Video via a MediaElement. I have the following code, it saves a screenshot that's the size of the MediaElement but the image is empty (completely black). Tried with various types of Media files. If I do a Win Key + Vol Down on Surface RT, the screen shot includes the Media frame content, but if I use the following code, it's blackness all around :( private async Task SaveCurrentFrame() { RenderTargetBitmap renderTargetBitmap = new RenderTargetBitmap(); await renderTargetBitmap.RenderAsync(Player); var pixelBuffer =

How to create a Tokenizing Control for UWP as known from Outlook when using To, Cc and Bcc

感情迁移 提交于 2019-12-04 13:06:22
There is a great article about how to write a Tokenizing Control for WPF here: Tokenizing control – convert text to tokens But how is this accomplished in an UWP App? The Windows 10 UWP Mail client does this just fine, so I know that it is possible. But how? Tokenizing is super useful for To/CC/BCC input areas, as we know it from Outlook and lately from the Windows 10 UWP Mail client. I suspect that RichTextBlock or maybe RichEditBox combined with AutoSuggestBox could be part of the answer, but in the WPF example above FlowDocument is used and FlowDocumet is not supported in UWP. I haven't

RightTapped not fired on Metro ListViewItem if ListView in other than “None” selection mode

▼魔方 西西 提交于 2019-12-04 12:53:49
The issue is practically the same as described here: http://social.msdn.microsoft.com/Forums/en-US/winappswithcsharp/thread/542b827a-7c8e-4984-9158-9d8479b2d5b1 but I am not satisfied with the answer accepted there and feel that there must be a better solution... I am trying to implement a 'clasic' context menu on my list view (not via the AppBar but via PopupMenu) and that works fine, however only if I set the list view into the "None" SelectionMode. The link above correctly explains that the ListViewItem 'swallows' the right tapped event if ListView set to other than "None" selection mode.

How to detect two simultaneous touches?

廉价感情. 提交于 2019-12-04 12:37:05
问题 Detecting touch in Windows Phone 8 leverages the System.Windows.Input.Touch.FrameReported event which is the most raw and certainly the most responsive touch event available to developers. You would use the event like this: public MainPage() { InitializeComponent(); // setup sounds Ellipse1.Tag = new Uri("Sounds/GVD_snr1.wav", UriKind.Relative); Ellipse2.Tag = new Uri("Sounds/GVD_snr2.wav", UriKind.Relative); Ellipse3.Tag = new Uri("Sounds/GVD_snr3.wav", UriKind.Relative); Ellipse4.Tag = new