How can I get my TextBlock to have a "strike-through"?

I already have a template where I have been using a line to strike-through a Combobox items in its popup listbox.
But now I have the case where I have the same item in a datagrid row.  And the column can be resized.  The TextBlock allows wrapping and does, but how can I use that template when the text wraps?  The line is only on one line of the wrapped
text.
The template I'm using is:
<DataTemplate x:Key="EO_ActionItemPersonAssignedTemplate2">
<Grid>
<Line
Stroke="Gray"
StrokeThickness="1"
VerticalAlignment="Center"
HorizontalAlignment="Stretch"
Stretch="Fill"
X1="0"
X2="{Binding ActualWidth, ElementName=text1}"
Visibility="{Binding AssignedToPersonEnabled, Converter={StaticResource EO_BooleanToVisibility}, ConverterParameter=Reverse}"
/>
<TextBlock
x:Name="text1"
Text="{Binding LastnameFirstname}"
ToolTipService.ToolTip="{Binding EnabledTooltip}"
VerticalAlignment="Center"
HorizontalAlignment="Left"
TextWrapping="Wrap"
/>
</Grid>
</DataTemplate>

A better solution.
You need a fixed width font for the textblocks.
<UserControl x:Class="SilverlightApplication1.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:local="clr-namespace:SilverlightApplication1"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="400"
FontFamily="Courier New"
>
<Grid x:Name="LayoutRoot" Background="White">
<Grid.Resources>
<local:UnderlineConverter x:Key="underlineConverter"/>
<DataTemplate x:Key="TestTemplate">
<Border HorizontalAlignment="Left" Loaded="Border_Loaded">
<Grid VerticalAlignment="Center">
<TextBlock TextWrapping="Wrap"
Text="{Binding Name}" Foreground="Gray" />
<TextBlock TextWrapping="Wrap"
Text="{Binding Name, Converter={StaticResource underlineConverter}}" Foreground="Black" Margin="0,-6,0,0" />
</Grid>
</Border>
</DataTemplate>
</Grid.Resources>
<StackPanel>
<sdk:DataGrid ItemsSource="{Binding Items}" AutoGenerateColumns="False">
<sdk:DataGrid.Columns>
<sdk:DataGridTemplateColumn Header="Name" CellTemplate="{StaticResource TestTemplate}" Width="100"/>
</sdk:DataGrid.Columns>
</sdk:DataGrid>
<ComboBox Name="cbo"
ItemsSource="{Binding Items}"
ItemTemplate="{StaticResource TestTemplate}" Height="30" Width="300"
/>
</StackPanel>
</Grid>
</UserControl>
Converter:
public class UnderlineConverter : IValueConverter
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
if (value != null)
string str = value as string;
string underLines = new String(str.Select(r => r == ' ' ? ' ' : '_').ToArray());
return underLines;
return "";
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
throw new NotImplementedException();
Hope that helps.
Technet articles: Uneventful MVVM;
All my Technet Articles

