uwp

Validation for textbox with two sets of phone numbers

℡╲_俬逩灬. 提交于 2019-12-11 17:12:49
问题 I am trying to do a validation on a textbox that can allow the input of one or more phone number in a single textbox. What I am trying to do is to send an message to the phone numbers included in the textbox. I have no problem when I enter just one set of number into the textbox and the message can be sent. However, whenever I type two sets of digit into the same textbox, my validation error will appear. I am using user controls and putting the user control in a listview. Here are my codes:

Complicated background work in UWP, is it real?

牧云@^-^@ 提交于 2019-12-11 17:09:18
问题 Usually I work with Android but now I need to make background application/library/service in UWP. So, I need three background tasks/jobs/services: Every 15 minutes send POST request to the server Every 1 minute check some data Run via push notification a long-running tcp/ip connection which can run about 1 hour (how long can it run?) I am confused, is it possible for UWP? 回答1: The short answer,it is not complicated. Every 15 minutes send POST request to the server Background tasks can run as

UWP TreeView DragEnter and DragOver events do not execute

独自空忆成欢 提交于 2019-12-11 17:06:25
问题 It is very important that I can track which item is dragged in UWP TreeView and onto which item it is dropped. For now, I can get only item that is dragged. But I can not detect over which item it is dragged over or over which item it is dropped. Also it would be also good to know as preview which item is dropped onto so I can do more actions (for example cancel dropping on certain items). Here is my extended control: public class MyTreeView : TreeView { public MyTreeView() { this

Is runFullTrust mode in UWP app ,capable of broadFileAccess by default?

元气小坏坏 提交于 2019-12-11 17:05:39
问题 I have a UWP app that requires the restricted capability "broadFileAccess" to access data from a file. I also have to use "runFullTrust" capability for registry access. My understanding was that an app in "runFullTrust" mode had both file and registry access permissions and that "runFullTrust" is a higher level capability. Problem: I tried giving "runFullTrust" capability,but for some reason the file access permissions are denied and also I dont even have an option to enable it under Settings

UWP - How to save ListViewItem state if the data source has changed?

非 Y 不嫁゛ 提交于 2019-12-11 17:01:42
问题 I have a problem with the listviewItem, is that when you change the data if they do it but they are not saved in the interface when you click on another item This problem happens when binding the textbox to the listviewItem MainPage.xaml <Grid RequestedTheme="Light"> <Grid.RowDefinitions> <RowDefinition Height="auto" /> <RowDefinition Height="818*" /> <RowDefinition Height="auto"/> </Grid.RowDefinitions> <TextBox x:Name="titulo" Grid.Row="0" FontSize="40" PlaceholderText="Ingresa tu titulo"

use case-switch in c#

我的梦境 提交于 2019-12-11 16:58:40
问题 public class Icon { public int IconID { get; set; } public string Title { get; set; } public string Room { get; set; } public string ImageCover { get; set; } } public class IconManager { public static List<Icon> GetIcons() { var Icons = new List<Icon>(); Icons.Add(new Icon { IconID = 1, Title = "Fan", Room = "Enter-Room", ImageCover = "Assets/1.png" }); Icons.Add(new Icon { IconID = 2, Title = "AirConditioner", Room = "Enter-Room", ImageCover = "Assets/2.png" }); Icons.Add(new Icon { IconID =

Decompress ZIP archive in a native Windows Runtime component/application

佐手、 提交于 2019-12-11 16:54:39
问题 This seems to be a simple task, yet my research left me with nothing: How do you extract items from a ZIP archive in a native Windows Runtime component (or application)? Now if I were to target .NET, there's a ZipArchive and ZipFile class, that make the solution as simple as it should be. But what, if I cannot or do not want to take a dependency on the CLR? The only compression support I was able to find in the Windows Runtime is the Windows.Storage.Compression Namespace, and there's really

How to remove the InkStroke when using the ActiveCustomDrying in uwp?

纵然是瞬间 提交于 2019-12-11 16:48:52
问题 I used the ActiveCustomDrying to customize the ink, now I want to remove them InkStrokes . StrokeContainer is null because of active the CustomDrying , so I am unable to remove the InkStrokes by using the DeleteSelected method. Can anyone suggest me how to remove the InkStrokes when using the CustomDrying . 回答1: During the custom drying, you will store the strokes in a custom List<InkStrokeContainer> collection: private void InkPresenter_StrokesCollected(InkPresenter sender,

How to create a custom OAuth 2.0 redirect_uri for Google provider, for UWP app?

随声附和 提交于 2019-12-11 16:40:05
问题 I want to register a custom redirect_uri (like pw.oauth2:/oauth2redirect) in Google Developer console for a native application (this is the recommended approach for UWP apps). According to https://developers.google.com/identity/protocols/OAuth2InstalledApp#request-parameter-redirect_uri, there must be an option to select "Custom URI scheme (Android, iOS, UWP)" but I only see these options: Web application Android Chrome iOS Other Selecting Other does not let me specify redirect_uri. How am I

Set combobox Item in code Behind UWP

≯℡__Kan透↙ 提交于 2019-12-11 16:39:33
问题 I have seen how to select the item from the index by code behind, but how can i select it from code behind knowing the string of the item? combobox code xaml: <ComboBox x:Name="ComboBoxOne" VerticalAlignment="Center" HorizontalAlignment="Center" Height="40" Width="200"> <ComboBoxItem Content="blue"/> <ComboBoxItem Content="red"/> <ComboBoxItem Content="green"/> </ComboBox> combobox code behind: ComboBoxOne.SelectedIndex = 1; But how to select the item knowing for example green? Is possible? I