Commanding property not found on viewmodel xamarin?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
While i tried to implement a simple command to raise property of progress bar within listview through command fired in viewmodel assing to this page. I don't know what to do next becouse the progress bar don't increment when i'm call command from imagebutton assing to same object ?.
Output after clicking imagebutton
Bidning: 'IncrementCommand property not found on AppDemo.Models.SampleObject, target property XamarinForms.ImageButtonCommand'
A code from Viewmodel:
public ICommand IncrementCommand { get; }
public MainViewModel(IPageServices pageServices)
{
this._pageServices = pageServices;
Wastes = GetObjects();
IncrementCommand = new Command(async () => await IncrementObject());
}
async Task IncrementObject()
{
await objectServices.IncrementObject(object);
OnPropertyChanged("SampleCounter");
}
Code from service where Task is called
public Task IncrementObject(ObjectModel object)
{
object.ObjectCounter += .1;
return objectRepository.Save(object);
}
Model inherit INotifyPropertyChanged from Observable object
public class SampleModel: ObservableObject
{
public int? Id { get; set; }
public string SampleIcon{ get; set; }
public double SampleCounter{ get; set; }
}
Code from MainPage xaml file
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="3*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<ProgressBar x:Name="progressBar"
Grid.RowSpan="2" Grid.Row="0" Grid.Column="0"
BackgroundColor="Transparent"
ProgressColor="#614c96"
Progress="{Binding ObjectCounter}"
/>
<ImageButton x:Name="iconButton"
Grid.Column="1" Grid.Row="0" Grid.RowSpan="2"
WidthRequest="100"
HeightRequest="100"
Aspect="AspectFit"
BackgroundColor="Transparent"
Source="{Binding ObjectIcon}"
Command="{x:Binding IncrementCommand}">
</ImageButton>
</Grid>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
Coede form page code-behind
public MainPage()
{
InitializeComponent();
var pageServices = new PageServices();
BindingContext = new MainViewModel(pageServices);
}
Can i ask for some explenation of my mistake ? Thank you
c# xamarin mvvm xamarin.forms command
add a comment |
While i tried to implement a simple command to raise property of progress bar within listview through command fired in viewmodel assing to this page. I don't know what to do next becouse the progress bar don't increment when i'm call command from imagebutton assing to same object ?.
Output after clicking imagebutton
Bidning: 'IncrementCommand property not found on AppDemo.Models.SampleObject, target property XamarinForms.ImageButtonCommand'
A code from Viewmodel:
public ICommand IncrementCommand { get; }
public MainViewModel(IPageServices pageServices)
{
this._pageServices = pageServices;
Wastes = GetObjects();
IncrementCommand = new Command(async () => await IncrementObject());
}
async Task IncrementObject()
{
await objectServices.IncrementObject(object);
OnPropertyChanged("SampleCounter");
}
Code from service where Task is called
public Task IncrementObject(ObjectModel object)
{
object.ObjectCounter += .1;
return objectRepository.Save(object);
}
Model inherit INotifyPropertyChanged from Observable object
public class SampleModel: ObservableObject
{
public int? Id { get; set; }
public string SampleIcon{ get; set; }
public double SampleCounter{ get; set; }
}
Code from MainPage xaml file
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="3*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<ProgressBar x:Name="progressBar"
Grid.RowSpan="2" Grid.Row="0" Grid.Column="0"
BackgroundColor="Transparent"
ProgressColor="#614c96"
Progress="{Binding ObjectCounter}"
/>
<ImageButton x:Name="iconButton"
Grid.Column="1" Grid.Row="0" Grid.RowSpan="2"
WidthRequest="100"
HeightRequest="100"
Aspect="AspectFit"
BackgroundColor="Transparent"
Source="{Binding ObjectIcon}"
Command="{x:Binding IncrementCommand}">
</ImageButton>
</Grid>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
Coede form page code-behind
public MainPage()
{
InitializeComponent();
var pageServices = new PageServices();
BindingContext = new MainViewModel(pageServices);
}
Can i ask for some explenation of my mistake ? Thank you
c# xamarin mvvm xamarin.forms command
the BindingContext for each item in your ListView is SampleModel, not the ViewModel
– Jason
Jan 4 at 16:19
add a comment |
While i tried to implement a simple command to raise property of progress bar within listview through command fired in viewmodel assing to this page. I don't know what to do next becouse the progress bar don't increment when i'm call command from imagebutton assing to same object ?.
Output after clicking imagebutton
Bidning: 'IncrementCommand property not found on AppDemo.Models.SampleObject, target property XamarinForms.ImageButtonCommand'
A code from Viewmodel:
public ICommand IncrementCommand { get; }
public MainViewModel(IPageServices pageServices)
{
this._pageServices = pageServices;
Wastes = GetObjects();
IncrementCommand = new Command(async () => await IncrementObject());
}
async Task IncrementObject()
{
await objectServices.IncrementObject(object);
OnPropertyChanged("SampleCounter");
}
Code from service where Task is called
public Task IncrementObject(ObjectModel object)
{
object.ObjectCounter += .1;
return objectRepository.Save(object);
}
Model inherit INotifyPropertyChanged from Observable object
public class SampleModel: ObservableObject
{
public int? Id { get; set; }
public string SampleIcon{ get; set; }
public double SampleCounter{ get; set; }
}
Code from MainPage xaml file
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="3*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<ProgressBar x:Name="progressBar"
Grid.RowSpan="2" Grid.Row="0" Grid.Column="0"
BackgroundColor="Transparent"
ProgressColor="#614c96"
Progress="{Binding ObjectCounter}"
/>
<ImageButton x:Name="iconButton"
Grid.Column="1" Grid.Row="0" Grid.RowSpan="2"
WidthRequest="100"
HeightRequest="100"
Aspect="AspectFit"
BackgroundColor="Transparent"
Source="{Binding ObjectIcon}"
Command="{x:Binding IncrementCommand}">
</ImageButton>
</Grid>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
Coede form page code-behind
public MainPage()
{
InitializeComponent();
var pageServices = new PageServices();
BindingContext = new MainViewModel(pageServices);
}
Can i ask for some explenation of my mistake ? Thank you
c# xamarin mvvm xamarin.forms command
While i tried to implement a simple command to raise property of progress bar within listview through command fired in viewmodel assing to this page. I don't know what to do next becouse the progress bar don't increment when i'm call command from imagebutton assing to same object ?.
Output after clicking imagebutton
Bidning: 'IncrementCommand property not found on AppDemo.Models.SampleObject, target property XamarinForms.ImageButtonCommand'
A code from Viewmodel:
public ICommand IncrementCommand { get; }
public MainViewModel(IPageServices pageServices)
{
this._pageServices = pageServices;
Wastes = GetObjects();
IncrementCommand = new Command(async () => await IncrementObject());
}
async Task IncrementObject()
{
await objectServices.IncrementObject(object);
OnPropertyChanged("SampleCounter");
}
Code from service where Task is called
public Task IncrementObject(ObjectModel object)
{
object.ObjectCounter += .1;
return objectRepository.Save(object);
}
Model inherit INotifyPropertyChanged from Observable object
public class SampleModel: ObservableObject
{
public int? Id { get; set; }
public string SampleIcon{ get; set; }
public double SampleCounter{ get; set; }
}
Code from MainPage xaml file
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="3*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<ProgressBar x:Name="progressBar"
Grid.RowSpan="2" Grid.Row="0" Grid.Column="0"
BackgroundColor="Transparent"
ProgressColor="#614c96"
Progress="{Binding ObjectCounter}"
/>
<ImageButton x:Name="iconButton"
Grid.Column="1" Grid.Row="0" Grid.RowSpan="2"
WidthRequest="100"
HeightRequest="100"
Aspect="AspectFit"
BackgroundColor="Transparent"
Source="{Binding ObjectIcon}"
Command="{x:Binding IncrementCommand}">
</ImageButton>
</Grid>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
Coede form page code-behind
public MainPage()
{
InitializeComponent();
var pageServices = new PageServices();
BindingContext = new MainViewModel(pageServices);
}
Can i ask for some explenation of my mistake ? Thank you
c# xamarin mvvm xamarin.forms command
c# xamarin mvvm xamarin.forms command
asked Jan 4 at 16:02
michal_Gizamichal_Giza
93
93
the BindingContext for each item in your ListView is SampleModel, not the ViewModel
– Jason
Jan 4 at 16:19
add a comment |
the BindingContext for each item in your ListView is SampleModel, not the ViewModel
– Jason
Jan 4 at 16:19
the BindingContext for each item in your ListView is SampleModel, not the ViewModel
– Jason
Jan 4 at 16:19
the BindingContext for each item in your ListView is SampleModel, not the ViewModel
– Jason
Jan 4 at 16:19
add a comment |
1 Answer
1
active
oldest
votes
Your code and the error message is not consistent. I'm going to assume that in this error:
Bidning: 'IncrementCommand property not found on AppDemo.Models.SampleObject, target property XamarinForms.ImageButtonCommand'
SampleObject
is now named SampleModel
.
Like Jason pointed out in a comment, the binding context for each item in your list is different than the binding context for the whole page. Whenever you use a list, the binding context of each item will be scoped to the item in that cell.
To be able to reach something outside of that, you will have to use a reference. First, give a name to your ListView
like this: <ListView x:Name="MyListView" ...>
.
Then, for your ImageButton
, change the Command
to be this: <ImageButton Command="{Binding Source={x:Reference MyListView}, Path=BindingContext.IncrementCommand}">
By adding the source and referencing the ListView
, we now scope the binding to whatever we specify in Path
. So we suddenly can access the properties of the ListView
and access its BindingContext
(being the SampleModel
) and inside that context access the command we are after, in this case, IncrementCommand
.
Does that make sense?
Thank you , i really appreciate your answear. But it's comes out with unhandled exception about object referenced after clicking a imagebutton :(
– michal_Giza
Jan 4 at 18:54
What is the code in the command? And what is the exact exception message?
– Gerald Versluis
Jan 4 at 19:11
Command calls IncrementObject Task which calls service Task InceremntObject. code i posted with this question showing it
– michal_Giza
Jan 4 at 19:29
Did you put in a breakpoint? My guess isobject
is null right now. Change yourImageButton
to this:<ImageButton Command="{Binding Source={x:Reference MyListView}, Path=BindingContext.IncrementCommand}" CommandParameter="{Binding .}">
. By adding theCommandParameter
you specify what is supplied as a parameter for your command. So, the value of yourobject
parameter.{Binding .}
indicates that you want to supply the whole object that is bound to your cell as a parameter.
– Gerald Versluis
Jan 4 at 19:34
Commanding as followed your explanation works well but my code somewhere is missing something becouse i tried with simply DisplayAlert Dialog after clicking on this and work as expected :) Thank you very much for your time
– michal_Giza
Jan 4 at 19:36
|
show 3 more comments
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54042369%2fcommanding-property-not-found-on-viewmodel-xamarin%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Your code and the error message is not consistent. I'm going to assume that in this error:
Bidning: 'IncrementCommand property not found on AppDemo.Models.SampleObject, target property XamarinForms.ImageButtonCommand'
SampleObject
is now named SampleModel
.
Like Jason pointed out in a comment, the binding context for each item in your list is different than the binding context for the whole page. Whenever you use a list, the binding context of each item will be scoped to the item in that cell.
To be able to reach something outside of that, you will have to use a reference. First, give a name to your ListView
like this: <ListView x:Name="MyListView" ...>
.
Then, for your ImageButton
, change the Command
to be this: <ImageButton Command="{Binding Source={x:Reference MyListView}, Path=BindingContext.IncrementCommand}">
By adding the source and referencing the ListView
, we now scope the binding to whatever we specify in Path
. So we suddenly can access the properties of the ListView
and access its BindingContext
(being the SampleModel
) and inside that context access the command we are after, in this case, IncrementCommand
.
Does that make sense?
Thank you , i really appreciate your answear. But it's comes out with unhandled exception about object referenced after clicking a imagebutton :(
– michal_Giza
Jan 4 at 18:54
What is the code in the command? And what is the exact exception message?
– Gerald Versluis
Jan 4 at 19:11
Command calls IncrementObject Task which calls service Task InceremntObject. code i posted with this question showing it
– michal_Giza
Jan 4 at 19:29
Did you put in a breakpoint? My guess isobject
is null right now. Change yourImageButton
to this:<ImageButton Command="{Binding Source={x:Reference MyListView}, Path=BindingContext.IncrementCommand}" CommandParameter="{Binding .}">
. By adding theCommandParameter
you specify what is supplied as a parameter for your command. So, the value of yourobject
parameter.{Binding .}
indicates that you want to supply the whole object that is bound to your cell as a parameter.
– Gerald Versluis
Jan 4 at 19:34
Commanding as followed your explanation works well but my code somewhere is missing something becouse i tried with simply DisplayAlert Dialog after clicking on this and work as expected :) Thank you very much for your time
– michal_Giza
Jan 4 at 19:36
|
show 3 more comments
Your code and the error message is not consistent. I'm going to assume that in this error:
Bidning: 'IncrementCommand property not found on AppDemo.Models.SampleObject, target property XamarinForms.ImageButtonCommand'
SampleObject
is now named SampleModel
.
Like Jason pointed out in a comment, the binding context for each item in your list is different than the binding context for the whole page. Whenever you use a list, the binding context of each item will be scoped to the item in that cell.
To be able to reach something outside of that, you will have to use a reference. First, give a name to your ListView
like this: <ListView x:Name="MyListView" ...>
.
Then, for your ImageButton
, change the Command
to be this: <ImageButton Command="{Binding Source={x:Reference MyListView}, Path=BindingContext.IncrementCommand}">
By adding the source and referencing the ListView
, we now scope the binding to whatever we specify in Path
. So we suddenly can access the properties of the ListView
and access its BindingContext
(being the SampleModel
) and inside that context access the command we are after, in this case, IncrementCommand
.
Does that make sense?
Thank you , i really appreciate your answear. But it's comes out with unhandled exception about object referenced after clicking a imagebutton :(
– michal_Giza
Jan 4 at 18:54
What is the code in the command? And what is the exact exception message?
– Gerald Versluis
Jan 4 at 19:11
Command calls IncrementObject Task which calls service Task InceremntObject. code i posted with this question showing it
– michal_Giza
Jan 4 at 19:29
Did you put in a breakpoint? My guess isobject
is null right now. Change yourImageButton
to this:<ImageButton Command="{Binding Source={x:Reference MyListView}, Path=BindingContext.IncrementCommand}" CommandParameter="{Binding .}">
. By adding theCommandParameter
you specify what is supplied as a parameter for your command. So, the value of yourobject
parameter.{Binding .}
indicates that you want to supply the whole object that is bound to your cell as a parameter.
– Gerald Versluis
Jan 4 at 19:34
Commanding as followed your explanation works well but my code somewhere is missing something becouse i tried with simply DisplayAlert Dialog after clicking on this and work as expected :) Thank you very much for your time
– michal_Giza
Jan 4 at 19:36
|
show 3 more comments
Your code and the error message is not consistent. I'm going to assume that in this error:
Bidning: 'IncrementCommand property not found on AppDemo.Models.SampleObject, target property XamarinForms.ImageButtonCommand'
SampleObject
is now named SampleModel
.
Like Jason pointed out in a comment, the binding context for each item in your list is different than the binding context for the whole page. Whenever you use a list, the binding context of each item will be scoped to the item in that cell.
To be able to reach something outside of that, you will have to use a reference. First, give a name to your ListView
like this: <ListView x:Name="MyListView" ...>
.
Then, for your ImageButton
, change the Command
to be this: <ImageButton Command="{Binding Source={x:Reference MyListView}, Path=BindingContext.IncrementCommand}">
By adding the source and referencing the ListView
, we now scope the binding to whatever we specify in Path
. So we suddenly can access the properties of the ListView
and access its BindingContext
(being the SampleModel
) and inside that context access the command we are after, in this case, IncrementCommand
.
Does that make sense?
Your code and the error message is not consistent. I'm going to assume that in this error:
Bidning: 'IncrementCommand property not found on AppDemo.Models.SampleObject, target property XamarinForms.ImageButtonCommand'
SampleObject
is now named SampleModel
.
Like Jason pointed out in a comment, the binding context for each item in your list is different than the binding context for the whole page. Whenever you use a list, the binding context of each item will be scoped to the item in that cell.
To be able to reach something outside of that, you will have to use a reference. First, give a name to your ListView
like this: <ListView x:Name="MyListView" ...>
.
Then, for your ImageButton
, change the Command
to be this: <ImageButton Command="{Binding Source={x:Reference MyListView}, Path=BindingContext.IncrementCommand}">
By adding the source and referencing the ListView
, we now scope the binding to whatever we specify in Path
. So we suddenly can access the properties of the ListView
and access its BindingContext
(being the SampleModel
) and inside that context access the command we are after, in this case, IncrementCommand
.
Does that make sense?
answered Jan 4 at 16:32
Gerald VersluisGerald Versluis
17.8k43659
17.8k43659
Thank you , i really appreciate your answear. But it's comes out with unhandled exception about object referenced after clicking a imagebutton :(
– michal_Giza
Jan 4 at 18:54
What is the code in the command? And what is the exact exception message?
– Gerald Versluis
Jan 4 at 19:11
Command calls IncrementObject Task which calls service Task InceremntObject. code i posted with this question showing it
– michal_Giza
Jan 4 at 19:29
Did you put in a breakpoint? My guess isobject
is null right now. Change yourImageButton
to this:<ImageButton Command="{Binding Source={x:Reference MyListView}, Path=BindingContext.IncrementCommand}" CommandParameter="{Binding .}">
. By adding theCommandParameter
you specify what is supplied as a parameter for your command. So, the value of yourobject
parameter.{Binding .}
indicates that you want to supply the whole object that is bound to your cell as a parameter.
– Gerald Versluis
Jan 4 at 19:34
Commanding as followed your explanation works well but my code somewhere is missing something becouse i tried with simply DisplayAlert Dialog after clicking on this and work as expected :) Thank you very much for your time
– michal_Giza
Jan 4 at 19:36
|
show 3 more comments
Thank you , i really appreciate your answear. But it's comes out with unhandled exception about object referenced after clicking a imagebutton :(
– michal_Giza
Jan 4 at 18:54
What is the code in the command? And what is the exact exception message?
– Gerald Versluis
Jan 4 at 19:11
Command calls IncrementObject Task which calls service Task InceremntObject. code i posted with this question showing it
– michal_Giza
Jan 4 at 19:29
Did you put in a breakpoint? My guess isobject
is null right now. Change yourImageButton
to this:<ImageButton Command="{Binding Source={x:Reference MyListView}, Path=BindingContext.IncrementCommand}" CommandParameter="{Binding .}">
. By adding theCommandParameter
you specify what is supplied as a parameter for your command. So, the value of yourobject
parameter.{Binding .}
indicates that you want to supply the whole object that is bound to your cell as a parameter.
– Gerald Versluis
Jan 4 at 19:34
Commanding as followed your explanation works well but my code somewhere is missing something becouse i tried with simply DisplayAlert Dialog after clicking on this and work as expected :) Thank you very much for your time
– michal_Giza
Jan 4 at 19:36
Thank you , i really appreciate your answear. But it's comes out with unhandled exception about object referenced after clicking a imagebutton :(
– michal_Giza
Jan 4 at 18:54
Thank you , i really appreciate your answear. But it's comes out with unhandled exception about object referenced after clicking a imagebutton :(
– michal_Giza
Jan 4 at 18:54
What is the code in the command? And what is the exact exception message?
– Gerald Versluis
Jan 4 at 19:11
What is the code in the command? And what is the exact exception message?
– Gerald Versluis
Jan 4 at 19:11
Command calls IncrementObject Task which calls service Task InceremntObject. code i posted with this question showing it
– michal_Giza
Jan 4 at 19:29
Command calls IncrementObject Task which calls service Task InceremntObject. code i posted with this question showing it
– michal_Giza
Jan 4 at 19:29
Did you put in a breakpoint? My guess is
object
is null right now. Change your ImageButton
to this: <ImageButton Command="{Binding Source={x:Reference MyListView}, Path=BindingContext.IncrementCommand}" CommandParameter="{Binding .}">
. By adding the CommandParameter
you specify what is supplied as a parameter for your command. So, the value of your object
parameter. {Binding .}
indicates that you want to supply the whole object that is bound to your cell as a parameter.– Gerald Versluis
Jan 4 at 19:34
Did you put in a breakpoint? My guess is
object
is null right now. Change your ImageButton
to this: <ImageButton Command="{Binding Source={x:Reference MyListView}, Path=BindingContext.IncrementCommand}" CommandParameter="{Binding .}">
. By adding the CommandParameter
you specify what is supplied as a parameter for your command. So, the value of your object
parameter. {Binding .}
indicates that you want to supply the whole object that is bound to your cell as a parameter.– Gerald Versluis
Jan 4 at 19:34
Commanding as followed your explanation works well but my code somewhere is missing something becouse i tried with simply DisplayAlert Dialog after clicking on this and work as expected :) Thank you very much for your time
– michal_Giza
Jan 4 at 19:36
Commanding as followed your explanation works well but my code somewhere is missing something becouse i tried with simply DisplayAlert Dialog after clicking on this and work as expected :) Thank you very much for your time
– michal_Giza
Jan 4 at 19:36
|
show 3 more comments
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54042369%2fcommanding-property-not-found-on-viewmodel-xamarin%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
the BindingContext for each item in your ListView is SampleModel, not the ViewModel
– Jason
Jan 4 at 16:19