I have a question about Xamarin Studio. I am building a application that connects with a server to get data from the server. I've made a function for the connection.
Also i've made a second view that opens when the user presses a button. When the view loads i would like to call my connect function to get all the data.
So i would like to know if there is a Load event in Xamarin studio.
This is the function i am looking for:
http://msdn.microsoft.com/en-us/library/system.windows.forms.form.load(v=vs.110).aspx
Thanks in advance
There are several. One of them is ViewDidLoad, which runs after a View has loaded. Xamarin is not a direct port of Windows Forms, which means MSDN will be of little help - you need to learn how iOS works.
However, there is Xamarin Forms, which is a cross-platform UI toolkit that may be the right choice for you. It abstracts away the need for knowing iOS or Android UI details. You may think of it as "Windows Forms for iOS/Android/Phone". Even if you're only ever targetting iOS, Xamarin Forms can help you build an UI.
In this specific case, the "Hello, iOS" Xamarin quickstart tutorial has a good example of responding to events such as a view loading.
Related
I'm building a set of small internal apps for our business. A majority are web based tools. To provide easy access to all of the tools to all our staff. Previously I built small windows applications which are used currently. However, I'm looking to upgrade these to Universal Apps as we can better distribute future applications through our Microsoft Business Store.
Currently when placing a WebView into the UWP app, the app loads and functions as expected in terms of loading the WebView. However I cannot seem to find a means to implement Back / Forward navigation (previously this was a toggled option in the properties group) if a user navigates using Back/Forward on their mouse etc. Any pointers would be greatly appreciated. No doubt it's something quite obvious I haven't spotted.
I was expecting the basic back / forward navigation to work out of the box (as is the case I have experienced previously when developing for other platforms)
The app I'm currently working on is using the UWP with XAML and C# and currently has the WebViews implemented using:
<WebView x:Name="webView" Source="https://app.domain.com"/>
within MainPage.xaml and no further modifications made to this app as it stands.
I regularly use SO as a guest to find answers to questions but I couldn't see a direct answer to this scenario.
Thanks
The WebView class has built-in APIs that could Go Back/Forward. You could add some buttons and call them in the click event.
I am working on android application using xamarin forms. We have a list that is displaying items. Client want to delete the item on swipe, "left to right" vice versa . I have a link that is working for xamarin android that i am share with you Click here . I need same thing for Xamarin form. If anybody have any idea please share with me. Thank you.
Currently the Xamarin Forms support only a specific set of gestures.
Those are Pan, Tap and Pich. It does not support Swipe.
You can go and create these events in your native projects and expose via a Renderer.
Or you can use the MR.Gestures which has all the events you need.
The XLabs project has gestures, which you can use. More discussion about it can be found in this forum thread.
This a good tutorial - Gesture Recognizers with Xamarin.Forms you can look into if you are trying to build your own gesture recognizes.
There is 2 good solutions provided to this SO Question - Xamarin Forms Swipe Left/Swipe Right Gestures.
I am learning how to use Xamarin forms and I want to implement (push) notifications on Xamarin Forms. I have googled but to no avail. Does anyone know how to implement Local/Push notifications with Xamarin Forms? I am going to use an actual server at a later date but for now just showing a notification when I, for example, press a button, is totally OK for me.
Thanks for your help!
edit:
I am now using the DependencyService to access the Device OS's notification system instead of trying to use Xamarin Forms itself. Answers on this question are not necessary anymore!
Xamarin's documentation includes a guide to notifications:
https://developer.xamarin.com/guides/cross-platform/application_fundamentals/notifications/
It covers both local and remote notifications, including recommendations for libraries (e.g., PushSharp, UrbanAirship) to handle sending push notifications.
You can use https://www.nuget.org/packages/Xam.Plugins.Notifier plugin for local notifications. This is one of the best plugin I've used with Xamarin Forms.
You can also try local notification plug-in for Xamarin Forms https://www.nuget.org/packages/Plugin.LocalNotification/. It has more features and look at the source code if you are implementing your own version.
Ok, I have a question to which, despite my best efforts, I have not been able to solve. I searched the internet, and this is one of those that is particularly difficult to search for, but it seems that no user of Windows 8.1 nor any developers developing for Windows 8.1 has posted to any website asking how to do this (I could be wrong, of course).
What I am trying to do is make a Windows Store app targeting Windows 8.1, that takes advantage of multiple Windows. To see what I mean, open up metro ie, right click on a tab, and click "open in new window." This is also in the mail app, where you can open a single message in another window, which behaves like a separate app, and can be snapped like so. It's a new feature of the Windows 8.1 OS.
But I can't for the life of me figure out how to do it in C# and XAML. Does anyone know how? Thanks.
Alex
There are new APIs in Windows.UI.ViewManagement, namely the ApplicationViewSwitcher and ProjectionManager classes. The former is for working with multiple independent views that the user can arrange side by side on whatever monitors they have, which is what IE and Mail use; the latter is for working with multiple monitors.
See the Application Views sample along with the Projection sample for working both scenarios in code.
Might be bit late with my answer, nevertheless I had your similar apprehensions about the "Dismal Support Refs" for this subject, when I first began searching the topic. However I have been able to overcome this and use the feature in my apps. There are some good refs available; The Windows Dev Centre has a Quickstart ie "Quiskstart Creating Multiple Windows", a Good guide is the "MultipleViews" Sample, With the following providing additional support.
1) "Be two places at once using multiple windows" at
https://blogs.windows.com/buildingapps/2014/01/09/be-two-places-at-once-using-multiple-windows/#pBHiQtDSPFrCA7Gv.97
2) "MultipleViews for Windows 8.1 apps" (parts 1-3)
http://www.kraigbrockschmidt.com/2013/11/21/multiple-views-creating-view/
BQ at WATERVIEW
I want to write a desktop gadget that will group icons on my desktop (using c# & WPF).
It will be a docked window that I can drag icons to it and they will stay their. Also there can be couple of this windows.
Where do I begin?
**I saw all the post here about it but I got lost. Please direct me to examples and explanation pages.
To expand on cevik's answer:
You cannot create WPF applications as gadgets BUT you have two options (which aren't as bad as you'd expect).
The reason is that widgets are composed mainly of web pages (HTML) and not executable (*.exe).
The problem of course is that WPF will only work with & produce executables.
First option - Windows API:
When I said you can't what I really meant is you can't use the Windows Vista/7 gadget platform to make your widgets.
However, you can always achieve a similar effect by using the Windows API.
The Windows API will let you do stuff to windows such as making them always on the background of other programs, which sounds to me like ~80% there (The rest would be stuff like making sure your window doesn't get re-sized or minimized, etc.).
Just as a note, the function you'd be looking for to make the window behind all other windows would be SetWindowPos (specifically the second parameter).
However make sure there isn't a library which already implements these stuff because it can be rather difficult (and consist of A LOT of surprises).
Second option - Silverlight
silverlight can be perceived as WPF for the web.
That obviously solves our problem.
However there is a cost to it, as expected.
Silverlight doesn't have all the features WPF has (possibly not all of the .NET framework as-well, not sure about that as I'm not really using it).
However it should be more than enough to get you by so you should definitely check it out.
Once you have your Silverlight application (and webpage) you'll have to create a manifest & install the gadget to your desktop. See here how to do so.
Maybe this will help you.
Template to easily get started on developing a Sideber Gadget using Silverlight 3.0 or 4.0 controls in C#.