Cambio de ItemsSource [英] Cambio de ItemsSource

查看:61
本文介绍了Cambio de ItemsSource的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hola,intento solucionar de lamaneramásfácil(y correcta)un cambio en el origen del ItemsSource

Hola, intento solucionar de la manera más fácil (y correcta) un cambio en el origen del ItemsSource

Inicialmenteestádefinidode la siguiente manera:

Inicialmente está definido de la siguiente manera:

            ItemsSource =" {Binding Source = {StaticResource
arrCmbPage2Personas },XPath = *,Mode = OneTime}"

            ItemsSource="{Binding Source={StaticResource arrCmbPage2Personas},XPath=*,Mode=OneTime}"

y quisiera poder modificarlo por código,si el origen esotrapágina,lasiguientedefinición:

y quisiera poder modificarlo por código, si el origen es otra página, a la siguiente definición:

            ItemsSource =" {Binding Source = {StaticResource
arrCmbPage2Turnos },XPath = *,Mode = OneTime}"

            ItemsSource="{Binding Source={StaticResource arrCmbPage2Turnos},XPath=*,Mode=OneTime}"

Espero haber sido claro con lo que busco。

Espero haber sido claro con lo que busco.

Saludos                    

Saludos                    

推荐答案

翻译自西班牙语:

Translated from Spanish:

你好,我试着解决最简单(也是正确)的方式更改物品来源的原因

最初的定义如下:

             ItemsSource =  " {Binding Source = {StaticResource ArrCmbPage2Personas},XPath = *,Mode = OneTime}"

我希望能够通过代码修改它,如果源是另一个页面,则以下定义:

            ItemsSource =  " {Binding Source = {StaticResource ArrCmbPage2Turnos},XPath = *,Mode = OneTime}"
Hello, I try to solve in the easiest (and correct) way a change in the origin of the ItemsSource
It is initially defined as follows:
            ItemsSource =  "{Binding Source = {StaticResource ArrCmbPage2Personas}, XPath = *, Mode = OneTime} "
And I want to be able to modify it by code, if the source is another page, to the following definition:
            ItemsSource =  "{Binding Source = {StaticResource ArrCmbPage2Turnos}, XPath = *, Mode = OneTime} "


这篇关于Cambio de ItemsSource的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