コード例 #1
0
        public MycoImageButton()
        {
            var tapGestureRecoginizer = new MycoTapGestureRecognizer();

            tapGestureRecoginizer.TouchDown += TapGestureRecoginizer_TouchDown;
            tapGestureRecoginizer.TouchUp   += TapGestureRecoginizer_TouchUp;
            GestureRecognizers.Add(tapGestureRecoginizer);
        }
コード例 #2
0
        public MycoCheckImage()
        {
            if (TickBitmap == null)
            {
                var assembly      = typeof(MycoCheckImage).GetTypeInfo().Assembly;
                var tickImageName = assembly.GetName().Name + ".Resources.tick.png";

                using (var resource = assembly.GetManifestResourceStream(tickImageName))
                    using (var stream = new SKManagedStream(resource))
                    {
                        TickBitmap = SKBitmap.Decode(stream);
                    }
            }

            var tapGestureRecoginizer = new MycoTapGestureRecognizer()
            {
                Command = IsSelectedCommand
            };

            GestureRecognizers.Add(tapGestureRecoginizer);
        }