locked
Can anyone help me that how can i put this entry property in Frame for the corner radius .? RRS feed

  • Question

  • User395117 posted

    Entry hoursEntry = new Entry { TextColor = Color.Black, Placeholder = "hh" };

    Tuesday, June 9, 2020 9:00 PM

All replies

  • User369979 posted

    Assign this entry to a frame and then display them on the page like:

    var frame = new Frame();
    frame.CornerRadius = 5;
    
    Entry hoursEntry = new Entry
    { TextColor = Color.Black, Placeholder = "hh" };
    
    frame.Content = hoursEntry;
    frame.Margin = new Thickness(50, 0);
    
    this.Content = new StackLayout
    {
        Children =
        {
            frame
        }
    };
    

    Put this code in a content page's constructor:

    public MainPage()
    {
        InitializeComponent();
    
        // ...
    }
    
    Wednesday, June 10, 2020 2:04 AM