win-universal-app

Using ThreadPoolTimer with Background Audio UWP

巧了我就是萌 提交于 2019-12-04 20:22:36
I am making a UWP app using the BackgroundAudioTask. My app is working very well. Now I want to add in a TextBlock the Current position of the Audio played. I was doing this method before implementing the audio Task: private TimeSpan TotalTime; private DispatcherTimer timerRadioTime; private void radioPlayer_MediaOpened(object sender, RoutedEventArgs e) { TotalTime = radioPlayer.NaturalDuration.TimeSpan; // Create a timer that will update the counters and the time slider timerRadioTime = new DispatcherTimer(); timerRadioTime.Interval = TimeSpan.FromSeconds(1); timerRadioTime.Tick +=

UWP serial port communication for character write and read (UWP and Arduino)

拥有回忆 提交于 2019-12-04 19:57:19
I am using this code but not working and throwing this exception: Object reference not set to an instance of an object devices[0] giving me null value. private async void ConnectToSerialPort() { string selector = SerialDevice.GetDeviceSelector("COM7"); DeviceInformationCollection devices = await DeviceInformation.FindAllAsync(selector); if (devices.Count > 0) { DeviceInformation deviceInfo = devices[0]; SerialDevice serialDevice = await SerialDevice.FromIdAsync(deviceInfo.Id); Debug.WriteLine(serialDevice); serialDevice.BaudRate = 9600; serialDevice.DataBits = 8; serialDevice.StopBits =

Why does this ScrollViewer's ScrollBars appear twice?

僤鯓⒐⒋嵵緔 提交于 2019-12-04 19:03:09
I edited a ScrollViewer 's template to wait only 0.5 seconds before hiding the scrollbars, and this succeeds in hiding them at that time, but they reappear for another 0.5 seconds. Why? To reproduce, create a page resource for a ScrollViewer's Style with the default Template ( find it here on MSDN ) and change the 3 occurances of "3" to "0.5". Then use the following XAML: <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> <ScrollViewer Height="500" Width="500" Style="{StaticResource ScrollViewerControlTemplate1}"> <Grid Background="Blue" Height="1000" Width="1000"> </Grid>

Xamarin Form - How To checked the checkbox on another check box checked in UWP

若如初见. 提交于 2019-12-04 18:30:17
My application displays the fetures permissions on DataGrid from database. For realizing this I am using the MyToolkit.Controls.DataGrid . Now i want output for if user checked the admin or update/delete/create check box then View and list check box checked vice versa same for the and also i want to set checkbox checked value from database. thanks in advance. Image if user checked the create/update/delete then same row list and view should be checkbox checked if user checked the view check box then selected row column list should be checked Datagrid xaml <Toolkit:DataGrid.Columns > <!--Feature

UWP: How to catch the click of a listview part from another listview in the viewmodel instead of code-behind?

时光毁灭记忆、已成空白 提交于 2019-12-04 18:10:01
I have this listview: <Page x:Class="DataBase.ControlsPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" DataContext="{Binding CustomersViewModel, Source={StaticResource ViewModelLocator}}"> <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> <ListView Name="HeaderList" ItemsSource="{Binding Customers}"> <ListView.ItemTemplate> <DataTemplate> <Grid> <Border Background="Bisque"> <TextBlock Text="{Binding Name"/> </Border> <ListView Name="SubItemsList" ItemsSource="{Binding Project}" ItemClick=

Override theme brush Windows 10 UWP

試著忘記壹切 提交于 2019-12-04 18:06:15
问题 I'm trying to override some style-colors in Windows 10 but I cannot get it to work. My app.xaml looks like this: <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="Resources.xaml"/> </ResourceDictionary.MergedDictionaries> <ResourceDictionary.ThemeDictionaries> <ResourceDictionary x:Key="Default" Source="Theme.xaml"/> </ResourceDictionary.ThemeDictionaries> </ResourceDictionary> </Application.Resources> And my Theme.xaml looks like this

Communication between Windows Universal App and Desktop application (Win 10)

心已入冬 提交于 2019-12-04 17:45:29
Is there any way to realize communication between a Windows Universal App and a standard Desktop application running at the same computer? I read that UAs don't support IPC. Instead they use those so called background agents. But is it possible to use those background agents not to communicate with a UA but rather a desktop application or is this completely suppressed? The reason is, that I already have a desktop application and I would like to add Cortana support to it, without too much effort. So I would like to avoid converting the desktop app to a universal app. Cortana is only available

How to draw an arc in universal windows app

北慕城南 提交于 2019-12-04 17:12:51
I need an arc (circle segment) in my universal windows application, but i just cant figure it out how to make it. There are only circle and rectangle shapes available. My goal is to create an arc that is showing the given percent, line 50% 66% etc. If you want something like this: Check my solution (tested on Windows 8.1 and Windows 10 UWP): https://github.com/arek-kubiak/ArcControl/tree/master I hope it will be helpful for you :) Be careful, control automatically adjusts the height and width to the radius and thickness. (if you will have some problems i can help :)) If you're looking to

Create custom Shape Control in UWP (Universal Windows Apps), Windows 10

懵懂的女人 提交于 2019-12-04 17:02:58
I want to create a custom Shape control, that paints different shapes like Polygon , Ellipse , Rectangle , etc, depending on some custom properties. I was able to create a custom template control ColorShape like this: <Style TargetType="local:CustomShape"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="local:CustomShape"> <ContentControl x:Name="shapeParent"> </ContentControl> </ControlTemplate> </Setter.Value> </Setter> </Style> And then, override the OnTemplateChanged method, and insert a corresponding Shape control inside the shapeParent ContentControl But what I'd

Architecture of Azure Mobile Services Application

女生的网名这么多〃 提交于 2019-12-04 16:43:09
I'm trying to piece together an architecture for a Windows Universal App leveraging Azure Mobile Services. It's a LOB app and will need to handle 100-250 offline\online tables. Currently Mobile Services doesn't support nested complex objects so on the service side I've mapped most of my tables straight through from entity framework. The question I have is whether I should use a separate layer to reconstitute the DTO's or if i should be doing this all through the service layer and the view model. My main concerns are isolation of responsibility (large team) and the performance overhead from the