FlowDocument support

Jul 2, 2013 at 10:12 AM
Hello,

first of all thanks for great extension!
  1. Is problem with VS 2012 designer still does not solved? Is there any hope?
  2. Is it possible to use localization in FlowDocuments ?
Coordinator
Jul 2, 2013 at 12:22 PM
Hi kDanil,

if you mean this thing here then i have bad news.

To the flow documents: i'm not actively developing in wpf anymore... i would suggest you to just try it out :)

Cheers
Jul 2, 2013 at 10:43 PM
kDanil, did you find a way to use wpf locatization extension in FlowDocuments?
Jul 3, 2013 at 11:52 AM
Unfortunately not.
Coordinator
Jul 9, 2013 at 7:44 PM
Hi,

Do you have a simple demonstration example that shows what you want to do with FlowDocuments? I've not used these classes upto now and maybe we could work on this.

Best regards,
Uwe
Jul 9, 2013 at 8:30 PM
Maybe something like this:

<Page x:Class="Abc.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:lex="http://wpflocalizeextension.codeplex.com"
lex:LocalizeDictionary.DesignCulture="pl-PL"
lex:ResxLocalizationProvider.DefaultAssembly="Abc"
lex:ResxLocalizationProvider.DefaultDictionary="Language">

<FlowDocumentScrollViewer>      
    <FlowDocument>                      
        <Paragraph><Run Text="{lex:Loc ParagraphText}" /></Paragraph>
    </FlowDocument>
</FlowDocumentScrollViewer>
</Page>
Coordinator
Jul 9, 2013 at 8:56 PM
Here we have again an example of broken or missing parent-child relationships. You have to use the full assembly:dict:key syntax in the extension. Sorry for that.
Jul 9, 2013 at 9:02 PM
Sorry for maybe childish question, but why?
Coordinator
Jul 9, 2013 at 9:36 PM
There are no stupid questions - only stupid answers :-)
I've just described this effect a lot of times before.

The engine tries to look up the assembly and dictionary attached properties from the target object in the visual or logical tree. If this object is located in an island that can't be traced to the top level framework element (usually the main window) using the Parent properties, this approach failes and it needs these settings directly at the extension key.
Jul 9, 2013 at 9:59 PM
You're great :) It works. Thank you for your help.
Jul 9, 2013 at 10:01 PM
the right way how it should be done:
<Page x:Class="Abc.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:lex="http://wpflocalizeextension.codeplex.com"
lex:LocalizeDictionary.DesignCulture="pl-PL"
lex:ResxLocalizationProvider.DefaultAssembly="Abc"
lex:ResxLocalizationProvider.DefaultDictionary="Language">

<FlowDocumentScrollViewer>      
    <FlowDocument>                      
        <Paragraph><Run Text="{lex:Loc Abc:Language:ParagraphText}" /></Paragraph>
    </FlowDocument>
</FlowDocumentScrollViewer>
</Page>