How to use templatebinding from DataTemplate

I have the following code:
<Style TargetType="local:LabelledList">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="local:LabelledList">
<ListView DataContext="{TemplateBinding ListSource}" ItemsSource="{Binding}">
<ListView.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="*" />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<ContentControl Grid.Row="0" Content="{Binding}" ContentTemplate="{TemplateBinding ItemHeaderTemplate}" />
<!-- ... -->
</Grid>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
TemplateBinding inside DataTemplate isn't working.
How do I make it work?

I made a workaround for you:
<Style TargetType="local:LabelledList">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="local:LabelledList">
<ContentControl x:Name="hiddenItems" Visibility="Collapsed"
ContentTemplate="{TemplateBinding ItemHeaderTemplate}" />
<ListView DataContext="{TemplateBinding ListSource}" ItemsSource="{Binding}">
<ListView.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="*" />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<ContentControl Grid.Row="0" Content="{Binding}" ContentTemplate="{Binding ContentTemplate, ElementName=hiddenItems}" />
<!-- ... -->
</Grid>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
Does it work?
I wonder if there is any simpler way?

Similar Messages

  • HOW TO USE CLIPS FROM A DVD???

    HOW TO USE CLIPS FROM A DVD???
    i know this may be a stupid and obvious question but i can't seem to figure it out.
    these are not copyrited dvds... mostly home movies and old home movies put onto dvd.
    thank you... much appreciated.

    Studio X has given one suggestion.
    MPEG Streamclip is another:-
    http://www.squared5.com/
    It is free but your computer may not have the QT MPEG 2 Playback Component which costs $20 from Apple as a download.
    If you have access to an Analogue-DV converter you can use that. Also a DV camcorder which has Analogue IN.
    If you have Final Cut Pro installed, you will have the QT component.
    Message was edited by: Ian R. Brown

  • Does anyone know how to use vlookup from a pop up menu to retrieve another pop up menu?

    Does anyone know how to use vlookup from a pop up menu to retrieve another pop up menu?

    BM,
    Pop-Up menu format is not dynamic. It is created in the Cells Inspector and can't be modified contingent upon the state of other cells.
    You could program a table to list the options available for the previous selection, but it wouldn't be in the form of a Pop-Up.
    Jerry

  • How to use images from ADFLib

    Hello OTN,
    My application is devided into several ADFLibs, one of them is CommonUI. It includes common skin and it is imported into every application part.
    There are some images which should be available in different parts, so I decided to put them in CommonUI.
    After deploying adflibCommonUI adn refreshing Resource Palette, somehow I expected to see this image there, but it isn't.
    Could someone, please, explain me, how to use images contained in imported ADFLib, for example, as imageLink icon?
    Thanks.
    ADF 11.1.2.1

    Hi,
    images need to be saved in a specific file structure in the JAR file to be accessible. See:
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/86-images-from-jar-427953.pdf
    Frank

  • How to use Results from Another Query for SAP BW universes

    Hi Everyone,
    I have two SAP BI universes.In my First universe I have Sales Doc no (dimension) and Orderqty (Measure) and in my second universe I have Sales Doc no(Dimension) and BillQty (Measure).
    Here in my first dataprovider I have 1200 rows of data and in second dataprovider I have 75,000 rows. The report should fetch only the BillQty details that matches to corresponding  Sales doc no in first data provider.
    I want to place all these fileds into a single report like as shown.
    (Datarpovider1)                (Datarpovider1)                    (Datarpovider2)
    *Sales Doc No*               Orderqty                           BillQty
    Here I am able to generate single report using merge dimension but it is leading to performance issues. I want to restrict the values at query level by passing the First dataprovider Sales doc no to second Data provider Sales doc number using Results from Anothery Query feature so that It can fetch only the matching records.
    I tried it but it was giving the follwing error:
    A filter contains a wrong value. You cannot run this query. (Error: WIS 00007)
    How Can I get rid of this error. Can we use Results from Anothery Query option for OLAP universe. Are there any limitation on it.
    All this I am doing in Webi Rich Client.
    Appreciate your help
    Thanks &in Advance
    Kiran Saka

    Hi Kiran,
    I think the filter has a wrong operand. For example, a filter with an empty constant, or a filter that deals with numeric values is defined with an alphanumeric value.Check out for this.
    Regards,
    Neeraj

  • How to use "Add from POM" to add source path and docpath?

    Hi
    My team is developing multiple projects with JDeveloper 11gr2.
    We share libraries and sources between team members using maven extension for JDeveloper.
    We deploy class jar, source jar and javadoc jar to repository.
    The project pom has some dependency defined as below
    <dependency>
                <groupId>com.example</groupId>
                <artifactId>CommonClient</artifactId>
                <version>0.0.1-SNAPSHOT</version>
                <type>jar</type>
                <scope>compile</scope>
    </dependency>
    We use ProjectProperties->Mave->Dependencies->Add from POM button to add dependecies to Project.
    The problem is that the class jar is added to the classpath but the source jar and javadoc jar are not.
    As a result, Team members cannot see the javadoc in code editor.
    Configure IDE libraries is an option but does not work well with maven.
    Does anyone know how to add source jar and javadoc jar to project using "Add from POM" button?
    Thank you!

    Hi ,
    Sample code snippet for GET_RELATED_CONTENT is as follows :
    dataBinder.putLocal("IdcService", "GET_RELATED_CONTENT");
    dataBinder.putLocal("dSource","CS");
    dataBinder.putLocal("dID","3202");
    dataBinder.putLocal("dLinkTypeID","1");
    serializer.serializeBinder (System.out, dataBinder);
    // Send the request to Content Server
    ServiceResponse response = idcClient.sendRequest(userContext,dataBinder);
    // Get the data binder for the response from Content Server
    DataBinder responseData = response.getResponseAsBinder();
    // Write the response data binder to stdout
    serializer.serializeBinder (System.out, responseData);
    // Retrieve the SearchResults ResultSet from the response
    DataResultSet resultSet = responseData.getResultSet("RelatedContent");
    // Iterate over the ResultSet, retrieve properties from the content items
    for (DataObject dataObject : resultSet.getRows ()) {
    System.out.println ("Related ContentID is : " + dataObject.get ("dDocName") );
    Point to note is :
    dLinkTypeID is set to 1 . Reason being that the rendition related content is used to link items . So looking for those related items which are as Renditions .
    This value would be as follows :
    dLinkTypeID Related content type
    1 Rendition
    2 Supersedes
    3 Has Supporting content
    4 Cross References
    2 more sub types are :
    Supports - dLinkTypeID=3 and extraparameter is isGetParents=1
    Cross Referenced By - dLinkTypeID=4 and extraparameter is isGetParents=1
    Hope this helps .
    Thanks,
    Srinath

  • How to use DOMParser from an Applet / Or, how to parse XML from an Applet?

    Hey,
    As stating in the subject line, I wonder how to do it without getting an �Access Denied� error.
    I would like to parse a XML file that has external DTD pointing to a SYSTEM location. Yes, I can change it to a public location. However, in either way, I have problems to use DOMBuilder to parse the xml file. The application always throws the security exception.
    I tried to use the DOMParser from org.apache.xerces.parsers to parse the xml file. I set the DOMParser to ignore parsing the external DTD, and use the DOMParser.parse(InputSource) to parse the xml file from a giving URL. However, I get null of the result document.
    Does anyone know how to parse the XML from an Applet? Or, does anyone know how to use the DOMParser from an Applet?
    Thank you very much,

    If the document resides on the local filesystem, you will need to sign a CAB or JAR for the applet to circumvent the sandbox's security restrictions. There are dozens of posts on how to do this. Basically, that will turn the applet into an application, from a Java security perspective.
    - Saish
    "My karma ran over your dogma." - Anon

  • How to use payload from standard RFC MessageType in a RFC Lookup function

    Hello
    We have a DB sender to call an BAPI. The DB receiver gets the BAPI response.
    It is an easy scenario with one mapping.
    But the RFC Mapping Lookup is very awful. You have to rebuild all open and close tags to get the RFC payload. A lot of concat functions are a must. The error search in such a mapping is not easy and seems like EAI developing 1990 (Hand am Arm).
    Ok, it is better as a BPM, but it is not well for first level support person and release changes and trouble shooting.
    How can I use a XML payload from first mapping in my RFC Mapping lookup (second mapping)? There must be a way with two mappings and an easy RFC lookup.
    Currently (one mapping):
    DB sender format -> ( RFC lookup self-made RFC XML structure) DB receiver format
    My dream (two mappings):
    DB sender format -> RFC SAP XI standard Format ->(RFC lookup by using Payload from first mapping) DB receiver format
    I hope someone can help me with an example.
    Daniel

    Hi Daniel,
    If i understood correctly, urs is a 'Asynch' scenario JDBC to JDBC with a RFC lookup in Mapping.
    If its so, then i think wat u r expecting can be done. In Interface Mapping, u can add more than one message mappings.
    So first do a Mapping for DB sender format - RFC input standard format,
    then another one for RFC sender Format - RFC receiver format, (look up code goes in this mapping).
    Then third one from RFC receiver format to DB receiver format.
    The order n which u add in Interface Mapping is also important. This is a suggestion, i havent tried this, but still i think u can give it a try.
    Regards,
    P.Venkat

  • How to use image from a file in signature appearance.

    Hi,
    I am creating a Plugin for acrobat 9, using PubSec using DocSign sample as basis. I have created the appearance using text objects and the logos data that came with the DocSign sample. But I want to use image from a file (like, jpg) in the signature appearance creation. So far the documentation doesnt tell how to achieve this.
    Can you please tell me in a  "How-to" kinda way to achieve this?
    Thanks in advance.

    Thanks for ur prompt reply.
    There are so many samples in the sdk. which one is the "sample for adding images."?

  • JCA Classpath - How to use library from rar instead of from WLS

    We have a stand-alone resource adapter that uses the apache commons net library, and relies on features added in version 2.0.
    When we deploy to WLS 10.3.2, we get a class loading error when invoking the adapter. Method org.apache.commons.net.ftp.FTPClient.setConnectTimeout(T)V is not found.
    WLS 10.3.2 includes an older version of the library: com.bea.core.apache.commons.net_1.0.0.0_1-4-1.jar.
    Despite paclkaging the proper version (2.2) in our rar, the older and incompatible 1.4.1 version from the system classpath is used.
    Is there a way to use the version packaged in our stand-alone rar file? I have seen a way to do this for a war file (prefer-web-inf-classes in deployment descriptor).
    O know we could to modify the system classpath in the weblogic startup scripts to use the newer library. We prefer not to do this, since we don't know how WLS uses the library internally, and what might be affected by a different version.

    unfortunately, standalone adapter has not prefer-web-inf-classes or similar feature support.

  • Audacity - how to use songs from iTunes?

    Hello,
    I'm trying to create some song clips to use in a music quiz - using songs from my iTunes library. I've downloaded Audacity and the MP3 encoder but am completely stuck - not sure that the encoder is even installed yet as I can't click on anything when I try and 'find' it.
    I can't get most of my songs to play in Audacity - I think they're in an unsuitable format - .mp4? But how do I convert existing songs in iTunes into a format that I can edit in Audacity? AND then, do I burn them onto a CD in a particular format so that they will play on a PC (for the quiz)?
    Any help would be great - many thanks.

    The guide to installing the Lame encoder is here
    http://audacity.sourceforge.net/help/faq?s=install&item=lame-mp3
    I just saved mine to my Audacity folder in Applications then pointed Audacity in the right direction 1st time I used it.
    Right click on a track in iTunes and select "convert to mp3" does the trick.
    PCs read MP3's so all should be well. If not, save the tracks as WAVs (audio files).

  • How to use bootcamp from scratch?

    A Simple explanation of making a windows 7 install disk, using the os from either a windows 7 computer or a repair disk, and how to use it with boot camp?

    From the ones who know best.
    Note that you'll have to have a retail version of Windoze, not an OEM version as it comes with a PC, or a "repair disk".

  • How to use attributes from different context nodes in one view?

    I am VERY new to the concept of CRM and currently working on creating an alternate version of the BP_HEAD_SEARCH. With help from SAPPRESSs book 'SAP CRM Web Client' i was ble to create my own simple Z-component.
    However after going back and forth the book and the forum (including this [article|https://wiki.sdn.sap.com/wiki/display/CRM/Howtoaddanexistingfieldtoasearchpageofadifferent+component]) i was not able to find a solution to my problem. My current search uses BuilHeaderAdvancedSearch as context node for searching. But the search should also be able to use attributes from BuilActivity, which is directly related to BuilHeader. I can't seem to find a way to get attributes from BuilActivity into the search window of my component without having to change SAP-Standard.
    Is this really the only way? Please advise on possible code and insertion point.

    Any suggestions?

  • How to use data from standard view in Web dynpro for ABAP

    Hello:
    I have to create an Abap Web Dynpro, and I must use data from a standard view in the new one. Does anybody know what do I have to do?
    Thank you and have a happy new year.

    Hi Rodrigo,
    Firstly, list the Standard component under Component Usage of the Component which you are creating in your View.
    Second, In the Custom Component, view, goto context, and try to add the node from the Standard component in to your view.
    NOTE: The second step requires a Node in component controller of the Standard Component.
    Finally, Now in your view, get the data from that and map the data.
    NOTE: To do this, I think you need to call your Standard WDA first and then only your node contains data and it will be passed.
    I hope it is helpful.
    Regards,
    Shashikanth. D

  • How to use days-from-duration in XSL 2.0

    Hi,
    I am trying to use days-from-duration function in XSL 2.0, but it keeps complaining about invalid Xpath for that line.
    I am using it with xp20: prefix, is that correct?
    Thanks in advance.

    ok, i figured out, i needed to add below namespace & then use that as the prefix
    xmlns:fn="http://www.w3.org/2005/xpath-functions"
    fn:days-from-duration
    Thanks.

Maybe you are looking for

  • Icon legend in OBI EE Administration Tool

    Does anyone know where can I find "Icon Legend" of object (for all three layers (Physical, Buisness Model and Maping and Presentation)) in 'OBI EE Administration tool'? "Toad for Oracle" in 'Shema Browser' has one and it explains icon that every obje

  • Why can't I get my ipod nano to shuttle songs

    I cannot get my ipod nano to shuttle songs.

  • Date Profile Position

    Hi, I have added SRV_CUST_BEG to my date profile for a Service Confirmation, via the Interaction Centre. Problem I have is that the field for SRV_CUST_BEG does not appear. Should it/where? Everything looks fine in customising except for the Screen ar

  • PHOTOSHOP NO ME RECONOCE .GIF y .PNG

    Hola, lo primero como no, saludaros a todos ya que es la primera vez que escribo. En segundo lugar, me gustaría comentaros que tengo un problema con photoshop y los archivos .gif y .png, no se si es un problema de la instalación del programa ya que n

  • Combining yearly Photoshop Photography Program with monthly Complete Program?

    Hi all! I'm planing to subscribe to a discounted 1-year Photoshop Photography Program. However, I sometimes need other apps from Complete Program, like AI or AE, too (probably worth 3-4 months a year). For money saving reason. Is it possible to maint