I am not able to access x:Name of controls in ListView in XAML and Code behindxamarin.forms DataBinding and ImageSourcePropertyxamarin forms labs binding issue with listview and checkboxControlled Frame Width Size In A Horizontal StackLayoutXamarin Forms ViewCell not displaying binded data with list but works with tupleBackgroundColor cannot be set via DataTrigger inside ListViewXamarin.UWP Custom ViewCell has problems with the bindingsXamarin Forms - How to Make iOS ListView Native Grouped Style With Headers?Access Xamarin.Forms ListView Templated Controls in code-behindXamarin Forms Cross Platform issue with StackLayout Visability in a ListViewHow get x:name of element in code behind / XAML
Does toddler keep hands around private parts?
What other tricks were there to get more data onto floppy disks?
Why would a family misspell their surname?
Contradictory parts of D&D Beyond: which is official?
What was the deal with the news stories about rats in "Joker"?
Should I tell an editor that I believe an article I'm reviewing is not good enough for the journal?
Does removing finitely many points from an open set yield an open set?
How do put overbrace across an (aligned) equals sign?
ASCII texturing
Is it a mistake to use a password that has previously been used (by anyone ever)?
Beautiful planar geometry theorems not encountered in high school
Beginner Tactics - Why Isn't This Mate?
Would an intelligent alien civilisation categorise EM radiation the same as us?
Idiomatic way to distinguish two zero-arg constructors
How to write a vertically centered asterisk in LaTex in a normal text?
Do repulsorlifts work upside-down?
Co-curricular lessons between geometry and chemistry?
Can Counterspell be used to prevent a Mystic from using a Discipline?
Days in indexed month
Is staccato implied in the bass on this Burgmuller Arabesque?
"Startup" working hours - is it normal to be asked to work 11 hours/ day?
Running code in a different tmux pane
How to remove SQL Server Error Logs
What does the Node2D transform property do?
I am not able to access x:Name of controls in ListView in XAML and Code behind
xamarin.forms DataBinding and ImageSourcePropertyxamarin forms labs binding issue with listview and checkboxControlled Frame Width Size In A Horizontal StackLayoutXamarin Forms ViewCell not displaying binded data with list but works with tupleBackgroundColor cannot be set via DataTrigger inside ListViewXamarin.UWP Custom ViewCell has problems with the bindingsXamarin Forms - How to Make iOS ListView Native Grouped Style With Headers?Access Xamarin.Forms ListView Templated Controls in code-behindXamarin Forms Cross Platform issue with StackLayout Visability in a ListViewHow get x:name of element in code behind / XAML
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;
I have a ListView in Xamarin forms which has a custom cell in it. The custom cell contains an Image control with a x:Name attribute. Now I tried to bind an activity indicator IsRunning Property to the Image IsLoading Property and Xamarin forms could not find the Image using the x:Name. I tried accessing from the backend too, same thing.
I added other elements in the Listview and their x:Name were not visible too.
NB: I can access x:Name of controls I put outside the ListView so it is looking like a listview issue.
<StackLayout>
<ActivityIndicator x:Name="activity" Color="Purple" HeightRequest="50" WidthRequest="50" IsRunning="Binding Source=x:Reference Offerimg,Path=IsLoading"></ActivityIndicator>
<ListView x:Name="OfferLV" HasUnevenRows="True" x:FieldModifier="Public" SeparatorVisibility="None" BackgroundColor="White">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell >
<StackLayout Padding="0,10,0,10">
<Image x:Name="offerimg" HeightRequest="500" WidthRequest="100" Aspect="AspectFill"></Image>
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</StackLayout>
c# xamarin.forms xamarin.forms.listview
add a comment
|
I have a ListView in Xamarin forms which has a custom cell in it. The custom cell contains an Image control with a x:Name attribute. Now I tried to bind an activity indicator IsRunning Property to the Image IsLoading Property and Xamarin forms could not find the Image using the x:Name. I tried accessing from the backend too, same thing.
I added other elements in the Listview and their x:Name were not visible too.
NB: I can access x:Name of controls I put outside the ListView so it is looking like a listview issue.
<StackLayout>
<ActivityIndicator x:Name="activity" Color="Purple" HeightRequest="50" WidthRequest="50" IsRunning="Binding Source=x:Reference Offerimg,Path=IsLoading"></ActivityIndicator>
<ListView x:Name="OfferLV" HasUnevenRows="True" x:FieldModifier="Public" SeparatorVisibility="None" BackgroundColor="White">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell >
<StackLayout Padding="0,10,0,10">
<Image x:Name="offerimg" HeightRequest="500" WidthRequest="100" Aspect="AspectFill"></Image>
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</StackLayout>
c# xamarin.forms xamarin.forms.listview
I don't find it a good idea to have name inside ViewCell. You might want to have ClassId or StyleId instead and bind it to a property so you can access them easier later on.
– Amir No-Family
Mar 28 at 22:11
Thanks but I am not sure how to do that. Do you have any documentation I can refer to ?
– Classyk
Mar 28 at 23:17
What do you mean byImage IsLoading Property
? There is no such property on the Image control. I don't understand what you want to achieve. Is it that when ActivityIndicator IsRunning == true, you want your image to disappear or to show up ?
– Umar3x
Apr 1 at 9:53
@Umar3x I want my activity indicator IsRunning to be true when my image Is loading and let it disappear once the image appears. How can I do that please ?
– Classyk
Apr 1 at 18:16
Do you load your image as a resource in your project or from an Uri ?
– Umar3x
Apr 2 at 10:25
add a comment
|
I have a ListView in Xamarin forms which has a custom cell in it. The custom cell contains an Image control with a x:Name attribute. Now I tried to bind an activity indicator IsRunning Property to the Image IsLoading Property and Xamarin forms could not find the Image using the x:Name. I tried accessing from the backend too, same thing.
I added other elements in the Listview and their x:Name were not visible too.
NB: I can access x:Name of controls I put outside the ListView so it is looking like a listview issue.
<StackLayout>
<ActivityIndicator x:Name="activity" Color="Purple" HeightRequest="50" WidthRequest="50" IsRunning="Binding Source=x:Reference Offerimg,Path=IsLoading"></ActivityIndicator>
<ListView x:Name="OfferLV" HasUnevenRows="True" x:FieldModifier="Public" SeparatorVisibility="None" BackgroundColor="White">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell >
<StackLayout Padding="0,10,0,10">
<Image x:Name="offerimg" HeightRequest="500" WidthRequest="100" Aspect="AspectFill"></Image>
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</StackLayout>
c# xamarin.forms xamarin.forms.listview
I have a ListView in Xamarin forms which has a custom cell in it. The custom cell contains an Image control with a x:Name attribute. Now I tried to bind an activity indicator IsRunning Property to the Image IsLoading Property and Xamarin forms could not find the Image using the x:Name. I tried accessing from the backend too, same thing.
I added other elements in the Listview and their x:Name were not visible too.
NB: I can access x:Name of controls I put outside the ListView so it is looking like a listview issue.
<StackLayout>
<ActivityIndicator x:Name="activity" Color="Purple" HeightRequest="50" WidthRequest="50" IsRunning="Binding Source=x:Reference Offerimg,Path=IsLoading"></ActivityIndicator>
<ListView x:Name="OfferLV" HasUnevenRows="True" x:FieldModifier="Public" SeparatorVisibility="None" BackgroundColor="White">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell >
<StackLayout Padding="0,10,0,10">
<Image x:Name="offerimg" HeightRequest="500" WidthRequest="100" Aspect="AspectFill"></Image>
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</StackLayout>
c# xamarin.forms xamarin.forms.listview
c# xamarin.forms xamarin.forms.listview
edited Mar 29 at 1:51
Lucas Zhang - MSFT
6,3372 gold badges4 silver badges14 bronze badges
6,3372 gold badges4 silver badges14 bronze badges
asked Mar 28 at 22:10
ClassykClassyk
256 bronze badges
256 bronze badges
I don't find it a good idea to have name inside ViewCell. You might want to have ClassId or StyleId instead and bind it to a property so you can access them easier later on.
– Amir No-Family
Mar 28 at 22:11
Thanks but I am not sure how to do that. Do you have any documentation I can refer to ?
– Classyk
Mar 28 at 23:17
What do you mean byImage IsLoading Property
? There is no such property on the Image control. I don't understand what you want to achieve. Is it that when ActivityIndicator IsRunning == true, you want your image to disappear or to show up ?
– Umar3x
Apr 1 at 9:53
@Umar3x I want my activity indicator IsRunning to be true when my image Is loading and let it disappear once the image appears. How can I do that please ?
– Classyk
Apr 1 at 18:16
Do you load your image as a resource in your project or from an Uri ?
– Umar3x
Apr 2 at 10:25
add a comment
|
I don't find it a good idea to have name inside ViewCell. You might want to have ClassId or StyleId instead and bind it to a property so you can access them easier later on.
– Amir No-Family
Mar 28 at 22:11
Thanks but I am not sure how to do that. Do you have any documentation I can refer to ?
– Classyk
Mar 28 at 23:17
What do you mean byImage IsLoading Property
? There is no such property on the Image control. I don't understand what you want to achieve. Is it that when ActivityIndicator IsRunning == true, you want your image to disappear or to show up ?
– Umar3x
Apr 1 at 9:53
@Umar3x I want my activity indicator IsRunning to be true when my image Is loading and let it disappear once the image appears. How can I do that please ?
– Classyk
Apr 1 at 18:16
Do you load your image as a resource in your project or from an Uri ?
– Umar3x
Apr 2 at 10:25
I don't find it a good idea to have name inside ViewCell. You might want to have ClassId or StyleId instead and bind it to a property so you can access them easier later on.
– Amir No-Family
Mar 28 at 22:11
I don't find it a good idea to have name inside ViewCell. You might want to have ClassId or StyleId instead and bind it to a property so you can access them easier later on.
– Amir No-Family
Mar 28 at 22:11
Thanks but I am not sure how to do that. Do you have any documentation I can refer to ?
– Classyk
Mar 28 at 23:17
Thanks but I am not sure how to do that. Do you have any documentation I can refer to ?
– Classyk
Mar 28 at 23:17
What do you mean by
Image IsLoading Property
? There is no such property on the Image control. I don't understand what you want to achieve. Is it that when ActivityIndicator IsRunning == true, you want your image to disappear or to show up ?– Umar3x
Apr 1 at 9:53
What do you mean by
Image IsLoading Property
? There is no such property on the Image control. I don't understand what you want to achieve. Is it that when ActivityIndicator IsRunning == true, you want your image to disappear or to show up ?– Umar3x
Apr 1 at 9:53
@Umar3x I want my activity indicator IsRunning to be true when my image Is loading and let it disappear once the image appears. How can I do that please ?
– Classyk
Apr 1 at 18:16
@Umar3x I want my activity indicator IsRunning to be true when my image Is loading and let it disappear once the image appears. How can I do that please ?
– Classyk
Apr 1 at 18:16
Do you load your image as a resource in your project or from an Uri ?
– Umar3x
Apr 2 at 10:25
Do you load your image as a resource in your project or from an Uri ?
– Umar3x
Apr 2 at 10:25
add a comment
|
2 Answers
2
active
oldest
votes
There is a very nice library FFImageLoading that will help you do what you want, and has a built in IsLoading
property to display an ActivityIndicator
accordingly. You can also handles loading error and so ...
<ListView VerticalOptions="StartAndExpand" ItemsSource="Binding Items">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<Grid>
<ff:CachedImage x:Name="Image" Source="https://www.allibert-trekking.com/uploads/media/images/thumbnails/AMin3_10-photo-montagne-chine-lac.jpeg?v2" />
<ActivityIndicator Color="OrangeRed" IsRunning="Binding IsLoading" IsVisible="Binding IsLoading" BindingContext="x:Reference Name=Image" />
</Grid>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
I created a sample for this example here : https://github.com/vincentcastagna/ImageLoadingPlaceHolder
add a comment
|
That's how things are expected to work in XAML technologies including Xamarin.Forms.
There is not just a single ViewCell
, but there could be thousands of them and you can't access thousands different items with one name.
Recommended way is to use data binding. Frequently you can also access those items by casting the sender
in events.
Thanks but is do you have any documentation I can refer to? I'm not sure how to go about that
– Classyk
Mar 28 at 23:18
docs.microsoft.com/en-us/xamarin/xamarin-forms/xaml/xaml-basics/…
– Ivan Ičin
Mar 28 at 23:53
Thanks for the documentation. I went through the documentation and it turned out it was exactly what i was trying to do before. If i have to bind from the markup, i still have to reference the x:name of the source control. And the problem is that i cannot access any control I put in the DataTemplate of the ListView via their x:name. Is there any way to solve that? and that is clearly what the problem is right now. If you have any other solution, kindly proffer them to me,
– Classyk
Mar 29 at 14:26
I decided to delete my comment as it sounded a bit arrogant, but to rephrase it - what you said above isn't correct which means you've got a lot of to learn. There is the sample there exactly with the ListView, check it carefully and you'll realize how you should do it.
– Ivan Ičin
Mar 30 at 0:56
add a comment
|
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/4.0/"u003ecc by-sa 4.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%2f55407625%2fi-am-not-able-to-access-xname-of-controls-in-listview-in-xaml-and-code-behind%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
There is a very nice library FFImageLoading that will help you do what you want, and has a built in IsLoading
property to display an ActivityIndicator
accordingly. You can also handles loading error and so ...
<ListView VerticalOptions="StartAndExpand" ItemsSource="Binding Items">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<Grid>
<ff:CachedImage x:Name="Image" Source="https://www.allibert-trekking.com/uploads/media/images/thumbnails/AMin3_10-photo-montagne-chine-lac.jpeg?v2" />
<ActivityIndicator Color="OrangeRed" IsRunning="Binding IsLoading" IsVisible="Binding IsLoading" BindingContext="x:Reference Name=Image" />
</Grid>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
I created a sample for this example here : https://github.com/vincentcastagna/ImageLoadingPlaceHolder
add a comment
|
There is a very nice library FFImageLoading that will help you do what you want, and has a built in IsLoading
property to display an ActivityIndicator
accordingly. You can also handles loading error and so ...
<ListView VerticalOptions="StartAndExpand" ItemsSource="Binding Items">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<Grid>
<ff:CachedImage x:Name="Image" Source="https://www.allibert-trekking.com/uploads/media/images/thumbnails/AMin3_10-photo-montagne-chine-lac.jpeg?v2" />
<ActivityIndicator Color="OrangeRed" IsRunning="Binding IsLoading" IsVisible="Binding IsLoading" BindingContext="x:Reference Name=Image" />
</Grid>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
I created a sample for this example here : https://github.com/vincentcastagna/ImageLoadingPlaceHolder
add a comment
|
There is a very nice library FFImageLoading that will help you do what you want, and has a built in IsLoading
property to display an ActivityIndicator
accordingly. You can also handles loading error and so ...
<ListView VerticalOptions="StartAndExpand" ItemsSource="Binding Items">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<Grid>
<ff:CachedImage x:Name="Image" Source="https://www.allibert-trekking.com/uploads/media/images/thumbnails/AMin3_10-photo-montagne-chine-lac.jpeg?v2" />
<ActivityIndicator Color="OrangeRed" IsRunning="Binding IsLoading" IsVisible="Binding IsLoading" BindingContext="x:Reference Name=Image" />
</Grid>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
I created a sample for this example here : https://github.com/vincentcastagna/ImageLoadingPlaceHolder
There is a very nice library FFImageLoading that will help you do what you want, and has a built in IsLoading
property to display an ActivityIndicator
accordingly. You can also handles loading error and so ...
<ListView VerticalOptions="StartAndExpand" ItemsSource="Binding Items">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<Grid>
<ff:CachedImage x:Name="Image" Source="https://www.allibert-trekking.com/uploads/media/images/thumbnails/AMin3_10-photo-montagne-chine-lac.jpeg?v2" />
<ActivityIndicator Color="OrangeRed" IsRunning="Binding IsLoading" IsVisible="Binding IsLoading" BindingContext="x:Reference Name=Image" />
</Grid>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
I created a sample for this example here : https://github.com/vincentcastagna/ImageLoadingPlaceHolder
answered Apr 2 at 11:09
Umar3xUmar3x
8917 silver badges17 bronze badges
8917 silver badges17 bronze badges
add a comment
|
add a comment
|
That's how things are expected to work in XAML technologies including Xamarin.Forms.
There is not just a single ViewCell
, but there could be thousands of them and you can't access thousands different items with one name.
Recommended way is to use data binding. Frequently you can also access those items by casting the sender
in events.
Thanks but is do you have any documentation I can refer to? I'm not sure how to go about that
– Classyk
Mar 28 at 23:18
docs.microsoft.com/en-us/xamarin/xamarin-forms/xaml/xaml-basics/…
– Ivan Ičin
Mar 28 at 23:53
Thanks for the documentation. I went through the documentation and it turned out it was exactly what i was trying to do before. If i have to bind from the markup, i still have to reference the x:name of the source control. And the problem is that i cannot access any control I put in the DataTemplate of the ListView via their x:name. Is there any way to solve that? and that is clearly what the problem is right now. If you have any other solution, kindly proffer them to me,
– Classyk
Mar 29 at 14:26
I decided to delete my comment as it sounded a bit arrogant, but to rephrase it - what you said above isn't correct which means you've got a lot of to learn. There is the sample there exactly with the ListView, check it carefully and you'll realize how you should do it.
– Ivan Ičin
Mar 30 at 0:56
add a comment
|
That's how things are expected to work in XAML technologies including Xamarin.Forms.
There is not just a single ViewCell
, but there could be thousands of them and you can't access thousands different items with one name.
Recommended way is to use data binding. Frequently you can also access those items by casting the sender
in events.
Thanks but is do you have any documentation I can refer to? I'm not sure how to go about that
– Classyk
Mar 28 at 23:18
docs.microsoft.com/en-us/xamarin/xamarin-forms/xaml/xaml-basics/…
– Ivan Ičin
Mar 28 at 23:53
Thanks for the documentation. I went through the documentation and it turned out it was exactly what i was trying to do before. If i have to bind from the markup, i still have to reference the x:name of the source control. And the problem is that i cannot access any control I put in the DataTemplate of the ListView via their x:name. Is there any way to solve that? and that is clearly what the problem is right now. If you have any other solution, kindly proffer them to me,
– Classyk
Mar 29 at 14:26
I decided to delete my comment as it sounded a bit arrogant, but to rephrase it - what you said above isn't correct which means you've got a lot of to learn. There is the sample there exactly with the ListView, check it carefully and you'll realize how you should do it.
– Ivan Ičin
Mar 30 at 0:56
add a comment
|
That's how things are expected to work in XAML technologies including Xamarin.Forms.
There is not just a single ViewCell
, but there could be thousands of them and you can't access thousands different items with one name.
Recommended way is to use data binding. Frequently you can also access those items by casting the sender
in events.
That's how things are expected to work in XAML technologies including Xamarin.Forms.
There is not just a single ViewCell
, but there could be thousands of them and you can't access thousands different items with one name.
Recommended way is to use data binding. Frequently you can also access those items by casting the sender
in events.
answered Mar 28 at 22:42
Ivan IčinIvan Ičin
6,2364 gold badges26 silver badges44 bronze badges
6,2364 gold badges26 silver badges44 bronze badges
Thanks but is do you have any documentation I can refer to? I'm not sure how to go about that
– Classyk
Mar 28 at 23:18
docs.microsoft.com/en-us/xamarin/xamarin-forms/xaml/xaml-basics/…
– Ivan Ičin
Mar 28 at 23:53
Thanks for the documentation. I went through the documentation and it turned out it was exactly what i was trying to do before. If i have to bind from the markup, i still have to reference the x:name of the source control. And the problem is that i cannot access any control I put in the DataTemplate of the ListView via their x:name. Is there any way to solve that? and that is clearly what the problem is right now. If you have any other solution, kindly proffer them to me,
– Classyk
Mar 29 at 14:26
I decided to delete my comment as it sounded a bit arrogant, but to rephrase it - what you said above isn't correct which means you've got a lot of to learn. There is the sample there exactly with the ListView, check it carefully and you'll realize how you should do it.
– Ivan Ičin
Mar 30 at 0:56
add a comment
|
Thanks but is do you have any documentation I can refer to? I'm not sure how to go about that
– Classyk
Mar 28 at 23:18
docs.microsoft.com/en-us/xamarin/xamarin-forms/xaml/xaml-basics/…
– Ivan Ičin
Mar 28 at 23:53
Thanks for the documentation. I went through the documentation and it turned out it was exactly what i was trying to do before. If i have to bind from the markup, i still have to reference the x:name of the source control. And the problem is that i cannot access any control I put in the DataTemplate of the ListView via their x:name. Is there any way to solve that? and that is clearly what the problem is right now. If you have any other solution, kindly proffer them to me,
– Classyk
Mar 29 at 14:26
I decided to delete my comment as it sounded a bit arrogant, but to rephrase it - what you said above isn't correct which means you've got a lot of to learn. There is the sample there exactly with the ListView, check it carefully and you'll realize how you should do it.
– Ivan Ičin
Mar 30 at 0:56
Thanks but is do you have any documentation I can refer to? I'm not sure how to go about that
– Classyk
Mar 28 at 23:18
Thanks but is do you have any documentation I can refer to? I'm not sure how to go about that
– Classyk
Mar 28 at 23:18
docs.microsoft.com/en-us/xamarin/xamarin-forms/xaml/xaml-basics/…
– Ivan Ičin
Mar 28 at 23:53
docs.microsoft.com/en-us/xamarin/xamarin-forms/xaml/xaml-basics/…
– Ivan Ičin
Mar 28 at 23:53
Thanks for the documentation. I went through the documentation and it turned out it was exactly what i was trying to do before. If i have to bind from the markup, i still have to reference the x:name of the source control. And the problem is that i cannot access any control I put in the DataTemplate of the ListView via their x:name. Is there any way to solve that? and that is clearly what the problem is right now. If you have any other solution, kindly proffer them to me,
– Classyk
Mar 29 at 14:26
Thanks for the documentation. I went through the documentation and it turned out it was exactly what i was trying to do before. If i have to bind from the markup, i still have to reference the x:name of the source control. And the problem is that i cannot access any control I put in the DataTemplate of the ListView via their x:name. Is there any way to solve that? and that is clearly what the problem is right now. If you have any other solution, kindly proffer them to me,
– Classyk
Mar 29 at 14:26
I decided to delete my comment as it sounded a bit arrogant, but to rephrase it - what you said above isn't correct which means you've got a lot of to learn. There is the sample there exactly with the ListView, check it carefully and you'll realize how you should do it.
– Ivan Ičin
Mar 30 at 0:56
I decided to delete my comment as it sounded a bit arrogant, but to rephrase it - what you said above isn't correct which means you've got a lot of to learn. There is the sample there exactly with the ListView, check it carefully and you'll realize how you should do it.
– Ivan Ičin
Mar 30 at 0:56
add a comment
|
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%2f55407625%2fi-am-not-able-to-access-xname-of-controls-in-listview-in-xaml-and-code-behind%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
I don't find it a good idea to have name inside ViewCell. You might want to have ClassId or StyleId instead and bind it to a property so you can access them easier later on.
– Amir No-Family
Mar 28 at 22:11
Thanks but I am not sure how to do that. Do you have any documentation I can refer to ?
– Classyk
Mar 28 at 23:17
What do you mean by
Image IsLoading Property
? There is no such property on the Image control. I don't understand what you want to achieve. Is it that when ActivityIndicator IsRunning == true, you want your image to disappear or to show up ?– Umar3x
Apr 1 at 9:53
@Umar3x I want my activity indicator IsRunning to be true when my image Is loading and let it disappear once the image appears. How can I do that please ?
– Classyk
Apr 1 at 18:16
Do you load your image as a resource in your project or from an Uri ?
– Umar3x
Apr 2 at 10:25