Style Control States with Visual State Manager in Xamarin.Forms

  Рет қаралды 4,410

Gerald Versluis

Gerald Versluis

Күн бұрын

Пікірлер
@aboubacar.traore
@aboubacar.traore 3 жыл бұрын
Great video as always, more details on visual state would be very appreciated.
@jfversluis
@jfversluis 3 жыл бұрын
Thank you! What more details are you looking for?
@aboubacar.traore
@aboubacar.traore 3 жыл бұрын
@@jfversluis Thanks for your quick response. More details on custom visualStateGroup and all the others stuff, that i might not kwow. Thank you for all your video.
@aboubacar.traore
@aboubacar.traore 3 жыл бұрын
@@jfversluis Hi Gerald, VSM seem not to work on android, It's my first time trying but it seem not to work. I've created multiple project, but no result. I'm working on vs windows. Is there any problem with android.
@jfversluis
@jfversluis 3 жыл бұрын
This is not a very platform specific functionality so it should just work :) if you have a little sample project I can maybe have a look
@aboubacar.traore
@aboubacar.traore 3 жыл бұрын
@@jfversluis I have reproduce this same project from a blog post devblogs.microsoft.com/xamarin/visual-state-manager/ but it's not working.
@Shahan85
@Shahan85 3 жыл бұрын
I have a question: target type stacklayout effect only on collectionview or effect to all wherever have stacklayout in the contentpage?
@jamalfazeli9127
@jamalfazeli9127 3 жыл бұрын
How can I eliminate background (use transparent) when I press the element in collection view?
@jfversluis
@jfversluis 3 жыл бұрын
I think this should be useful: docs.microsoft.com/xamarin/xamarin-forms/user-interface/collectionview/selection#change-selected-item-color
@Orgbrat
@Orgbrat 4 жыл бұрын
I would like to see you do a video on using Control Templates in Xamarin.Forms 5.0. Maybe with a RadioButton control by adding an image with a label under it.
@jfversluis
@jfversluis 4 жыл бұрын
Yes! Those are amazing! I might prioritize that one! Thanks for the suggestion!
@LobsterHarry
@LobsterHarry 4 жыл бұрын
@Gerald: I kind of outsourced my ItemTemplates for my CollectionsView with an ItemTemplateSelector and store each Template in an own XAML-File. With this approach the "Selected"-State seems not to be working ! When I put the Template back in my "Main"-XAML-File it works fine. (I put the Style in my App.XAML). Is there a Solution for it ? I need plenty of Templates to fit all the different requirements of my Clients due to Device and Age of the Users (everybody seems to be nearly blind...) and to hold them all in one File is a little bit confusing.
@jfversluis
@jfversluis 4 жыл бұрын
Looks like there are a couple of bugs still that need to be worked out in that area: github.com/xamarin/Xamarin.Forms/issues?q=is%3Aissue+is%3Aopen+CollectionView+state See if one describes what you're seeing and add to that or open a new one with as much detail as possible.
@solvedplus858
@solvedplus858 Жыл бұрын
many thanks This was very cool, but how can we animate these visual state as we do in WPF?
@LobsterHarry
@LobsterHarry 4 жыл бұрын
Another question on that matter: Is it possible to have Styles for CustomControls ? I tried in the App.XAML-Header: "xmlns:usercontrols="clr-namespace:anonaScanner.UserControls" and then But that must be wrong because now my Page ist not opening anymore... Any thoughts ?
@jfversluis
@jfversluis 4 жыл бұрын
Should definitely be possible! Is CaptionTextColor a BindableProperty? Also, when your page doesn’t open there is probably some error in your application output that says what might be wrong :)
@LobsterHarry
@LobsterHarry 4 жыл бұрын
@@jfversluis , Yes, it is bindable. Okay, when you say it is possible than I spend some more time into it and figure it out.
@jfversluis
@jfversluis 4 жыл бұрын
I mean, think of it this way; every control in Forms is also a custom control. Everything you create should be able to do the same things as the ones created by the Forms team. I’m a bit under the weather right now. As soon as I’m back I’ll have a look of you didn’t figure it out yet :)
@jamalfazeli9127
@jamalfazeli9127 3 жыл бұрын
Is it possible to use shimmer package in collection view?
@jfversluis
@jfversluis 3 жыл бұрын
You probably want to look at this: kzbin.info/www/bejne/mIXMpoqup792fK8
@treasurenkonyana2745
@treasurenkonyana2745 3 жыл бұрын
Hi Gerald, thanks for the video man. I'm trying to implement this with a button. I have a collection view with buttons. Is there something else I need to add to get it to work?
@jfversluis
@jfversluis 3 жыл бұрын
Hmm nope should just work with any visual element as far as I know :)
@marlonmartina8283
@marlonmartina8283 3 жыл бұрын
Hi Gerald, nice video! I'm using a collectionview with a Frame inside. I've followed each step in this tutorial and everything works as fine. But when i add a TapGestureRecognizer to the frame in my collectionview, then the visual state stops working. Are you familiar with this? i've checked the open issues on the Git repository, but couldn't find an issue relative to this one.
@jfversluis
@jfversluis 3 жыл бұрын
Thanks! Hm no, doesn't sound familiar. Chances are that the Visual State Manager still works but something visually is not showing up correctly with this combination of controls
@maxchu92
@maxchu92 3 жыл бұрын
I am having a problem right now. I have a CollectionView that have Items with different kinds of status, Example: Active/Suspended/Deleted. Each with different background color White/Red/Gray respectively. I would like to change the background color of each item when selected to a darker color but similar with its status color. If i uses VisualStateManager, It will only change to 1 specific color. How do i set multiple color based on the status of each item?
@jfversluis
@jfversluis 3 жыл бұрын
Thanks for being patient while I go through the replies :D Hope you figured it out by now!
@kevinhermawan7524
@kevinhermawan7524 4 жыл бұрын
how i do render an icon inside collection view? im using font awesome 5 , i dont knot where to set OnPlatform or something
@jfversluis
@jfversluis 4 жыл бұрын
Hi Kevin! Not sure what these two things have to do with each other. You shouldn’t be needing OnPlatform to render that icon :) does it render outside of the CollectionView? Do you get any errors?
@hgfdjwkuhx6142
@hgfdjwkuhx6142 3 жыл бұрын
How can I know all the states for an element ? and how can do new state for specific element?
@jfversluis
@jfversluis 3 жыл бұрын
Can all be found in the Docs: docs.microsoft.com/xamarin/xamarin-forms/user-interface/visual-state-manager
@4Asteria
@4Asteria 3 жыл бұрын
Wow, thank you for this video. Saved me more than once. :)
@jfversluis
@jfversluis 3 жыл бұрын
Haha thank you that is great to hear!
@argonjs
@argonjs 4 жыл бұрын
That is a really great tutorial as always. I have one question regarding the collection view. Collectioview initially gets a height more than its items list length. I have done a search for a fix but none of them actually not a good solution. What we can do about that length issue
@jfversluis
@jfversluis 4 жыл бұрын
Thank you Argon! What exactly do you mean by getting a height more than it’s items?
@argonjs
@argonjs 4 жыл бұрын
@@jfversluis I mean.. When we add a collection view by default it's getting some height. that height is more lengthy than its contents.
@jfversluis
@jfversluis 4 жыл бұрын
Kind of hard to say without any context. It might be that it mimics the working of the ListView that also takes the whole space available
@argonjs
@argonjs 4 жыл бұрын
@@jfversluis we are waiting for a collection view tutorial ❤️
@_samirdahal
@_samirdahal 4 жыл бұрын
HI Gerald! Can you make a video on How to properly terminate the application programmatically? If possible both android and ios app
@jfversluis
@jfversluis 4 жыл бұрын
On iOS it’s not possible. At least not if you want to publish it in the store. While technically it might be possible, Apple does not think it’s a good user-experience and won’t allow it to be published :)
@_samirdahal
@_samirdahal 4 жыл бұрын
@@jfversluis I see. Thank you for making it clear. Loving your contents.
@jfversluis
@jfversluis 4 жыл бұрын
Thank you Samir! Stay tuned, much more to come! 😄
@maxchu92
@maxchu92 3 жыл бұрын
Hi. Can you do a video about State Triggers in VisualStateManager?
@jfversluis
@jfversluis 3 жыл бұрын
Added it to the list, thanks!
@ibn-mohamad
@ibn-mohamad 4 жыл бұрын
very useful tutorial. thanks!
@jfversluis
@jfversluis 4 жыл бұрын
Thank you Amine! Glad you like it!
@LobsterHarry
@LobsterHarry 4 жыл бұрын
Thank you very much, that was exactly what I was looking for ! I learned something new today. The thing with the "TargetName" is maybe not so practical, because I have to name all my Labels individually. A "TargetType" = "Label" to hit all the Labels inside my StackLayout would be nicer. But you can have it all, right (or can you ?). Btw: the Link to the Github-Repository is not working !
@jfversluis
@jfversluis 4 жыл бұрын
Ah yeah the repo is still set to private 😄 great I could be of service! I know they were also thinking about adding the target type. But I think there was some problem with doing that... can’t remember what it was...
@AMIRKHAN-dm2fm
@AMIRKHAN-dm2fm 4 жыл бұрын
Please make tutorial for PDF download its urgent.
@jfversluis
@jfversluis 4 жыл бұрын
Hi Amir! I appreciate suggestions, but I hope you understand my fulltime job is not to make these things. I’m unable to drop everything and create something on a specific subject just because someone might need it at that time. I hope you understand!
@AMIRKHAN-dm2fm
@AMIRKHAN-dm2fm 4 жыл бұрын
@@jfversluis yeah sir i am understand your situation but actually i am unable to find and content about this that's why i request you.
@jfversluis
@jfversluis 4 жыл бұрын
Noted! And I really appreciate you asking me and I’m happy to help, but not instantly. Sorry about that
@AMIRKHAN-dm2fm
@AMIRKHAN-dm2fm 4 жыл бұрын
@@jfversluis yeah sure
@jfversluis
@jfversluis 4 жыл бұрын
Thank you so much Eduard! I know you do and everyone does! But that’s always nice to hear :)
Decoupled Code with MessagingCenter in Xamarin.Forms
18:46
Gerald Versluis
Рет қаралды 12 М.
Upload Files with Progress Reporting in Xamarin.Forms and ASP.NET
24:25
黑天使只对C罗有感觉#short #angel #clown
00:39
Super Beauty team
Рет қаралды 36 МЛН
“Don’t stop the chances.”
00:44
ISSEI / いっせい
Рет қаралды 62 МЛН
Support each other🤝
00:31
ISSEI / いっせい
Рет қаралды 81 МЛН
Xamarin.Forms ListView vs. CollectionView - Which to use and why!
20:14
James Montemagno
Рет қаралды 31 М.
Using ValueConverters in Xamarin.Forms XAML, Here Is How To Do It
19:26
Gerald Versluis
Рет қаралды 4,5 М.
Real-World Input Validation Scenarios with Xamarin.CommunityToolkit
20:07
Reinforcement Learning - My Algorithm vs State of the Art
19:32
Pezzza's Work
Рет қаралды 153 М.
Create Custom Controls using BindableProperty for Xamarin.Forms
17:48
Gerald Versluis
Рет қаралды 16 М.
Coding a Web Server in 25 Lines - Computerphile
17:49
Computerphile
Рет қаралды 360 М.
黑天使只对C罗有感觉#short #angel #clown
00:39
Super Beauty team
Рет қаралды 36 МЛН