-
-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hc:Localization design time error #67
Comments
Thank you I will solve the problem soon |
@GF-Huang Please test beta 11 to see if the issue is fixed or not |
Where's the beta 11? |
you should use nightly build |
BTW, why not push nightly or preview version to nuget? |
Beta 11 works well. |
|
use this type of localization if you want to use key with arguments Argument Binding LocalizationFirst Create two Key in Resx file. Name: Name: Then create a string Property private string _SomeProperty = "Bye!";
public string SomeProperty
{
get { return _SomeProperty; }
set { _SomeProperty = value;}
} Now <TextBlock>
<TextBlock.Text>
<hc:Localization Key="SomeKey">
<Binding Source="{hc:Localization SomeKey2}"/>
<Binding Path="SomeProperty" />
</hc:Localization>
</TextBlock.Text>
</TextBlock> OR Create a Key in Resx file. Name: Then create a string Property private string _SomeProperty = "HandyControl";
public string SomeProperty
{
get { return _SomeProperty; }
set { _SomeProperty = value;}
} Now <TextBlock>
<TextBlock.Text>
<hc:Localization Key="SomeKey">
<Binding Path="SomeProperty" />
</hc:Localization>
</TextBlock.Text>
</TextBlock> Static Arguments LocalizationFirst Create a Name: Then Create an array in Xaml <x:Array x:Key="SomeArray" Type="system:String" xmlns:system="clr-namespace:System;assembly=mscorlib">
<system:String>A</system:String>
<system:String>B</system:String>
<system:String>C</system:String>
</x:Array> Now we can use our array in our localization <TextBlock>
<TextBlock.Text>
<hc:Localization Key="SomeKey" Arguments="{StaticResource SomeArray}" />
</TextBlock.Text>
</TextBlock> I will update docs tonight |
Run time no error, just design time. Refresh and rebuild not fix.
The text was updated successfully, but these errors were encountered: