winrt-xaml

Login-popup not working when rotating

£可爱£侵袭症+ 提交于 2019-12-12 01:33:30
问题 I have a code that looks like this <Popup IsOpen="True" Margin="200" Height="260" Width="900"> <Grid Height="250"> <TextBlock Style="{StaticResource HeaderTextStyle}" Text="Login" Margin="0" HorizontalAlignment="Center" VerticalAlignment="Top" Height="50" /> <TextBlock Style="{StaticResource ResourceKey=SubheaderTextStyle}" Text="" Margin="0,63,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" /> <TextBox Name="InputUsername" Margin="0,63,0,0" HorizontalAlignment="Right" Height="40"

Windows 8 App XAML/C#: Set multiple pushpins to Bing map in one method

一世执手 提交于 2019-12-12 01:29:04
问题 I am struggling to add a collection of latitude & longitude as Pushpins on Bing Map, in a Windows 8 app using XAML & C#. Adding Pushpins one by one using an event handler such as a right tap on the map works fine. Here is the XAML: <bm:Map x:Name="myMap" Grid.Row="0" MapType="Road" ZoomLevel="14" Credentials="{StaticResource BingMapAPIKey}" ShowTraffic="False" Tapped="map_Tapped" > <bm:Map.Center> <bm:Location Latitude="-37.812751" Longitude="144.968204" /> </bm:Map.Center> </bm:Map> And here

WebView “disabled” in Windows 8.1

 ̄綄美尐妖づ 提交于 2019-12-11 23:34:13
问题 I just upgraded my app to Windows 8.1, but now pages that I am loading into the WebView are no longer interactive. I can't press any buttons or fill out any HTML form fields. My WebView looks like this <WebView x:Name="browser" ScrollViewer.ZoomMode="Disabled" ScrollViewer.VerticalScrollBarVisibility="Disabled"></WebView> 回答1: I just created a new Windows Store app for Windows 8.1 based on the Blank App (XAML) template only putting the following line inside the Grid of MainPage.xaml :

Custom VisualState not being set in WinRT XAML

风格不统一 提交于 2019-12-11 21:56:52
问题 I'm trying to create a custom textbox in WinRT XAML. I want the textbox to highlight red when there is an error with the entered data. So first off I've modified the TextBox Temple and I've added a new VisualStateGroup (CustomStates - with HasError State) and I've also change the Focused group: <Style TargetType="TextBox"> .... <VisualStateGroup x:Name="CommonStates"> <VisualState x:Name="Focused"> <Storyboard> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement" Storyboard

barcodeReader.Decode(writeableBitMap) returning null

安稳与你 提交于 2019-12-11 20:30:12
问题 When I try a barcode that I've told is a CASE39 barcode I always get null returned from the decode if (cbBarcode.IsChecked == true) { var photoStorageFile = await KnownFolders.PicturesLibrary.CreateFileAsync("scan.jpg", CreationCollisionOption.GenerateUniqueName); Size aspectRatio = new Size(3, 1); dialog.PhotoSettings.CroppedAspectRatio = aspectRatio; StorageFile file = await dialog.CaptureFileAsync(CameraCaptureUIMode.Photo); string ImageValues = "bbc_photo" + x; var stream = await file

How do I convert a string color to a Brush in WinRT

橙三吉。 提交于 2019-12-11 19:54:56
问题 It seems like ConvertFromString is gone from WinRT. So I am having trouble finding a way to take a string in a combobox and using it set text foreground and a grid's background. Here is my latest attempt private void ColorDropBox_SelectionChanged_1(object sender, SelectionChangedEventArgs e) { string backGroundColor = e.ToString(); SolidColorBrush newcolor = new SolidColorBrush(); newcolor = backGroundColor as SolidColorBrush; this.ContentRoot.Background = newcolor; } Any suggestions

how to disable default (next/prev) buttons of flip in winrt xaml

五迷三道 提交于 2019-12-11 19:41:43
问题 i am working on winrt flipview. in this i want to disable its default next and prev buttons of FlipView . but the fliping can be done by another buttons. can any one please tell me how to disable default(next/prev) buttons in winrt xaml 回答1: You would need to re-template the control and remove those elements. 回答2: There are 2 options. Option 1. In FlipView.Loaded event dynamically remove the arrow buttons. private void flipView_Loaded(object sender, RoutedEventArgs e) { Grid grid = (Grid

How to detect ALT (Menu) button keydown on global page level in a WinRT app

本秂侑毒 提交于 2019-12-11 19:39:45
问题 I use following code to detect all key events in a WinRT app page: Window.Current.CoreWindow.KeyDown += CoreWindow_KeyDown; ... private void CoreWindow_KeyDown(CoreWindow sender, KeyEventArgs args) { //Handle key event } But the Alt (Menu in the VirtualKey enumeration) key does not trigger the CoreWindow.KeyDown event. It does also block any other key to trigger the event while pressed. Anyone know how to detect the Alt keydown event on a global page level in a WinRT app? 回答1: It seems to be

What is the difference between null and transparent brush in the Background or Fill

柔情痞子 提交于 2019-12-11 19:39:19
问题 For example we have a Border. What the difference beetween these XAMLs? 1) Background="Transparent" <Page x:Class="App1.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> <Border BorderBrush="White" BorderThickness="2" Width="400" Height="400" Background="Transparent" PointerPressed="Border_PointerPressed" PointerReleased="Border

ScrollViewer.IsHorizontalRailEnabled=“False” or ScrollViewer.IsHorizontalRailEnabled=“True” has no effect

放肆的年华 提交于 2019-12-11 19:34:19
问题 I am learning xaml and I am at Gridview. I have noticed that when I type in: <GridView x:Name="Grid1" Grid.Row="1" SelectionMode="None" Padding="120,0,0,0" RenderTransformOrigin="0.5,0.5" d:LayoutRounding="Auto" ScrollViewer.IsHorizontalRailEnabled="False"> or <GridView x:Name="Grid1" Grid.Row="1" SelectionMode="None" Padding="120,0,0,0" RenderTransformOrigin="0.5,0.5" d:LayoutRounding="Auto" ScrollViewer.IsHorizontalRailEnabled="True"> There is no difference when I run the app. I would like