ModelFragment (LSML file) where do I find documentation (or intellisense)

Answered ModelFragment (LSML file) where do I find documentation (or intellisense)

  • Tuesday, March 13, 2012 7:52 PM
     
     

    I'm creating an extension control with the help of several examples scattered here and there on the web. But I can't seem to find any MSDN documentation for creating/modifying the LSML file..

    Intellisense would also be very welcome :)


    rdk

All Replies

  • Tuesday, March 13, 2012 11:19 PM
     
     

    The only time you should need to look at the .lsml file is when you ae making Screen Templates (for example: Creating a Visual Studio LightSwitch Screen Template).

    What kind of control are you making that you need to alter the .lsml file?


    Make Them Ask: That's a LightSwitch App?

    http://LightSwitchHelpWebsite.com

  • Wednesday, March 14, 2012 7:49 AM
     
      Has Code

    HI Michael,

    I'm creating a DataGrid Control Extension bases on you're example ;). It will support ColumnHeader filtering (hopefully).

    http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/104/Creating-A-LightSwitch-Collection-Control-Extension.aspx

    I've replaced the ChildView=":Summary" with ChildView=":DataGridRow" as I've seen in another example somewhere else. I'm interested in the how's and why's on this file, what kind of properties are supported.

    <?xml version="1.0" encoding="utf-8" ?>
    
    <ModelFragment
    
      xmlns="http://schemas.microsoft.com/LightSwitch/2010/xaml/model"
    
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    
      
    
      <Control Name="SimpleDataGrid"
    
        SupportedContentItemKind="Collection"
    
        DesignerImageResource="SimpleDataGridExtension.SimpleDataGrid::ControlImage"
    
        AttachedLabelSupport="DisplayedByContainer"
    
        ChildView=":Summary">
    
        <Control.Attributes>
    
          <DisplayName Value="SimpleDataGrid" />
    
        </Control.Attributes>
    
      </Control>
    
    </ModelFragment>


    rdk

  • Wednesday, March 14, 2012 12:21 PM
     
     Answered

    In my experience, the only reason you need the .lsml file is a screen template because a screen template requires you to reference controls using a special naming format. Looking in the .lsml file helps in that situation.

    For all other controls, the end-user LightSwitch developer will bind a single property or collection to your control. Even the Many-To-Many control binds to a single collection.

    That's it, that is all you have to work with. The .lsml file doesn't provide any help.


    Make Them Ask: That's a LightSwitch App?

    http://LightSwitchHelpWebsite.com

    • Marked As Answer by Ralf de Kleine Wednesday, March 14, 2012 12:23 PM
    •  
  • Wednesday, March 14, 2012 12:23 PM
     
     

    I'll take your word for it.

    Thanks


    rdk