Click here to Skip to main content
15,887,596 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralMessage Closed Pin
24-May-19 21:37
Member 1446847024-May-19 21:37 
GeneralRe: how to open dll file Pin
Dave Kreskowiak25-May-19 5:35
mveDave Kreskowiak25-May-19 5:35 
GeneralRe: how to open dll file Pin
Eddy Vluggen12-Jun-19 1:16
professionalEddy Vluggen12-Jun-19 1:16 
GeneralRe: how to open dll file Pin
Richard Deeming12-Jun-19 3:37
mveRichard Deeming12-Jun-19 3:37 
GeneralRe: how to open dll file Pin
Richard MacCutchan25-May-19 5:52
mveRichard MacCutchan25-May-19 5:52 
QuestionMessage Closed Pin
21-Apr-19 6:53
Member 1432178121-Apr-19 6:53 
AnswerRe: 阿萨德群无若群无若无群若 Pin
Richard Andrew x6421-Apr-19 7:32
professionalRichard Andrew x6421-Apr-19 7:32 
QuestionPassing Value from XAML to ViewModel Pin
Jassim Rahma20-Apr-19 13:45
Jassim Rahma20-Apr-19 13:45 
Hi,

I am using Syncfusion in my project and I am showing this ListView:
XML
<SyncfusionListView:SfListView x:Name="ListViewNewItemLocations" SelectionBackgroundColor="Transparent" IsVisible="False" IsScrollBarVisible="false" AutoFitMode="Height" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" ItemAppearing="ListViewNewItemLocations_ItemAppearing" ItemTapped="ListViewNewItemLocations_ItemTapped">
    <SyncfusionListView:SfListView.ItemTemplate>
        <DataTemplate>
            <Frame BorderColor="Black" CornerRadius="25" HasShadow="False">
                <StackLayout>
                    <Label Margin="0,0,0,0" Text="{Binding country_name}" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" TextColor="Black" HorizontalTextAlignment="Start"  FontSize="15" LineBreakMode="WordWrap" />
                    <Label Margin="0,0,0,0" Text="{Binding location_address}" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" TextColor="Black" HorizontalTextAlignment="Start"  FontSize="15" LineBreakMode="WordWrap" />
                    <Label Margin="0,0,0,0" Text="{Binding telephone}" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" TextColor="Black" HorizontalTextAlignment="Start"  FontSize="15" LineBreakMode="WordWrap" />

<pre>
                <Grid HorizontalOptions="FillAndExpand">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>

                    <Syncfusionbuttons:SfButton x:Name="ButtonNewItemLocationEdit2" IsVisible="False" BackgroundColor="Brown" Text="Edit" Grid.Column="0" CornerRadius="25" />
                    <Syncfusionbuttons:SfButton x:Name="ButtonNewItemLocationEdit" Clicked="ButtonNewItemLocationEdit_Clicked_1" ClassId="abcd" BackgroundColor="Brown" Text="Edit" Grid.Column="0" CornerRadius="25" Command="{Binding Path=BindingContext.TapCommand, Source={x:Reference ListViewNewItemLocations}}" CommandParameter="{Binding LocationModel.ItemLocationID}" />
                    <Syncfusionbuttons:SfButton x:Name="ButtonNewItemLocationDelete" IsVisible="{Binding IsDeleteVisible}" BackgroundColor="Red" Text="Delete" Grid.Column="1" CornerRadius="25" />
                </Grid>
            </StackLayout>
        </Frame>
    </DataTemplate>
</SyncfusionListView:SfListView.ItemTemplate>




and I have I have a ViewModel like this:
C#
using System;
using System.Collections.Generic;
using System.Text;
using Syncfusion.ListView.XForms;
using Syncfusion.XForms.PopupLayout;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Threading.Tasks;
using Xamarin.Forms;

namespace Zeera
{
    public class ViewModelItemLocation : INotifyPropertyChanged
    {
        public Command<object> TapCommand { get; set; }
        SfPopupLayout popupLayout;

        public event PropertyChangedEventHandler PropertyChanged;

        public void OnPropertyChanged(string name)
        {
            if (this.PropertyChanged != null)
                this.PropertyChanged(this, new PropertyChangedEventArgs(name));
        }

        public ViewModelItemLocation()
        {
            TapCommand = new Command<object>(EditButtonTapped);
        }