Similar Messages

  • How can i get the music i have on my ipod over to the new computer?

    how can i get the music i have on my ipod over to the new computer?
    The old computer has crashed and i can't get it out from that one.
    So the problem is that i want my old music on my new computer.
    Someone please help.

    Sven,
    The article linked below details how to go about transferring your purchased content from your iPod to your new computer.
    Re-download or transfer your iTunes Store purchases from an iPhone, iPad or iPod to a computer
    https://support.apple.com/en-us/HT201267
    All my best,
    Allen

  • I have a 7D but the serial stiker its gone and i need the SN how can i get it (i dont have the box)

    i have a 7D but the serial stiker its gone and i need the SN how can i get it (i dont have the box) is there a way to find it on the camera menu?
    Solved!
    Go to Solution.

    The serial number is in the EXIF.  Any EXIF reader will display it.
    EOS 1Ds Mk III, EOS 1D Mk IV EF 50mm f1.2 L, EF 24-70mm f2.8 L,
    EF 70-200mm f2.8 L IS II, Sigma 120-300mm f2.8 EX APO
    Photoshop CS6, ACR 8.7, Lightroom 5.7

  • I have a new ipad and a iphone 5 which are under same Apple ID. I lso have a macbook that uses an older apple ID. How can I get the macbook to have same Apple ID as the other 2 devices

    I have a new ipad and a iphone 5 which are under same Apple ID. I lso have a macbook that uses an older apple ID. How can I get the macbook to have same Apple ID as the other 2 devices

    Have a read here...
    https://discussions.apple.com/message/18409815?ac_cid=ha
    And See Here...
    How to Use Multiple iDevices with One Computer

  • There is a show on the US itunes and it isnt on the canadian one and i want it so how can i get it because i have canadian itunes

    There is a show on the US itunes and it isnt on the canadian one and i want it so how can i get it because i have canadian itunes?

    You cannot use other countries itunes stores.
    Sorry

  • I have a Macbook Pro early 2011. i don't have AirPlay on my computer. How can I get it. I have read that early 2011 should have the AirPlay option. Any ideas please.

    I have a Macbook Pro early 2011. i don't have AirPlay on my computer. How can I get it. I have read that early 2011 should have the AirPlay option. Any ideas please.

    Hi All,
    I need your expert advice to proceed. I bought apple TV and it works fine with my iPad and iPhones also fine with itune of my Mac Book Pro BUT I am not seeing setting which says "Airplay Mirroring" in system preference -> Display at all.
    I checked my mac serial number and it shows the model as below. As far as I understood this feature should be there from 2011 onwards.
    MacBook Pro (13-inch, Late 2011)
    Software  Mac OS X Lion 10.7.5 (11G63b)
    Please suggest!!
    Thanks and Regards

  • How can i get into my iphone without activating it through itunes id

    How can I get into my iPhone without activating it through itunes id

    If the iPhone has Find My iPhone activation lock enabled then you will not be able to activate the iPhone without entering the correct Apple ID and password it is locked to. Sorry but there is no way to bypass this.

  • Itunes is not showing all my music.1000 songs have disappeared.How can I get them back.I have them all on my ipod touch.will syncing restore all music back into itunes.please help

    1000 songs have disappeared from my itunes library.How can I get them back? I still have them on my ipod touch will this help

    See Empty/corrupt iTunes library after upgrade/crash or
    Recover your iTunes library from your iPod or iOS device.
    tt2

  • HT1338 i have lost my system preferences, how can i get it back. i have been using my laptop without system preferences. please help.

    i have lost my system preferences and app store in my macbook pro osx leopard. i want to upgrade. i can't. i have been trying. where or how can i get it back. i am in foreign country. there is no apple store here.

    Do you have your 10.6 Install Disc, if so reinstall, if not...
    Try re-installing the big 10.6.8 Combo...
    http://support.apple.com/kb/DL1399

  • How can i get production version value(verid) for luck through bdc.

    HI..
    i have one requirement..that in c223 tcode while i luck the production version through BDC in my report program as i given bellow...i upload mat.no , plant, production version and 1(for luck)...
    req:: i want while i given production version for particlular plant and material no...that production version should be luck....
    so in standard tcode c223 how can i get value to compair it with my input production version value then i will close that...
    program:::
    report ZC2232
           no standard page heading line-size 255.
    *include bdcrecx1.
    Tables : mkal.
    data : nodata value '/' .
    data : CTUMODE type c value 'E'.
    DATA : CUPDATE TYPE C VALUE 'L'.
    DATA:   BDCDATA LIKE BDCDATA    OCCURS 0 WITH HEADER LINE.
          messages of call transaction
    DATA:   MESSTAB LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
    data: begin of HEADER OCCURS 0,
    data element: MATNR
            MATNR_001(018),
    data element: WERKS_D
            WERKS_002(004),
    data element: PLNNR
           PLNNR_003(008),
    data element: CP_STTAG
            STTAG_003(010),
    data element: ENTRY_ACT
           ENTRY_ACT_005(011),
    data element: PLNAL
            PLNAL_004(001),
    data element: FLG_SEL
           FLG_SEL_01_006(001),
    data element: PLANTEXT
           STLAL_004(002),
           DATUV_005(010),
    data element: WERKS_D
           WERKS_008(004),
    data element: PLN_VERWE
           ktext_005(001),
    data element: PLNST
            DELKZ_005(001),
    data element: LOSGRVON
           LOSVN_011(017),
    data element: LOSGRBIS
           LOSBS_012(017),
    data element: PLNME
           PLNME_013(003),
    data element: PLNME
           stlal_014(002),
    end of HEADER.
    data : begin of it_header occurs 0,
           matnr like marc-matnr,
           werks like marc-matnr,
           verid like mkal-verid,
           mksp like mkal-mksp,
           end of it_header.
    data : exnum(40) type c,
           exnum1(40) type c,
           cnt type I,
           CN(2) TYPE C,
           c1 type c value '(',
           c2 type c value ')'.
    start-of-selection.
    parameters: p_file like rlgrap-filename.
    at selection-screen on value-request  for p_file.
      call function 'F4_FILENAME'
    EXPORTING
      PROGRAM_NAME        = SYST-CPROG
      DYNPRO_NUMBER       = SYST-DYNNR
      FIELD_NAME          = ' '
      importing
         file_name           = p_file.
    start-of-selection.
    call function 'WS_UPLOAD'
    exporting
      CODEPAGE                      = ' '
       filename                      = p_file
       filetype                      = 'DAT'
      HEADLEN                       = ' '
      LINE_EXIT                     = ' '
      TRUNCLEN                      = ' '
      USER_FORM                     = ' '
      USER_PROG                     = ' '
      DAT_D_FORMAT                  = ' '
    IMPORTING
      FILELENGTH                    =
      tables
        data_tab                      = it_header
    EXCEPTIONS
      CONVERSION_ERROR              = 1
      FILE_OPEN_ERROR               = 2
      FILE_READ_ERROR               = 3
      INVALID_TYPE                  = 4
      NO_BATCH                      = 5
      UNKNOWN_ERROR                 = 6
      INVALID_TABLE_WIDTH           = 7
      GUI_REFUSE_FILETRANSFER       = 8
      CUSTOMER_ERROR                = 9
      NO_AUTHORITY                  = 10
      OTHERS                        = 11
    if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    DELETE it_header WHERE MATNR IS INITIAL.
    LOOP AT it_header.
    *start-of-selection.
    *perform open_group.
    perform bdc_dynpro      using 'SAPLCMFV' '1000'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTE'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MKAL-WERKS'.
    perform bdc_field       using 'MKAL-WERKS'
                                  it_header-werks.
    perform bdc_field       using 'MKAL-MATNR'
                                   it_header-matnr.
    perform bdc_dynpro      using 'SAPLCMFV' '1000'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=PICK'.
    perform bdc_field       using 'MKAL-WERKS'
                                 it_header-werks.
    perform bdc_field       using 'MKAL-MATNR'
                                it_header-matnr.
    *>>>>>>>>>>>>>>>>>>>>here what logic can i write****
    clear cnt.
    do 15 times.
    cnt = cnt + 1 .
    CN = CNT.
    exnum = 'MKAL_EXPAND-VERID'.
    concatenate exnum c1 cn c2 into exnum1.
    *perform bdc_field       using 'BDC_CURSOR'
                                   exnum1.
    GET PARAMETER ID 'VER' FIELD EXNUM1.
    CALL TRANSACTION 'C223' AND SKIP FIRST SCREEN.
    if ( it_header-verid = EXNUM1 ).
    exit.
    endif.
    enddo.
    ****************************************************end***>>>>>>>>
    perform bdc_field       using 'BDC_CURSOR'
                                  exnum1.
    perform bdc_dynpro      using 'SAPLCMFV' '2000'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MKAL_EXPAND-PLNTY'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=PRFG'.
    perform bdc_dynpro      using 'SAPMSSY0' '0120'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=RW'.
    perform bdc_dynpro      using 'SAPLCMFV' '2000'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/ECANC'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MKAL_EXPAND-VERID'.
    perform bdc_dynpro      using 'SAPLCMFV' '1000'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=SAVE'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MKAL-WERKS'.
    perform bdc_field       using 'MKAL-WERKS'
                                  it_header-werks.
    perform bdc_field       using 'MKAL-MATNR'
                                  it_header-matnr.
    perform bdc_dynpro      using 'SAPLCMFV' '1000'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/EBACK'.
    perform bdc_transaction using 'C223'.
    endloop.
    *perform close_group.
    *&      Form  bdc_dynpro
          text
         -->P_0161   text
         -->P_0162   text
    form bdc_dynpro  USING PROGRAM DYNPRO.
      CLEAR BDCDATA.
      BDCDATA-PROGRAM  = PROGRAM.
      BDCDATA-DYNPRO   = DYNPRO.
      BDCDATA-DYNBEGIN = 'X'.
      APPEND BDCDATA.
    endform.                    " bdc_dynpro
    *&      Form  bdc_transaction
          text
         -->P_0351   text
    form bdc_transaction USING TCODE.
    call transaction 'C223' using bdcdata
                             mode    CTUMODE
                             update  CUPDATE
                             messages into messtab.
      if sy-subrc <> 0.
      message e000(zmm01) with
      'Check your input data'.
      endif.
    endform.                    " bdc_transaction
    *&      Form  bdc_field
          text
         -->P_0346   text
         -->P_0347   text
    form bdc_field  USING FNAM FVAL.
      if fval <> nodata.
        CLEAR BDCDATA.
        BDCDATA-FNAM = FNAM.
        BDCDATA-FVAL = FVAL.
        APPEND BDCDATA.
        endif.
        endform.                    " bdc_field

    l_nl := dbms_xslprocessor.selectNodes(l_n, '/TaxInvoice/TaxInvoiceDocument');try to change as follow
    l_nl := dbms_xslprocessor.selectnodes(l_n,'/TaxInvoice/TaxInvoiceDocument','xmlns="urn:kr:or:kec:standard:Tax:ReusableAggregateBusinessInformation:1:0"');Edited by: AlexAnd on Aug 17, 2011 12:36 AM

  • HT204053 I have two Apple ids, how can I get all music I have purchased in one library?

    I have used two Apple IDs to purchase music. I want to consolidate the music to one library. How can I do this?

    Wooookay ..... I need to slow down some here.
    OK. Thanks for this. Yes I was confusing two things.
    Forget the Store.
    In my iTunes Library there are some songs I purchased (with ID2) along with those from ID1. There are a few songs with a "!" in the first column on the left of my songs listing. When I click on those songs I get a message which says "can't play this song as itunes cannot locate the file, then it gives me the option to locate it. Once I take that option I am in finder but cannot find the song. it is not in the location other "playable songs" are.
    somewhere in frogging around i did see a location that looked something like //file/xxxxx/xxxx/user/etc. but I cannot find this location. somehow a few songs from a specific download have been sent to this eroneous location which itunes cannot find. I want to get them moved to where itunes can find and play them.
    I can later deal with ordering music with two different IDs.
    Thanks for helping

  • How can i get icloud id "i have apple id" ??

    I can't get an icloud account and there is no page or place to do!!
    I already have an apple ID so just tell me how i can get the 'icloud' account
    Example ([email protected])
    Thnx

    Sorry, I don't get. Do you have an Apple ID with a me.com address or do you have just an Apple ID.
    If you have no me.com account then you have to set up a new icloud account. Therefor you can use your Apple Id but you would also have to set up a new icloud.com address during the set up process. Try to set it up in "iCloud" or "Mail, Contacts, Calendars > Add Account... > iCloud"

  • How can I get my iPhone3g to have voice command to type in search boxes

    HOW do I get the mic icon that you push to speak instead of typing? It should be between the space bar and the ?123 button

    THank you for the info . Is there anyway to make it possible to get Siri for this phone ?
    I have it on a the google search app but the new iPhone4 does it in all applications. I would love to know
    IF it could be possible

  • I have photos that are rotated within a photo stream created from a project even though the photo displays properly within the project. How can I get the photos to have the proper rotation within the photo stream?

    I have a photo stream that was created from a subset of photo from a rather large Aperature project. Some of the photos show up rotated within the photo stream but are not rotated within the project. Why is this happening and how do I fix the rotation within the photo stream? I do have the latest version of Aperature and have all of the necessary updates applied to my devices used to view the photo stream. The photos do show up rotated within the photo stream segment of Aperature, so I am sure it is not an issue with the output device (iPad and Apple TV). I do know that I cannot edit photos within a photo stream, but no amount of editing within the project allows the photos to be properly rotated within the photo stream. All help would be greatly appreciated.

    That will work, but it is the long way 'round.
    As Frank noted, Book Albums are just specialized Albums.  Albums can show any Image in your Library, regardless of where the Album is located on the Library Inspector, and regardless of which Project contains the Image.  You can put your Albums anywhere (in a Folder called "Books" for example).  You can put Images from anywhere in your Library in any Album.
    The easy way 'round:
    - Make a new Book Album
    - Select Images you may want to put in your Book.  Flag them.
    - Select some more.  Flag them.
    - Go to the "Flagged" container (listed near the top of the Library Inspector), select all, and drag-and-drop them to your Book Album.
    - Repeat as needed, or just drag-and-drop directly into the Book Album.
    Note that you can remove any Image from any Album (including Books) by selecting and hitting the "{Delete}" key.  This _does not remove the Image from the Project that contains it, or from the Library.
    Note, too, that once the Images are in your Book Album, you then put them in the Book you are creating for publication.  The Book Album contains the superset of Images with which you populate the Book itself.  The Book Album also holds the Book.
    A good (imho ) introduction to the parts of Aperture can be found in this short guide I wrote.
    The User Manual is helpful.  Here is
    the chapter on making Books. 
    From that chapter, here is
    the section detailing how to create and populate a Book Album.

  • How can I get a song I have in iTunes on to a normal MP3 player?

    I saved a song to my computer and it automatically goes into itunes, this is okay because this is the way I usually want it, but I have a song in itunes that I want to put on a normal MP3 player does anyone know how I can transfer it?

    First make sure it is already in MP3 format.  If it is not, make an MP3 version:  http://support.apple.com/kb/HT1550
    Then connect your player via USB, and drag the MP3 track from iTunes to the player.

Maybe you are looking for