Cambio de ItemsSource [英] 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}"
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屋!