Image click event in xamarin forms. Xaml: <Image Source="imageName.

Image click event in xamarin forms. iOS project, double-click Assets. 👉FOLLO Apr 13, 2018 · I gave my svg a tap gesture to get it working like a button. Image TapGestureRecognizer not firing. answered Jul 25, 2017 at 8:17. Jul 30, 2015 · Here is my current code for loading the Image: System. CollectionView is a view for presenting lists of data using different layout specifications. Tapped += Tgr_Tapped; this. One solution involves a few steps: Make the AbsoluteLayout larger by some amount. private ImageSource _imageSource; public ImageSource ImageSource. ProjectName. Put it on your preferred location for projects and click "Create". Add the following code inside the ContentPage to add a load image button and Image Viewer container. GestureRecognizers> tags in order to give image a clickable property and in code behind we will be handling inside TapGestureRecognizer_Tapped_1 methods. – Jan 20, 2021 · Xamarin forms: Selected picture is not showing in UI from gallery and camera for IOS 0 How can I get the width and height of an Image picked from gallery after cropping in it Image view Aug 7, 2023 · ValueChanged event. Forms from local files or resources (UI) Xamarin. As you know, Xamarin forms have no event or gesture recognizer for longpress. It aims to provide a more flexible, and performant alternative to ListView. In Solution Pad, in the PopupsTutorial project, double-click MainPage. resourceImage. png , all lowercase , no spaces or special char on both android and ios. Create a Resource folder in your Xamarin. You can write wrapper (decorator) for Pin class: public int Index {get; set;} public Pin Pin {get; set;} Then use this class in PopulateMap() method: for (int index = 0; index < places. On iOS, the WkWebViewRenderer has a constructor overload that accepts a WkWebViewConfiguration argument. 0. Apr 1, 2020 · Follow the steps below. IE, Then in your code behind file, // Assuming your list ItemsSource is a list of strings. ListView is a view for presenting lists of data, especially long lists that require scrolling. ItemSelected events. Apr 23, 2017 · Surfing the internet I found the solution. GestureRecognizer property is a collection of gesture recognizers associated with an specific graphic control, in this case, the Image. Nov 6, 2019 · In Xaml, We give image a reference name and assign a image from file in Xaml. Nov 28, 2016 · You can call DoSomething by event handler or any other place in your code void OnLoginButtonClicked(object sender, EventArgs e) { DoSomething (); } private void DoSomething() { //Click code here. using System; at the top of your file in order to use EventArgs. Approach 2: Rotate image with animation. Oct 13, 2021 · TouchAction event triggered overall entrire position of view, but in my case it triggered only in image area using AbsoluteLayout? But now it covered overall entire position of the view. And by clicking on the "Next Page" button, you are navigated to the next page. Forms element. Forms Quickstart Deep Dive. MainPage = new NavigationPage (new MainPage ()); Output on Android and Windows desktop. Pin = new Pin. <ffimageloadingsvg:SvgCachedImage Source="YourImageSource" >. Resources folder. Single – indicates that a single item can be selected, with the selected item being Jul 16, 2020 · I have a collection view of images in my Xamarin Forms Project. For event handler: CurrentItem="{Binding CurrentUpcomingData}" CurrentItemChanged="OnCurrentUpcomingDataChanged">. HorizontalOptions="FillAndExpand". The Label view is used for displaying text, both single and multi-line. The Button responds to a tap or click that directs an application to carry out a particular task. There are few steps which you should reproduce. Download the sample. Forms doc. In previous post on Xamarin Forms we saw How to create and write to a text file, here we will create a Xamarin Forms Button control with Custom Icons and custom controls. Image, create you own ImageWithLongPressGesture class). Place new controls here -->. A tap gesture is used for tap detection and is recognized with the TapGestureRecognizer class. Sep 24, 2020 · Im using Xamarin forms, and on my AppShell, i want 2 tabs, i want to have a clicked event on one of the tabs, so that when clicked on it doesnt load another page but actually execute a function (show an Rg. Xamarin. I want to add onClick event on images to navigate to the respective page of each image. You can use these two events to control the visible ability of your second image. I don't work with iOS so I don't know about it. 2. A DataTemplateSelector can be used to choose a DataTemplate at runtime based on the value of a data-bound property. IsEnabled = true; datePicker. Name your app. Jul 8, 2021 · A gesture recognizer can be added to a control in Xaml using attached properties. Handled = false; in the Touch event. Forms ViewCell is a cell that can be added to a ListView or TableView, which contains a developer-defined view. RelScaleTo applies an animated incremental increase or decrease to the Scale property of a VisualElement. 1) Inherit the control you need the gestures on (i. The click event is not firing to any of these buttons. png} to add item" To display the content as above, try using a StackLayout to wraps the views and set the Orientation to Horizontal. Enjoy!🔔 Subscribe to my YouTube channelhttps://www. jpg" />. <Label x:Name="lblStartDT" Text="startTest". For more information about the . The Rectangle struct contains useful properties and methods for testing intersection and containment of rectangles. Jun 9, 2020 · Longpress Event For Image In Xamarin. Forms application. Add a tap gesture recognizer. Svg. Forms Picker displays a short list of items, from which the user can select an item. Dragging and Translation. Its always best to use . A ToolbarItem instance can have an icon and appear as a primary or secondary menu item. 3. if you want to add gesture to Xamarin. The problem is if I now click the ImageButton of the first item, the wrong file will be deleted because the second item is still selected. For more information, see Xamarin. xaml. SelectionMode property to a value of the ListViewSelectionMode enumeration: Single indicates that a single item can be selected, with the selected item being highlighted. CommunityToolkit Expander control provides an expandable container to host any content. Make it full width and height. When the Expander content is visible the Expander is expanded. You can use the DataTemplate in the ListView and inside the DataTemplate have a Grid then add the UI elements. Tapped="OnImageNameTapped" NumberOfTapsRequired="1" /> </Image. The ToolbarItem class inherits from MenuItem. Nov 17, 2019 · 0. youtub Jul 14, 2022 · Download the sample. png", Content = new StackLayout. Here is the code: public class MainPageViewModel : ViewModelBase. Feb 1, 2021 · A Xamarin. If you don't want to use Commands, you can use the Button's Clicked event. png"> <Image. Absolute, out uri); _companyImage. The navigation experience provided by Xamarin. FromUri (uri); The problem is that the Jul 14, 2021 · The Xamarin. theman@2x. This video lesson demonstrates on how to add and call local image to you XAmarin Forms Application. theman. void OnButtonClicked(object sender, EventArgs args) {. Try this: <ListView x:Name="myListView" ItemsSource="{Binding Contacts}" >. Forms". Add a new property to your Picture Class: public class Picture. Forms - Xamarin Forms Image Resizer. Cancel=true in the event to prevent the browser from completing the navigation. Receiving event Button in a Grid event from outside. 1. CheckBox defines a bool property named IsChecked, which indicates whether the CheckBox is checked. Community. Count; index++) var pinDecorator = new PinDecorator. Sample: "Click this image {img. You also need to specify a BackgroundColor for the Layout. VerticalOptions = LayoutOptions. Displaying images in Xamarin. //Id -> id of the image. Uri uri; System. Aug 25, 2019 · There are two events called DownloadStarted and Finish Occurs before/after every image loading. Forms 4. The following code example shows a PinchGestureRecognizer attached to an Image element: Jun 15, 2015 · The Image class knows where to look to find the file. Forms in your xaml. Core. Suppose I click the name of the second item so that the second item is selected. 4. All select, deselect, update, template and logic is implemented here. Sep 24, 2017 · 3. We will make custom control in which we will add a longpress event and command in the control. Warning. Dec 12, 2020 · A proper loaded event would be called only once after the page content has been loaded and initialized (like WPF or UWP or WinForms) not before the content has even appeared or when I return to the page after popping a modal. Aug 11, 2014 · Also if you want click event on an Image, then you can try Xamarin. I don't want to use image map on the web. <ListView ItemsSource="{Binding models}" HasUnevenRows="True">. How to Add/Generate a button click event in Xamarin. Forms WebView is implemented on iOS by the WkWebView class, which supports faster browsing. You can't. HorizontalOptions="Center". You probably want your project and solution to use the same name as your app. Xaml: <Image Source="imageName. How to handle button click event & how to use command & pass command parameter in Button. The Xamarin. Labs, which provides ImageButton and corresponding click event. <ListView. In order to get this working you have to add a Layout to the ContentPage, as you will want to specify some content, and set the HorizontalOptions and VerticalOptions to LayoutOptions. This enables multiple DataTemplates to be applied to the same type of object, to customize the appearance of particular objects. It's a cross-platform image resizer that works in Xamarin. You can't pass arguments to event handlers. cs: void OnImageNameTapped(object sender, EventArgs args) { try. You have to create a Tap Gesture Recognizer for the image. So create a background element, as MShah already proposed, add one button with an image and another text button. ScrollView objects should not be nested. New lines. For example: <ffimageloadingsvg:SvgCachedImage HeightRequest="100". iOS. TryCreate (imageURI, UriKind. micr Aug 15, 2021 · I have a form with a frame and 3 buttons inside. cs and after InitializeComponent (); you have to declare your navigation page like this. This time when using the CarouselView, I introduce 3 images that are tiles of 1 large image, creating a nice, fluid experience. Toolkit. xaml to open it. NormalProfile. Jul 8, 2021 · The Xamarin. Sep 20, 2022 · Text decorations. Xamarin Forms don't support on hover event. theman@3x. Forms;assembly=FFImageLoading. The ScrollView class derives from the Layout class, and by default scrolls its content vertically. Jul 8, 2021 · The ViewExtensions class provides the following extension methods that can be used to create simple animations: CancelAnimations cancels any animations. Jan 4, 2018 · Put an image in the same grid and set IsVisible to false. Jul 10, 2017 · Xamarin Forms image TapGestureRecognizer command not called. Note: in order to achieve a Walkie Talkie effect you might want to use Device. // (If its a list of some other type of object, just change the type in the (cast)): var stringInThisCell = (string)((Button)sender). how to achieve to only image position area. get { return _imageSource; } Sep 24, 2016 · How can I make main page works like, for each of the attached image, on click it will go to new animal content page. See full list on learn. This stops the Xamarin. Image files can be added to each application project and referenced from Xamarin. This app loads an Jul 8, 2021 · To make a user interface element zoomable with the pinch gesture, create a PinchGestureRecognizer instance, handle the PinchUpdated event, and add the new gesture recognizer to the GestureRecognizers collection on the user interface element. Images. Now, select the blank app and target platforms - Android, iOS and Windows (UWP). Subsequently, go to the solution. May 17, 2019 · Choose the Mobile App (Xamarin. Jul 8, 2021 · Download the sample. Jul 8, 2021 · The Picker view is a control for selecting a text item from a list of data. A ScrollView can only have a single child, although this can be other layouts. BindingContext; Jul 8, 2021 · The Xamarin. However, this behavior can be changed by setting the SelectionMode property value to one of the SelectionMode enumeration members: None – indicates that items cannot be selected. xaml code Since Xamarin. CenterAndExpand, Spacing = 50, Children = {. The following screenshots show a Switch control in its on and off toggle states on iOS and Android: Jan 24, 2020 · Try to define the CurrentItem and then play with the CurrentItemChanged event. Learn more about XForms from here Monday, August 11, 2014 5:10 AM Jun 7, 2017 · The thing is they have no click events, I want each button to have an event that makes the user navigate to the right page depending on which button is clicked. A flyout is the optional root menu for a Shell application, and is fully customizable. On tap of the listview item set the image source to the tapped list view item image and set IsVisible to true. Aug 11, 2017 · I am binding my Listview to a collection from a Viewmodel. Image. Forms Rectangle API. When a user taps an item, two events May 16, 2016 · Well, and Click event is Touch down followed by Touch up. Recently I came up with a great solution. 4, the Xamarin. In Xaml we are going to add < Image . Is there any way to do like this in Xamarin forms, if not how will be the custom render for android/ios Jul 8, 2021 · The SwipeChangingEventArgs object that accompanies this event has a SwipeDirection property, of type SwipeDirection, and an Offset property of type double. TouchEffect provides the LongPressCommand which could help you to achieve the long click event. Output when clicked on the Next Page button. In Solution Explorer, open MainPage. Here is the sample code, you could refer to it. Browse code. Dec 16, 2020 · DateSelectionCommand = new Command(() =>. For Android: Placing images in the Resources/drawable folder, and left-click image and change image property Build action as AndroidResource. This article demonstrates how to create a custom renderer for a ViewCell that's hosted inside a Xamarin. Jul 8, 2021 · The ListView selection mode is controlled by setting the ListView. Transform text. We will use Xamarin Forms MVVM pattern to perform the click events on our Image button. second add the svgImage with a tap gesture. The SwipeEndedEventArgs object that accompanies this event has a SwipeDirection property, of type SwipeDirection, and an IsOpen property of type bool. The Switch class inherits from View. xcassets to open it. In fact you should pass two parameters, so it's not just supposed to be Button_Click (), you should call it like this: Button_Click(null, null) since it needs sender and e as two required parameters, take a look at the method definition: Button_Click (object sender, EventArgs e) {. Oct 20, 2021 · I need to insert an image inside a label in Xamarin forms. com Jul 7, 2017 · on login page. Character spacing. IsVisible = true; datePicker. Each ToolbarItem object will appear as a button in the application's navigation bar. Then let each button press do what you want it do do and adjust the button visuals (color, border, etc) to look as if they would be one thing. Forms application in the Xamarin. GestureRecognizers. eakgul. So you could send whatever is needed as a CommandParameter, keeping your UI and business logic completely separated. I put a button outside the frame and its clickable. CenterAndExpand, HorizontalOptions = LayoutOptions. Forms all derive from the View class. May 22, 2021 · Hello, Welcome to our Microsoft Q&A platform! Xamarin. xaml, remove all of the template code and replace it with the following code: May 22, 2015 · Then in your WebView control wire up the Navigating event, and check if the new url contains "#click". The syntax to add a TapGestureRecognizer to an image is shown below (in this case defining a double tap event): The code for the event handler (in the sample) increments a counter and changes the image from color to black & white. This class makes possible the gesture Jul 22, 2017 · 1. Gets or sets an object that controls the position of the button image and the spacing between the button's image and the button's text. Right click on the page and select View Code or press F7, to bring up the code behind MainPage. This is an example of it (though it uses effect and not custom renderer but those are similar approach Jul 8, 2021 · An effect is ideal for multi-touch finger tracking because it can be attached to any Xamarin. BeginInvokeOnMainThread (or via Prism's IDeviceService ) to invoke consequent actions so the Released event will get called, otherwise the UI thread might be blocked. The solution is to set e. I tried to find the solution and there is no definite answer for it. png. Forms Shell is based on flyouts and tabs. Forms, in PCL, I have custom control, with custom event: public EventHandler OnTapped; public TestGrid() var tgr = new TapGestureRecognizer { NumberOfTapsRequired = 1 }; tgr. Any idea ? thanks ! Given below is the xaml and view model. A single SKMatrix value can consolidate a series of touch operations. Resources:* https://docs. xaml, remove all of the template code and replace it with the following code: Jul 8, 2021 · By default, CollectionView selection is disabled. TabbedPage interited from MultiPage that you can check the source from here. . You can pass the reference of imageButton to the SecondPage too and change the Source in the done method. public Command<int> ImageClickCommand{ get; set; } And in your ViewModel Constructor: ImageClickCommand = new Command<int>((Id) =>. Gets or sets the corner radius for the button, in device-independent units. At least not on iOS. Update the position of the close button to remain in the top right corner of the video Mar 17, 2017 · In Xamarin. I would like to invoke a command in my viewmodel when I click the image in the list item. Sep 26, 2018 · In this tutorial we are going to make image clicked event inside xaml. None indicates that items cannot be selected. Forms 2. One of the most important applications of matrix transforms is touch processing. If so, do your click handling code and call e. Uri. Jun 21, 2018 · When using Xamarin Forms sometimes we have a control in our XAML that changes according to the value of a property in our model. Then, in MainPage. Besides that, calling OnPropertyChanged in a property getter never works, because the PropertyChanged event has to be fired before a binding (or any other consumer) can get a changed property value. So today I came up with a simple solution using Rendering. ValueChanged event will be triggered whenever the current cell’s value has been changed in the GridTextColumn, GridNumericColumn or GridSwitchColumn. Jan 7, 2018 · Xamarin Button Clicked EventHandler. May 18, 2023 · Overview. The views supported by Xamarin. The button will have an Image as an Icon and also will have Commands. microsoft. [x] Naming Convention. The code in PCL: <Image Source="a11. If you want to add the on hover event for a particular platform and particular control you need to create a custom renderer for it. The Bounds property value is assigned during the layout cycle. Views are user-interface objects such as labels, buttons, and sliders that are commonly known as controls or widgets in other graphical programming environments. //You may have to change the Name depending on how you name that handler in xaml. public class ImageWithLongPressGesture : Xamarin. 01/07/2021. There is a very nice article about MVVM and data bindings in official guides about it. BackgroundImage = "background. Forms views are the building blocks of cross-platform mobile user interfaces. MainPage = new ContentPage. Forms touch-tracking effect presented in the article Invoking Events from Effects. FadeTo animates the Opacity property of a VisualElement. GestureRecognizers> <TapGestureRecognizer. {. The SfDataGrid. Focus(); }); This approach advised on Xamarin forums and I expect that when I have clicked on the button connected to the DateSelectionCommand the datepicker should be displayed. You could nest the image in a stacklayout with a white opaque background for the blur effect. Forms ListView control. Add(tgr); private void Tgr_Tapped(object sender, EventArgs e) Jun 30, 2022 · But it fails under these conditions. 10 contributors. Add a tap handler to the image to hide it again. For ios: May 7, 2016 · The type of your Image property should be ImageSource, not Image, as you apparently want to bind an ImageCell's ImageSource property. CellView of the ListView includes an image. FillAndExpand. Platform Touch Events. Forms Switch control is a horizontal toggle button that can be manipulated by the user to toggle between on and off states, which are represented by a boolean value. Nov 2, 2019 · If you want to add images in xamarin. Show 11 more. cs file. Yes, Android has OnCreate. It's accessible through an icon or by swiping from the side of the screen. Labels can have text decorations, colored text, and use custom fonts (families, sizes, and options). png"); By accessing Feb 14, 2019 · Image inside Grid of listview click or tap event. The Button usually displays a short text string indicating a command, but it can also display a bitmap image, or a combination of text and an image. These platforms all distinguish between three basic types of touch events: Nov 17, 2017 · For ios: it has to be in. In Solution Pad, in the CollectionViewTutorial project, double-click MainPage. To handle the click, you can use the event handler or a command. forms, you can take a look the following steps. Forms CheckBox is a type of button that can either be checked or empty. This property is also backed by a BindableProperty Jul 8, 2021 · ScrollView is a layout that's capable of scrolling its content. ItemTemplate>. Jul 8, 2021 · All the samples shown here use the Xamarin. So i need a way to capture the tab clicked event or maybe a command or anything. namespace:FFImageLoading. Forms layout calculations from being repeatedly called during ListView 5. For the image's click event, you could add tap gesture to the image control. FromResource("Images. Add a margin to the video player Frame equal to how much larger the AbsoluteLayout was made. Forms platform. SwipeEnded is fired when a swipe ends. Column : Gets the current GridColumn that Jan 7, 2021 · Xamarin. Then, in the Assets List, right-click and select New Image Set: In the Assets List, select the new image set and the editor will be displayed: Jan 15, 2018 · The best way is to use MVVM, set the BindingContext of your ContentPage to a ViewModel and bind your button's to Command and a CommandParameter. } Update: Of course you have to add. e. Jul 8, 2021 · Therefore, since Xamarin. here is what i have: Sep 28, 2021 · 1. Forms guide. On some platforms (like iOS) there is no such thing as on hover. This code shows how I handle the ImageButton. The Button is the most fundamental interactive control in all of Xamarin. Jan 14, 2019 · Go to App. For more information about local images, see Local images in the Images in Xamarin. first reference the FFImageLoading. I have used following code to create label but I don't know how to create onclick event on it. In Solution Pad, in the ImageTutorial. dll. For more information, see the Xamarin. GestureRecognizers> </Image> Xaml. When only the Expander header is shown, the Expander is collapsed. Popup on top of the current page). } answered Sep 24, 2017 at 15:09. The control has a header and content, and the content is shown or hidden by tapping the Expander header. When a checkbox is empty, it's considered to be off. Sep 20, 2022 · Download the sample. To use a single image across all apps, the same filename must be used on every platform, and it should be a valid Android resource name (which means no spaces and special characters). A modal page can be any of the Page types supported by Xamarin. Code. For internal use by the Xamarin. Picker defines the following properties: CharacterSpacing, of type double, is the spacing between characters of the item displayed by the Picker. Note that onclick handlers don't work on body or document elements in Xamarin Webview. Forms. Oct 16, 2018 · You need to bind the Source property of Image to an ImageSource in MainPage. 0, The events Pressed and Released are offered out of the box (see PR). <ffimageloadingsvg:SvgCachedImage. You suppose to watch CurrentPage property but it has value check if already selected, so you cannot use. Forms Assembly: Xamarin. The flyout consists of an optional header, flyout items, optional menu Aug 7, 2020 · Gesture recognizers can be used to detect user interaction with views in a Xamarin. This is not enough though to handle the taps correctly though. The issue is the close button lies outside the bounds of the <AbsoluteLayout>. Source = ImageSource. And then add the SVG file as Embedded resource. Jun 8, 2022 · The Bounds property is a read-only Rectangle object that represents the space occupied by the control. Click and the ListView. I am trying to avoid event handling in my model. This app loads an image that is embedded as a resource in a shared project, resizes it, and then displays it on the screen. Assets. Let me show you how to do it: In the MainPage xaml, create an ImageButton named MyImageButton: <!--. When registering the Touch event, it is being handled, and therefore, the click event won't be fired. with ios you normally get 3 images of the same image with the following namting convention. These samples relate to the Working with Images in Xamarin. Nov 19, 2016 · There is no click event for the image. This is the default value. VerticalOptions="Center". The user may be able to raise the clicked event using accessibility or keyboard controls when the Button has focus. Mar 11, 2018 · 9. Sep 24, 2018 · After, inside of the previous tag, you must add another tag with the following structure: ControlName. That is, when the button is clicked I want to perform actionA, and when the button is double-clicked I want to perform actionB, and only actionB. With the project created, the references added, and the license set, coding can begin. Forms shared code. I didn't mean to say you didn't know, excuse Nov 12, 2021 · Yes, you can use DataTemplateSelector to achieve this. Forms ToolbarItem class is a special type of button that can be added to a Page object's ToolbarItems collection. GestureRecognizers . The iOS, Android, and Universal Windows Platform all include a low-level API that allows applications to detect touch activity. To display a modal page the application will push it onto the modal stack, where it will become the active page, as shown in the following diagram: To return to the previous page the application will pop the current page from the modal stack, and the new topmost Jan 7, 2021 · Code Sample. In the given sample, I am showing the Name, contact number and Image, I have used the GestureRecognizers on the Image. For example, if we have a Label which property Text has a binding to a string property that represents a Name in a model that we want to be visible only if isn’t empty. And to finish, add the TapGestureRecognizer tag. NET Standard library that gets created, see Anatomy of a Xamarin. . Display text in Xamarin. Instead of creating and using a converter, you can rotate your image using an animation by adding this to the code behind of your view: private YourViewModel _viewModel; Jun 21, 2018 · However what you want to do are actually two buttons which look as one. Usage: Use SvgCachedImage to show the embedded svg image and use TapGestureRecognizer to simulate the button click event. I'm trying to do it this way but it doesn't work: Any ideas of the right way to do it if this is totally wrong? Mar 22, 2017 · In Xamarin Forms: I want to be able to detect both click/tap and double-click/tap, and to be able to perform different actions. Nov 21, 2019 · According to your description, you want to change two image source by check one image source, I suggest you can use binding, I do one sample you can take a look: <StackLayout>. When a checkbox is checked, it's considered to be on. forms) project under C# and Mobile. Mar 9, 2020 · 1. DatePicker datePicker = new DatePicker(); datePicker. <!--. This event handler contains the parameter of type ValueChangedEventArgs that contains the following properties. Forms instead of Android part. The ImageSource object can be obtained from the file stream. Forms shared projects and will resize images on iOS, Android, and the Universal Windows Platform. This enables the renderer to be configured on creation. }); But if you still want to use the Clicked Event, i would sugest you do this change. Forms CollectionView. No property, bindable property, or event found for Apr 17, 2019 · After doing this, your image will appear either rotated or normal depending on the value of the property ShowImageRotated. Forms GestureRecognizer class supports tap, pinch, pan, swipe, and drag and drop gestures on View instances. How to use Buttons in Xamarin Forms using Visual Studio 2019. wh xd ao tl jg em xx ep jm rx
Image click event in xamarin forms. HorizontalOptions="Center".
Snaptube