Applabtodotesting.TodoDetail.TodoDetail C# (CSharp) Method

TodoDetail() public method

public TodoDetail ( TodoItem todoItem ) : System
todoItem Applabtodotesting.Core.TodoItem
return System
        public TodoDetail(TodoItem todoItem)
        {
            BindingContext = todoItem;
            var titleLabel = new Label () {
                FontSize = Device.GetNamedSize(NamedSize.Large, typeof(Label)),
                Text = todoItem.Title
            };

            var descriptionLabel = new Label{
                FontSize = Device.GetNamedSize(NamedSize.Medium, typeof(Label)),
                Text = todoItem.Description
            };
            Content = new StackLayout {
                Children = {
                    titleLabel,
                    descriptionLabel
                },
            };
            Padding = new Thickness (10, Device.OnPlatform (20, 0, 0));

            ToolbarItems.Add (new ToolbarItem {
                Text = todoItem.IsCompleted ? "Gjenåpne" : "Fullfør",
                Order = ToolbarItemOrder.Primary,
                Command = new Command(Complete)
            });

            Title = todoItem.Title;
        }