How to change string text in xaml

I have string text in ListPickerItem like this
<toolkit:ListPicker x:Name="items" FullModeHeader="Items" Background="White" Margin="10,280,14,0" VerticalAlignment="Top" Foreground="Black" FontSize="25.333">
<toolkit:ListPicker.Header>
<TextBlock x:Name="Choose_Items" Opacity="0.8" Text="Choose Items" Foreground="White"/>
</toolkit:ListPicker.Header>
<corelib:String>item1</corelib:String>
<corelib:String>item2</corelib:String>
<corelib:String>item3</corelib:String>
<corelib:String>item4</corelib:String>
<corelib:String>item5</corelib:String>
<corelib:String>item6</corelib:String>
<corelib:String>item7</corelib:String>
<corelib:String>item8</corelib:String>
</toolkit:ListPicker>
So in code I want to change this text by the resource each string have another value like this
And the code is
Public Shared Iterator Function FindVisualChildren(ByVal obj As DependencyObject) As IEnumerable(Of DependencyObject)
If obj IsNot Nothing Then
For i As Integer = 0 To VisualTreeHelper.GetChildrenCount(obj) - 1
Dim child As DependencyObject = VisualTreeHelper.GetChild(obj, i)
If child IsNot Nothing Then
Yield child
End If
For Each subChild In FindVisualChildren(child)
Yield subChild
Next
Next
End If
End Function
Private Sub Change()
Dim rm As New ResourceManager("App.Resource1", GetType(MainPage).Assembly)
Dim main As Grid = ContentPanel
Dim result = FindVisualChildren(main)
Dim ST = result.OfType(Of String)()
For Each item In ST
item = rm.GetString(item.Text)
Next
End Sub
So How I can make right code to run like this problem ??
Thanks :)

Hi Shay Boshra,
Based on your description, it seems that you want to change the ListPickerItem content based on the resource file, if I do not misunderstand you, an easy way to implement it is that first you can define the ListPicker as following:
In the MainPage.xaml:
<toolkit:ListPicker x:Name="items" Background="White" Margin="0,-11,24,0" VerticalAlignment="Top" Foreground="Black" FontSize="25.333">
<toolkit:ListPicker.Header>
<TextBlock x:Name="Choose_Items" Opacity="0.8" Text="Choose Items" Foreground="White"/>
</toolkit:ListPicker.Header>
<toolkit:ListPickerItem Content="item1"></toolkit:ListPickerItem>
<toolkit:ListPickerItem Content="item2"></toolkit:ListPickerItem>
<toolkit:ListPickerItem Content="item3"></toolkit:ListPickerItem>
<toolkit:ListPickerItem Content="item4"></toolkit:ListPickerItem>
<toolkit:ListPickerItem Content="item5"></toolkit:ListPickerItem>
</toolkit:ListPicker>
<Button Content="Change Text" HorizontalAlignment="Left" Margin="20,446,0,0" VerticalAlignment="Top" Click="Button_Click" Width="299"/>
In the MainPage.xaml.cs:
Private Sub Button_Click(sender As Object, e As RoutedEventArgs)
Dim ResourceManager As New ResourceManager("App.Resource1", GetType(MainPage).Assembly)
For Each listpickitem As ListPickerItem In items.Items
listpickitem.Content = ResourceManager.GetString(listpickitem.Content.ToString())
Next
End Sub
The result:
Best Regards,
Amy Peng
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

  • HoW to ChaNGE the text in the mobile application to be in MulTi-CoLoR text

    _*  Do anyone can tell me how to change the text in the mobile application to be in multi-color text, to make it more interesting and increase readability?
    Is it using the Graphic's paint() method? or any better suggestion?
    Please give the short example if can?
    Please help... "_"
    Hearing from u all soon...@_@
    thanks....

    Go into outline view. If you can see the outlines of the letterforms, you can't just change the text. If the letterforms are solid black, take the type tool, select the text and type yours.
    Anyway you can just select the letters, take the type tool and type new text.
    Working with the type tool is a basic. Please see the manual for details

  • How to change the text of a user defined field in dynamic selections?

    Logical Database PSJ is used by t code CJI3 - we added a couple of user fields into the dynamic selections of CJI3.
    Now - how to change the text of this user filed (USR01 of structure PRSP_R in logical database PSJ)?
    Found an OSS note - 86980 - that tells that this is not possible.
    But when we read the documentation on the user field (CJI3 - dynamic selections  - double click on user field - F1), it shows the following text:
    User-defined field in which you can enter general information with a length of up to 20 characters.
    Dependencies
    The names (key words) for  user-defined fields depend on the field key.
    Now the question is where to change the field key..
    Thanks,
    Ven

    Madhu - you did not get the question I think.
    Anyways - I found an OSS note 1266643 - this code change should take care of the issue - it will then reflect the details maintained in custoizng at transaction code OPS1..
    Thanks,

  • How to change the text of label dynamically

    Hi all,
    I have done a dynpro program.It requires to implement the dynamically display the label text, for example: there is a label, sometimes, we want to display "Purchase Order" and sometimes we want to display "Sales Order". Can anyone tell me how to change the text of label according to my requirements? thanks in advance!

    Hi Wei,
    AS of now you will not be able to change the Text Field ( Label ) dynamically or at runtime. This is a limitation.Refer to this link:
    http://help.sap.com/saphelp_nw04/helpdata/en/e4/2adbef449911d1949c0000e8353423/frameset.htm
    But, there is a way around.
    You can make a text field Visible / Invisible based on your program logic. So, based on what you want, you can process a module which will take care of that.
    Have a look at these DEMO Code. You can have a good idea to implement the logic.
    DEMO_DYNPRO_MODIFY_SCREEN - Demonstration of Dynamic Screen Modifications
    Thanks,
    Samantak.

  • How to change the text "form of address" while Create User in EP6.0??

    Hi All,
      We are using NDS 2.0.9 & EP6.0.
      I have the following doubts:
      1) I have to change the text <b>Form of Address</b> which comes when we <b>Create User</b> in EP.
      Can any1 please let me know how to change that text? Is there any .par file? What is the name of .par file (if any) which is used to <b>Create User</b> in EP6.0??
      2) I am getting the value of this <b>form of address</b> by <b>request.getSalutation()</b> in PDK, but this value is coming in the <b>Welcome Message</b> in the masthead. I tried to change the masthead by changing the corresponding code, but i am getting a runtime error. Is there any other method of making this salutation value <b>NOT</b> appear in the masthead welcome message?
      Please help me in this regard. Thanks in Advance. Bye.
    <b>Regards,
    Sai Krishna.</b>

    Hi Sai Krishna,
    within HeadiView.jsp, you'll find this code fragment:     
    if(salutation != null) {
      return java.text.MessageFormat.format(welcomeClause, new Object[] {firstName, lastName, salutation}).toString();
    } else {
      return java.text.MessageFormat.format(welcomeClause, new Object[] {firstName, lastName, " "}).toString();
    Just delete the first part and always use the second:
    return java.text.MessageFormat.format(welcomeClause, new Object[] {firstName, lastName, " "}).toString();
    This will delete the salutation without errors
    Hope it helps
    Detlev
    PS: For both solutions, 1. and 2., think of it: These workarounds will be overwritten witch patches / maybe hotfixes.

  • How to change the text of a field in organisational assignment.

    hi gurus,
    how to change the text of field MSTBR (super visor) to a differnt name in info type pa0001.
    i have changed the field name in cmod , changed name appears in table.but it is not appearing in the info type screen 0001.
    how to resolve this pls help me..

    hi,
    The Field showing in the infotype 1 is FORPR.
    Change the text of this Field in CMOD.
    CMOD ->Go to ->tect Enhancements->keywords-> Change ->FORPR
    Change the text and check again.
    Regards,
    Manoj.

  • How to change the text of customer tab in Me23n

    Hi
    I have added new customer tab in Me23n at item level.
    Its text is Customer Data.
    I would like to change to some other text.
    How to change the text of customer tab in Me23n
    Regards
    Amruta

    Amruta,
    I had the same query today and finally found the answer.
    In order to change the title text or description of the "Customer Data" tab in ME23N, etc. you need to define a new text symbol in program SAPLXM06. The text symbol must be number 111 for the PO data. Make sure you define this text symbol in the language you are using when viewing the PO. I had issues with this as the original language of object SAPXM06 is not my logon language.
    The standard code which picks up this text is in function module MEGUI_BUILD_PO_ITEM_PLUGIN. I could not find any documentation around this functionality.
    Hope this helps!
    Ben

  • How to change the text of a button dynamically in module pool

    hi gurus,
    how to change the text of button dynamically

    Hi ,
    Declare a variable in TOP Include with your button name.
    Example : P_BUTTON(20) TYPE C.
    Place button with name P_BUTTON on you screen. Do not forget to mark it as "Output Field". [ Double click on button, Attributes --> Program tab --> tick "Output Field".
    In you PBO / PAI , whereever you want to change your text -
    Assign value to P_BUTTON.
    Example -
    iF COND1..
    P_BUTTON = 'EDIT'.
    ELSEIF COND2.
    P_BUTTON = 'DISPLAY'.
    ENDIF.
    Regards,
    Mohaiyuddin

  • How to change the text of a RadioButton in JDeveloper 11.1.2.0.0

    How to change the text of a RadioButton in JDeveloper 11.1.2.0.0

    Select the radio button, open the property inspector (ctrl+shift+i) select the 'Visual' tab and search for the 'Text' property. There you can change the text.
    Timo

  • How to change a text item to have a link that opens a different page?

    Hi,
    How to change a text item to have a link that opens a different page?
    Thanks,
    Guy

    Hi Denes,
    I understood what the code will do. But it did not work.
    ...a href="f?p=&APP_ID.:2:&SESSION.">LINK</a...
    By default, P5_TASK_NAME displays Task Name which is passed from Page 3.
    So I changed your code as follows so that P5_TASK_NAME value may be displayed with a link.
    ...a href="f?p=&APP_ID.:3:&SESSION.">:P5_TASK_NAME</a...
    But P5_TASK_NAME value appears without any link and does not open page 3.
    Then I created a new text item (display only) in the same HTML region in page 5 and entered the following code in the default box:
    ...a href="f?p=&APP_ID.:3:&SESSION.">LINK</a...
    When I ran the application, it displayed the whole code as text.
    How can I display P5_TASK_NAME value with a link to open page 3?
    Would appreciate your help.
    ... to be replaced with < or >
    Could you please let me know how to display link code correctly?
    Thanks,
    Guy
    Edited by: GUY3 on Mar 11, 2009 4:20 PM

  • How to change standard text in(me33k)?

    How to change standard text in me33k (under Reference data : Dept/Proj Manager) field. I tried it changing in CMOD - under Goto in Text enhancements in Keywords then Change . I did this change and in table ekko-verkf I can see the change, but in me33k I cannot . Appreciate if anybody can  reply back soon and help me solve this issue? points awarded for sure.

    If u are talking about the text  related to a Contract by (Trx ME33K --> Header --> Texts --> Text Overview).
    Then u need to use the FM create_text and then put the import parameters as
    Text Name     =  (contract number)
    Language       = EN
    Text ID        = K00  Release order header  text put K01 for first item text K02 for second item text so on
    Text object    = EKKO       Purchasing doc. header texts
    and then call bapi_transaction_commit
    u ll be a ble to find the changes
    thnks
    kanishak

  • How to change standard text in portal

    How to change standard text in portal
    Pls reply

    Archana,
    Please post it in the relevant forum(Portal Implementation/development)
    What text do you want to change.
    Thanks
    Bala Duvvuri

  • How to change the text under RECORD WORKING TIME IN ESS.

    Hi,
    How to change the text under RECORD WORKING TIME in ESS.
    Is there any setting at page or iview level?
    Please help me.
    Regards,
    Thirun.

    Hi,
    If it is standard business package ,then check home page framework
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/b0e3a488-cdc2-2b10-209b-e01a0ed934b4
    Regards
    Koti Reddy

  • How to change the text Transport id code in sus

    Hi,
    How to change the text Transport id code in sus while creating ASN
    Please advise.
    Regards,
    manu

    SE80---> BSP APPLICATION with SRMSUS ---> views -->asn > detail_edit.inc.->
    On the right hand side in the details ---> search for
    BBP_SUS_UI/ASN_TRANSPORT_IDENTIFICATION
    replace the above with the following
    BBP_SUS_UI/INVOICE_DOCUMENT_NUMBER
    BBP_SUS_UI/INVOICE.
    there is no entry available for invoice number , only the above two are available.
    save the changes
    activate the changes
    REWARD POINTS IF USEFULL

  • How do change the text color in the variable screen ?

    Hi Experts ,
    I would like to know about , How do change the text color in the variable screen ?
    Using web templates (Analytical) can get the output. It has the variable screen contains 6 fields (Company code, Country , Region , COB, Plant and Purchasing Group). I want to make RED color text on Plant. Please help me .
    Thank you ,
    Prasad.

    Hi,
    I am looking for nearly the same. What I have found is that it seems to manipulate the SAP theme that is used in standard when template is executed in the portal. Just display the source code of the HTML and there you will see the included SAP theme (normally SAP_TRADESHOW). Then you have to go to the SAP portal and change this stuff. But for that you have to know where to find it and what impact this change has.
    I am not pretty sure if this is the right way. But as I want to change the standard layout of a whole template to a customer specific layout I think there is no other way in BI7.0.
    Regards,
    Peter

Maybe you are looking for

  • How to put a push button in the top of page of ALV

    Hi at all, I need to put a push button in TOP OF PAGE . My code is below and i'd like to put a push button to do something. FORM top_of_page USING r_ddoc TYPE REF TO cl_dd_document.   DATA: text TYPE sdydo_text_element.   DATA: text_table TYPE sdydo_

  • OS X(Leopard) Keeps quitting, I have to shut down/restart everytime (help)!

    I don't know what's going on, but for the last day or two I've come back to my laptop and found that it's completely unresponsive and that I have to turn it off and turn it back on again. I was streaming a video to my 360 when it said it lost connect

  • Windows User thinking of Mac-What's included?

    Hey, I'm wondering whats included with a Mac. For instamce, I use notepad, character map, sound recorder occasionally, etc- Is there similar standard applications? Is there a System Restore style clone, to restore the OS should need be? I use Office

  • Is this converter even worth buying?

    Hey, I found this converter on google and it works okay to me... But I wanna see what you guys think of it and tell me if its even worth buying. http://www.pqdvd.com/dvd-to-ipod-video-converter.html Thanks  Windows XP   2.8 Ghz 512MB of Ram 70.4Gb Ha

  • Add a view on custom view container

    Hello to everybody, first of all i'm not an expert on java wd. I'm triing to modify a stardard view of ESS package whit JDI. I need add a custom view . First of all i created my web dynpro component whit her view. Later i add a view container in stan