How can we secure our interface?

Hi,

With the interface being an XAML file, is the end-user able to change everything regarding positioning and to some extent behavior (via changing the bindings)

How can this be controlled

On the other hand, if we WANT to allow the end-user changes in the presentation alone (not in behavior) is there a way to do this

Thanks in advance!!

Juan Dent




Answer this question

How can we secure our interface?

  • Nick Mc

    If you compile your application, such that XAML becomes internalised as BAML resource streams, a user would be unable to change positioning and behavior without reverse engineering your application.


  • Leo Ng

    There are ways to allow a user to customize the look and feel of your application. It all starts with creating "lookless controls" which is slightly more complicated than using UserControls. Your lookless control can have its template overriden. How does your code-behind do anything useful with the control Part of your control's API should be its required named elements or template parts. There is an Attribute, TemplatePartAttribute, that you can use to tell a control user the name and type of all required elements for your control to function properly.

    The next step in allowing UI customization is to provide a plugin architecture. You can make your main form a custom control, provide the named elements for the control (like you need a menubar element named Part_MenuBar or a textbox element named Part_UserName). From there all a user needs to do is create a XAML file that provides the new Theme for your application and you have to provide a way for it to be loaded by your application.

    Of course the gotcha is that you have to implement all of this functionality (lookless control, plugin architecture, overriding themes from loaded XAML) yourself. It takes a bit more effort, but it does allow your application to be more flexible in terms of look and feel.

    Hope this helps.



  • Nuno_Salvado

    Hi,

    Thank you, I appreciate this prompt response. Along the same lines I have a related issue:

    Now, what if I wanted to give the end-user some freedom as to the UI How would I do this Would I need to supply all the source code, only the XAML And, would this be an all-or-nothing deal Could I restrict what could be changed and what not

    Best regards,

    Juan Dent



  • AndyB_UK_2006

    Hi,

    With Office 2007 available and InfoPath, I wonder if the fastest way to user customization of interfaces is not to be provided by using Office forms... Is this a good choice

    Are Office forms compatible with WPF and XAML I guess if they were, then probably the answer to may first question if *yes*.

    Any ideas

    Juan Dent



  • How can we secure our interface?