Instagram like RichEditBox in uwp

Ali Noshahi 26 Reputation points

Hi everyone,

Is it possible to have RichEditBox that starts typing every Paragraph / Sentence in an origin Font size and keep going till font size is higher than X value and adding every word cause a little font size decreasing to align the text in one line exactly like what Instagram did.
I've uploaded a little video of what I want.
I couldn't attach here

Universal Windows Platform (UWP)
0 comments No comments
{count} vote

Accepted answer
  1. Nico Zhu (Shanghai Wicresoft Co,.Ltd.) 12,861 Reputation points

    Instagram like RichEditBox in uwp

    There is no such control in uwp platform, currently there is a workaround that insert Textbox into ViewBox that will set the text fontsize automatically. Then make new TextBlock with text and insert it into the root layout.

    private string resault;  
    private int count = 0;  
    private void TextBox_TextChanged(object sender, TextChangedEventArgs e)  
        var tb = sender as TextBox;  
        resault = tb.Text;        
    private void TextBox_KeyDown(object sender, KeyRoutedEventArgs e)  
        if(e.Key== VirtualKey.Enter)  
            var textbox = new TextBlock() {  
            VerticalAlignment = VerticalAlignment.Center,  
            HorizontalAlignment = HorizontalAlignment.Center,  
            Text= resault  
            RootLayout.Children.Insert(count++, textbox);  
            Tbox.Text = string.Empty;  

    alt text

    2 people found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Franck_1999 1 Reputation point

    this is a good solution but like Nico say its hard to design .fontsize is 14 it's good

    0 comments No comments