Lightswitch, Silverlight client, Selectable Label RRS feed

  • Question

  • Hello,

    i use GUID columns and I want them to be shown. Now typing a GUID is tough so making them copyable is important.

    The GUID column should be readonly (it is being gerated by the DB once and then never changed again). So in the GUI I use type "Label" to display the GUID field. Yet the issue is: Label is WPF Textblock and that can not be selected and not copied by the user (for my point of view a general issue with WPF)

    If you use textbox the field can not be set to read-only. I would need to implement the IsReadOnly for all tables (>50).

    Is there a simple way to convince lightswtich to to use a textbox for a label and set it read-only?


    Friday, May 16, 2014 9:04 AM

All replies

  • there's no really easy way. You have to handle the ControlAvailable event of the TextBox in order to set the IsReadOnly property. The only other way would be to create or use a third-party control.

    Simon Jones
    If you found this post helpful, please "Vote as Helpful". If it actually answered your question, please remember to "Mark as Answer". This will help other people find answers to their problems more quickly.

    Friday, May 16, 2014 9:53 PM