Using C# instead of XAML in Silverlight -
is xaml necessary? if wanted to, displayed on silverlight page declared @ runtime in c# code? visifire has example code set 1 of classes, chart, in c# code , add user interface simple c# call:
layoutroot.children.add(chart);
how similar creation class have defined in xaml file because of other reasons need declare @ runtime? if use in xaml think work because there no errors display. declared this:
<views:prescriberpage01 x:name="dashboardprescriberpage01" visibility="collapsed" selectedproduct="{binding selectedproduct, mode=twoway}"grid.row ="0"/>
how declare in c# code?
is xaml necessary?
i suppose no, can can in xaml in code. xaml really, much, more convenient way go. , think few dissagree this.
how declare in c# code?
you can create bindings in code. example msdn. in situation like:
prescriberpage01 page = new prescriberpage01(); page.visibility = visibility.collapsed; binding mybinding = new binding("selectedproduct"); mybinding.mode = bindingmode.twoway; mybinding.source = this; // or whatever object carrying property // "selectedproduct" bind against. page.setbinding(prescriberpage01.selectedproduct, mybinding); layoutroot.children.add(page);
Comments
Post a Comment