Set Android Location from Xamarin Dependancy Service Get link Facebook X Pinterest Email Other Apps December 20, 2017 var documentsPath = (Android.OS.Environment.GetExternalStoragePublicDirectory("Drive Files")); Get link Facebook X Pinterest Email Other Apps Comments
Listview SelectedItem in MVVM August 12, 2019 Create Helper class named ListViewBehaviours ------------------------------- ListViewBehaviours.cs public class ListViewBehaviours : Behavior<ListView> { public static readonly BindableProperty CommandProperty = BindableProperty.Create( propertyName: "Command", returnType: typeof(ICommand), declaringType: typeof (ListViewBehaviours)); public ICommand Command { get { return (ICommand)GetValue(CommandProperty); } set { SetValue(CommandProperty, value); } } protected override void OnAttachedTo(ListView bindable) { base.OnAttachedTo(bindable); bindable.ItemSelected += Bindable_ItemSelected; bindable.BindingContextChanged += Bindable_BindingContextChanged; } private void Bindable_BindingContextChanged(object sender, EventArgs e) { var lv = sender as ListView; BindingContext = lv?.BindingContext; } private void Bindable_ItemSelected(object sender, SelectedItemChangedEv... Read more
Button click event with current object from listview having button August 08, 2019 XAML <StackLayout.GestureRecognizers> <TapGestureRecognizer Command="{Binding Path=BindingContext.OnReadMoreClicked, Source={x:Reference Page}}" CommandParameter="{Binding .}" /> </StackLayout.GestureRecognizers> ----------------------------------- In ViewModel private Command<object> _onReadMoreClicked; public Command<object> OnReadMoreClicked { get {return _onReadMoreClicked ?? (_onReadMoreClicked = new Command<object>((currentObject) => GetDetailsforRead(currentObject) )); } } Read more
SideMenu React native June 14, 2019 import React, { Component } from 'react'; import { StyleSheet, Platform, View, Text, Image, TouchableOpacity, YellowBox, Dimensions } from 'react-native'; import { DrawerNavigator } from 'react-navigation'; import { StackNavigator } from 'react-navigation' class HamburgerIcon extends Component { toggleDrawer = () => { console.log(this.props.navigationProps); this.props.navigationProps.toggleDrawer(); } render() { return ( <View style={{ flexDirection: 'row' }}> <TouchableOpacity onPress={this.toggleDrawer.bind(this)} > <Image source={{ uri: 'https://reactnativecode.com/wp-content/uploads/2018/04/hamburger_icon.png' }} style={{ width: 25, height: 25, marginLeft: 5 }} /> ... Read more
Comments
Post a Comment