How to Set inline Images Vertically Center in RichTextBox

非 Y 不嫁゛ 提交于 2019-12-01 00:18:00
I am working on WPF, i am display RichText data in RichTextBox for that have taken WindowsFormHost, inside that i am taking WinForm RichTextBox to display RichTextData which have Images + Text. But while display that RichTextData images are align to Top and text are align to Bottom, See in Image below, red circle is RichTextImage i want to display images and Text in center. Like Below Image, the Red Circle is RichTextImage that is coming in center with text. My XAML Code is: <Window x:Class="WPFRichTextBox.MainWindow" xmlns="" xmlns:x=

ScrollViewer is not working in WPF WindowsFormHost

不问归期 提交于 2019-11-30 05:12:23
I have WindowsFormHost with a RichTextBox in my WPF form, i have given ScrollViewer for that WindowsFormHost but its not working, WindowsFormHost going outside of ScrollViewer... My XAML is.. <ScrollViewer Background="DarkOrange" VerticalScrollBarVisibility="Auto" Height="80" MaxHeight="85" Margin="11,243,12,218" Width="756"> <Canvas Height="100" Name="canvas1" Width="auto" > <WindowsFormsHost ClipToBounds="True" Height="120" Width="715" Margin="10,5,0,0" Name="winHostTEst" Background="Gray"> <wf:RichTextBox BackColor="Cornsilk" Text="RichTextBox" x:Name="richTbTest" BorderStyle="None" Enabled