Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

RitchTextBox Color Dynamic Resources

$
0
0

When I use following FlowDocument in the demo VSPackage project it isn't rendered in RichTextBox at all. And even I define BlackColor in resource dictionary(<RichTextBox.Resources><Color x:Key="BlackColor">Black</Color></RichTextBox.Resources>), I have unexpected behaviour with copy/paste operation. I created this flow document using standart manipulation in runtime. 

<StackPanel Orientation="Vertical"><TextBlock Margin="10" HorizontalAlignment="Center">My Tool Window</TextBlock><Button Content="_Click Me!" Click="button1_Click" Width="120" Height="80" Name="button1"/><RichTextBox Height="400"><FlowDocument><Section><Section.Foreground><SolidColorBrush Color="{DynamicResource BlackColor}" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" /></Section.Foreground><Paragraph><Run>l,;,l;,l,;l,;l,ll;,l,;l,</Run><Run><Run.Foreground><SolidColorBrush Color="{DynamicResource BlackColor}" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" /></Run.Foreground> ;l,lrfrfffffffffffffffffffffffffffffffffffff</Run></Paragraph></Section></FlowDocument></RichTextBox></StackPanel>
    

My vs config: cofig




Viewing all articles
Browse latest Browse all 4410

Trending Articles