Git Product home page Git Product logo

Comments (4)

GiantappMan avatar GiantappMan commented on May 20, 2024

在UpdateCulture前,自己做一个全局事件,手动去更新相应的控件.
例如:

class YourManager{
 public static event LanguageChanged{ge;set;}
  static Change(string culture){
    LanguageChanged();
    LanService.UpdateCulture(culture);
  }
}

YourManger.LanguageChanged+=Changed();
void Changed(){
  text.Value=LanService.Get("Key");
}

手打的,仅供参考

from multilanguageforxaml.

biaji2017 avatar biaji2017 commented on May 20, 2024

嗯嗯,我也是这么想的,在想您有没有更好的方法~ 谢谢!

另外:我看demo里没有用户控件的例子,只有一个用户控件的说明。 我先验证一下,有问题的话再具体问您!

from multilanguageforxaml.

biaji2017 avatar biaji2017 commented on May 20, 2024

我有个想法,是关于换皮肤的,也是用您切换语言这一套方案。 (做这套方案的初衷:平台有皮肤库,产品线直接引用,支持产品线修改(指定文件夹加同名文件,则覆盖平台对应文件)和扩展(指定文件夹加新文件))
切换皮肤只是最外层文件夹不一样,其他都是一样的。

这个方案整体应该是可行的,但是看到切换多语言的代码注释说可能有性能问题,所以想咨询一下就您的经验来看,从性能方面来说,这种切皮肤的方案,有没有可行性,性能会不会非常差呀?

一套模板,切皮肤相当于把所有图片文件地址及时翻译一下,重新动态绑定。

from multilanguageforxaml.

GiantappMan avatar GiantappMan commented on May 20, 2024

一般小项目可以不纠结这点性能开销,好用就行了

from multilanguageforxaml.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.