public MainPage()
{
this.InitializeComponent();
RichEditBox rbox = new RichEditBox();
Canva.Children.Add(rbox);
rbox.Document.SetText(0, "asdfasfasdfasdfasdfoiuytredfxbnuytrxgd ");
rbox.Document.GetRange(0,10).CharacterFormat.Name = "ms-appx:///" + "Aguafina Script" + ".ttf#" + "Aguafina Script";
rbox.Document.GetDefaultCharacterFormat().Name = "ms-appx:///" + "Aguafina Script" + ".ttf#" + "Aguafina Script";
}
From the above code by setting the fontfamily to the DefaultCharacterFormat is raising exception System.ArgumentException: 'Value does not fall within the expected range.' but setting the fontfamily for the range is working fine.