<TextBlock Width="29" Height="16" Canvas.Left="4" Canvas.Top="1" Foreground="#FFC5C5C5" Text="中文" TextWrapping="Wrap" FontFamily="Tahoma" FontSize="11"/>
正常用没有问题 xamlString = xamlString + " <TextBlock x:Name='MtileTarget$0' Canvas.Top='9' Canvas.Left='$6'
FontFamily='Arial' FontSize='34' FontWeight='bold' Text='$1' />";
xamlString = xamlString + " <TextBlock Canvas.Top='36' Canvas.Left='37.5' FontFamily='Arial'
FontSize='12' FontWeight='bold' Text='$5' />";
上面这段是从FebCTPSamples\TileText中拿到的,但这个例子输入中文显示为方框,日文也是。FontFamily='Arial' FontSize='34' FontWeight='bold' Text='$1' />";
xamlString = xamlString + " <TextBlock Canvas.Top='36' Canvas.Left='37.5' FontFamily='Arial'
FontSize='12' FontWeight='bold' Text='$5' />";
下面这么改也无法显示,英文则可以。
var wpfeControl = document.getElementById("wpfeControl1");
var root = wpfeControl.findName("MtileTarget1");
root["Text"]="ぁ";
var root = wpfeControl.findName("MtileTarget1");
root["Text"]="ぁ";