Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

MonoTouch.Dialog Time Picker black screen solution?

$
0
0

Hi all,

I'm programmatically creating a DialogViewController that has a TimeElement. The dialog loads fine, but when I click on the TimeElement, it loads a black screen. I'm currently trying it both using the Reflection API and elements API. This also happens when using the DateTimeElement. Any thoughts? Code below:

    public RoutineDialog (Routine routine)
    {
        Name = routine.Name;
        TimeOfDay = DateTime.Now;
    }

    [Section("Routine Entry")]

    [Entry("routine name")]
    public string Name { get; set; }

    [Date]
    public DateTime TimeOfDay { get; set; }

    [Section ("Buttons")]
    [OnTap ("SaveRoutine")]
    [Alignment (UITextAlignment.Center)]
    public string Save;

    [Section ("")]
    [OnTap ("DeleteRoutine")]
    [Alignment (UITextAlignment.Center)]
    public string Delete;

also

public void loadRoutineDetail(Routine routine) {
            currentRoutine = routine;
            routineDialog = new RoutineDialog (routine);
            context = new BindingContext (this, routineDialog, "Routine Details");
            detailsScreen = new DialogViewController (context.Root, true);

            var testElement = new RootElement ("Test"){
                new Section () {
                    new DateElement("Testing", DateTime.Now)
                }
            };
            context.Root.Add( testElement );
            ActivateController(detailsScreen);

        }

Thanks for taking a look.

Best regards, Ben


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>