I created a project of Windows Universal app. Then I add a new Runtime Component (background task C#) for update my tile.
Then I install sqlite-net for background task. I want to read some data from my database.
When I want to run my app, I get some error from SQLite.cs.
http://borjianamin.persiangig.com/errors.png
I search a little and I found this Topic: (I'm sorry for this because I don't have enough reputation)
stackoverflow.com/questions/14812076/how-to-connect-to-sqlite-database-from-windows-runtime-component-which-is-for-ru
github.com/praeclarum/sqlite-net/issues/104
I use replace tool of VS2015 and replace all public with internal But I get about 300 errors this time.
This is my background task project only:
Link: http://www.rodfile.com/uu9viaaxsz91
Is it possible to help me?
Thanks.
Yes it is possible. You have to add a separate project for SQLite called Class Library.
Then you have to add sqlite.net in that class library. After that you need to add the reference of Class Library on Windows Runtime Component.
Related
I've created a Cron Job in my API using IHostedService and the Cronos nuget package however I'm trying to do the same in my Xamarin.Forms app but it doesn't seem to work.
I've read that both Android and iOS have their own version of it with for example the Android Job Scheduler but I really want it to be an actual Cron Job and for it to work just like it does in my API.
Is there a way to do it this way ?
The tutorial I've followed is this one:
https://codeburst.io/schedule-cron-jobs-using-hostedservice-in-asp-net-core-e17c47ba06
Thank you so much.
You cannot achieve this directly in Xamarin.Forms
You need to use WorkManager or a background service in Xamarin.Android
https://learn.microsoft.com/en-us/xamarin/android/app-fundamentals/services/
For iOS, you would have to follow this guide.
https://learn.microsoft.com/en-us/xamarin/ios/app-fundamentals/backgrounding/
Update:
More powerful background tasks are now possible in iOS
https://developer.apple.com/documentation/backgroundtasks
C# bindings for the classes you see on the link are available. You have to follow the above documentation. Although it might be in Swift/Objective-C, the class names and methods would be similar.
I want to take advantage of the nice acrylic brush that is offered in UWP, but I also need to be able to access other process information and load DLLs for SDKs (e.g. Aura(needs dll) and Philips Hue(works without referencing dll) and detect system hibernation/wake (UWP cant't distinguish between going to the lock screen or going to hibernation or waking/logging in)).
I tried to make this in UWP, but the sandbox is making it impossible.
I also tried in WPF, but I couldn't get as good and nice performing acrylic effect as UWP offered, only the aero blur which is not as strongly blurred.
I lastly tried to create a WPF project that uses the Microsoft.Toolkit.Wpf.UI.Controls Nuget package, however it doesn't seem to come with the acrylic brush for WPF.
What are my alternatives in C#?
Is it possible to run a uwp app as the UI and have a WPF app as a constant background task without delay, messaging back and forth?
Is it possible to run a uwp app as the UI and have a WPF app as a constant background task without delay, messaging back and forth?
Yes, sort of. You can add a desktop extension component to your UWP app.
#Stefan Wick has written a number of blog posts on the subject and also provided a code sample on GitHub that shows how to extend a UWP app with a "classic" .NET console desktop application that runs as a full trust process.
Please refer to his blog for more information.
The question is asked in a kind of odd shape...
however in WPF you can achive blur effect linke this:
<Grid.Effect>
<BlurEffect Radius="4" KernelType="Gaussian"/>
</Grid.Effect>
The radius changes the "blurynes"
And no you cannot run seperate applications without any draw backs...
you should also check out:
Apply blur to everything behind a chosen container
I think you are looking for Application Packaging Project in Visual Studio. You can find the examples on MS blog: https://blogs.windows.com/buildingapps/2017/12/04/extend-desktop-application-windows-10-features-using-new-visual-studio-application-packaging-project/#KeIh8l8WoJ5OLGkE.97
I am creating my first Cross-Platform Xamarin Forms application (PCL) using VS 2015. Application needs some native views/controls so I decided to use PageRenderer. I know, I cannot override Activity operations (onBackPressed, finish, onResume) in PageRenderer for Android project. So is there any alternative to achieve same functionality? For example, I need to start some animation in onResume and want to show some messagebox in onBackPressed operation.
Please guide me.
Also existing native application used xml files for offline data support. Will it be a good option to use SQLite with Xamarin Forms (cross-platform) application for storing data? Please need expert opinion.
I'm trying to play multiple sounds simultaneously on a Windows Phone 8.1 Runtime app using SharpDX but it has quite a few drawbacks (instability, difficult to maintain and an annoying background noise whenever the XAudio engine is running). I really want to use the SoundEffect class in the XNA framework but it's only available in Silverlight.
My question is, can I add a Silverlight class library to my solution, create a custom class which wraps around the XNA framework libraries and then use this custom class in my main Runtime project to play the sounds? Or is there any other way to make this work?
You cannot reference a XNA class in a Windows Phone 8.1 XAML project and there is no way to write a wrapper (because that would mean referencing it in a Windows Phone 8.1 XAML project). You just have to find a solution that does not use XNA.
I'm trying to change Windows 8.1 (desktop) lock screen image from WPF application.
I've found solution with Windows SDK approach, but it uses runtime application as example (actually, all information I've found was regarding to WinRT apps). But I don't want to use WinRT - all I want is to use LockScreen class in plain old WPF.
After all I have managed to do this in the WPF app several times. This included:
1) manually adding <TargetPlatformVersion/>8.1</TargetPlatformVersion> into .csproj as suggested here;
2) adding references to Windows and System.Runtime.WindowsRuntime as suggested ibid;
3) following these steps to change lock screen background
Then I've faced the problem with platform - application does what it should only with x64 platform (not anyCPU). And not each time (I could not determine consistency yet).
Any way I think that I am over-complicating the solution. Does anyone have other suggestions? Is there any other simpler/cleaner way to change Windows 8.1 lock screen image via WPF application?