XAMLMarkupExtensions/WPFLocalizeExtension

rework documentation

konne opened this issue · 4 comments

konne commented
  • move wiki -> /docs/ so that they are part of the code and can be changed with PRs
  • add simple start examples
  • explain the concept assembly:resource:key
  • explain why even {lex:Loc} can work
  • explain why {lex:Loc} can nearly everything and {lex:LocText} & co. is not intended to use any more
  • update table of content
  • add missing key handling / event and possibility to even deliver own fallbacks

@SeriousM Thanks for the reply, if you want, I can send a PR for readme
Right now I have a problems Which is very annoying
I constantly encounter binding errors

System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.FrameworkElement', AncestorLevel='1''. BindingExpression:Path=Parent; DataItem=null; target element is 'ContextMenu' (Name=''); target property is 'Parent' (type 'DependencyObject')
System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.FrameworkElement', AncestorLevel='1''. BindingExpression:Path=Parent; DataItem=null; target element is 'ContextMenu' (Name=''); target property is 'Parent' (type 'DependencyObject')
System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.FrameworkElement', AncestorLevel='1''. BindingExpression:Path=Parent; DataItem=null; target element is 'ContextMenu' (Name=''); target property is 'Parent' (type 'DependencyObject')
System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.FrameworkElement', AncestorLevel='1''. BindingExpression:Path=Parent; DataItem=null; target element is 'Grid' (Name=''); target property is 'Parent' (type 'DependencyObject')

I know the solution

Add the assembly and dictionary to the key, according to the: "Assembly:Dictionary:Key" notation. Or add these attached properties to a suitable place in the ContexMenu visual (sub-)tree
try this:

<MenuItem Header="{hc:Localization StyletApp1:Resource:Test}"/>
or this

<ContextMenu hc:ResxLocalizationProvider.DefaultAssembly="StyletApp1" hc:ResxLocalizationProvider.DefaultDictionary="Resource">
            <MenuItem Header="{hc:Localization Test}"/>
            <MenuItem Header="asd"/>
            <MenuItem Header="asd"/>
        </ContextMenu>

But I have to constantly specify the dictionary and assembly for the controls that have this problem.
I just want to specify the dictionary and assembly once and that's it

konne commented

@ghost1372

Why this repo has no activity?
The main issue is that I, unfortunately, don't use that lib in my daily job and I have not enough time.

I have also written a better documentation based on your documentation.
Maybe help you rewrite the documentation
yes, yes. I plan to have next week a big coding session and please open PRs and I will try to get them at least for
Docu changes asap merged.