        private void EditButtonTapped(object obj)
        {
            popupLayout = new SfPopupLayout();
            popupLayout.PopupView.HeightRequest = 500;
            popupLayout.PopupView.WidthRequest = 300;
            // popupLayout.BindingContext = ModelBinding;

            popupLayout.PopupView.ContentTemplate = new DataTemplate(() =>
            {

                var mainStack = new StackLayout();
                mainStack.BackgroundColor = Color.AliceBlue;

                var image = new Image();
                image.SetBinding(Image.SourceProperty, new Binding("ContactImage"));

                var grid = new Grid();
                var NameLabel = new Label()
                {
                    Text = "Customer Name  "
                };

                NameLabel.HorizontalOptions = LayoutOptions.Start;

                var label1 = new Entry()
                {

                };

                label1.SetBinding(Entry.TextProperty, new Binding("ContactName"));
                label1.HorizontalOptions = LayoutOptions.Start;

                var NumberLabel = new Label()
                {
                    Text = "HERE LOCATIO ID"
                };
                NumberLabel.HorizontalOptions = LayoutOptions.Start;

                var label2 = new Entry()
                {

                };

                label2.SetBinding(Entry.TextProperty, new Binding("ContactNumber"));
                label2.HorizontalOptions = LayoutOptions.Start;

                grid.Children.Add(NameLabel, 0, 0);
                grid.Children.Add(label1, 1, 0);
                grid.Children.Add(NumberLabel, 0, 1);
                grid.Children.Add(label2, 1, 1);

                mainStack.Children.Add(image);
                mainStack.Children.Add(grid);

                return mainStack;
            });

            popupLayout.PopupView.ShowHeader = false;
            popupLayout.PopupView.ShowFooter = false;
            popupLayout.HeightRequest = 500;
            popupLayout.WidthRequest = 500;
            popupLayout.Show();
        }
    }
}

I have a questions here: How can I pass item_location_id (binded to the SfListView) to the ViewModelItemLocation and then show it in the NumberLabel (created in the ViewModelItemLocation code behind)

Thanks,
Jassim

www.softnames.com

AnswerRe: Passing Value from XAML to ViewModel Pin
Gerry Schmitz21-Apr-19 5:56
mveGerry Schmitz21-Apr-19 5:56 
QuestionWriting unit tests for two methods of the same Service are being called in one method: FluentAssertions Pin
simpledeveloper19-Apr-19 14:32
simpledeveloper19-Apr-19 14:32 
AnswerRe: Writing unit tests for two methods of the same Service are being called in one method: FluentAssertions Pin
Gerry Schmitz21-Apr-19 6:08
mveGerry Schmitz21-Apr-19 6:08 
GeneralRe: Writing unit tests for two methods of the same Service are being called in one method: FluentAssertions Pin
simpledeveloper21-Apr-19 16:58
simpledeveloper21-Apr-19 16:58 
GeneralRe: Writing unit tests for two methods of the same Service are being called in one method: FluentAssertions Pin
Gerry Schmitz22-Apr-19 4:36
mveGerry Schmitz22-Apr-19 4:36 
GeneralRe: Writing unit tests for two methods of the same Service are being called in one method: FluentAssertions Pin
simpledeveloper22-Apr-19 7:07
simpledeveloper22-Apr-19 7:07 
GeneralRe: Writing unit tests for two methods of the same Service are being called in one method: FluentAssertions Pin
Gerry Schmitz22-Apr-19 8:28
mveGerry Schmitz22-Apr-19 8:28 
GeneralRe: Writing unit tests for two methods of the same Service are being called in one method: FluentAssertions Pin
simpledeveloper22-Apr-19 8:55
simpledeveloper22-Apr-19 8:55 
Question“Collection was modified; enumeration operation might not execute” inside System.Data.TypedTableBase<> Pin
VictorSotnikov9-Apr-19 5:52
VictorSotnikov9-Apr-19 5:52 
AnswerRe: “Collection was modified; enumeration operation might not execute” inside System.Data.TypedTableBase<> Pin
Gerry Schmitz9-Apr-19 6:15
mveGerry Schmitz9-Apr-19 6:15 
GeneralRe: “Collection was modified; enumeration operation might not execute” inside System.Data.TypedTableBase<> Pin
VictorSotnikov9-Apr-19 6:28
VictorSotnikov9-Apr-19 6:28 
GeneralRe: “Collection was modified; enumeration operation might not execute” inside System.Data.TypedTableBase<> Pin
Gerry Schmitz10-Apr-19 5:39
mveGerry Schmitz10-Apr-19 5:39 
GeneralRe: “Collection was modified; enumeration operation might not execute” inside System.Data.TypedTableBase<> Pin
David A. Gray3-May-19 7:33
David A. Gray3-May-19 7:33 
GeneralRe: “Collection was modified; enumeration operation might not execute” inside System.Data.TypedTableBase<> Pin
Gerry Schmitz3-May-19 8:48
mveGerry Schmitz3-May-19 8:48 
Questionregarding the cryptarithmatic code in your website Pin
Member 141248901-Apr-19 4:32
Member 141248901-Apr-19 4:32 
AnswerRe: regarding the cryptarithmatic code in your website Pin
Richard MacCutchan1-Apr-19 4:42
mveRichard MacCutchan1-Apr-19 4:42 
QuestionIs there any way to initialize or set values for this declaration as inline statement private IList<MockData<OnlineRegistration, OnlineRegistration, OnlineRegistration>> _registerMocks; Pin
simpledeveloper28-Mar-19 7:18
simpledeveloper28-Mar-19 7:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.